My project is quite simple. It is a c# windows application that shows image and text. Image should has with a background color and text is placed on top of it. So, my question is how can i set the font color of text to a custom color (CMYK would be better)? Currently, it works great by using the predefined color, but custom color appears to be black. If there is a way someone can provide? A little more detail that would really help a lot.
Thank you for your time.
This article on XsPDF.com is what are you looking for, check out: Add text on PDF with custom color in C#.
Answers
XsPDF .NET SDK allows you to insert text content to PDF. You can format the text as paragraph, head, list or underline sentence. Most importantly, the text font, size, color and location can all be modified.
So, why not download a free trial to test in your c# windows application. Setting PDF text font color to a "custom" color is not an easy task. Demo project is included in the package.
One thing you should know, CMYK uses floating point numbers for the colour components. That means if Values >= 1 it will get full saturation. So please make sure you have set the PDF document to CMYK mode in your project. From my point view, you should enter the CMYK values as a percentage of 255 or of 100. For example, you may enter 0.62, 0.28, 0.02, 0.03.
Thanks for your response.
I've tried what you suggested and that is worked. Now, the font color looks right. Thank you very much! And thank you for the great tool!