Welcome Guest Search | Active Topics | Sign In | Register

CMYK using HtmlToPdf Options
Emil Ingerslev
Posted: Tuesday, September 4, 2012 2:25:44 PM
Rank: Newbie
Groups: Member

Joined: 9/4/2012
Posts: 2
How do i create a PDF with CMYK colors using HtmlToPdf?

I can see it is possible to define af PdfColor as CMYK from your documentation, but I don't know how to get the color's in that colorspace. I worked with a couple of solutions:
1. I tried defining the colors as 'device-cmyk(0,0,0,1)' but it was ignored.
2. Another attempt was changing the colors after converting them to HTML, but i can't seem to find where the colors are defined in PdfContent.
3. Another solution i could imagine is hooking into the HtmlToPdf converter and change the color before its printed, but I don't think thats possible right away?

I'm working with html containing text, tables, borders, images and SVG's.
eo_support
Posted: Tuesday, September 4, 2012 2:32:34 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

You can not use CMYK color. The core web engine of the HTML to PDF converter uses RGB color model internally. So even if you could use CMYK, it will still be converted to RGB for internal processing, which would lose all advantage of CMYK color model. Sorry about that!
Emil Ingerslev
Posted: Tuesday, September 4, 2012 2:37:49 PM
Rank: Newbie
Groups: Member

Joined: 9/4/2012
Posts: 2
It's kind of a must that the PDF is in CMYK color, since its for printing. Could it be done by extending HtmlToPdf with a color converter or similar?
If the library can't do it right know, would it be possible to get you to implement a way so it will be possible?
eo_support
Posted: Tuesday, September 4, 2012 2:43:04 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

No. We do not see any possibility to support that in the near future. The root of the problem is the Web engine uses RGB internal ---- changing that is no small task at all. The best you can do is to back convert CMYK color to their equivalent RGB color and then use RGB color instead. There is no easy way for you to modify a PDF file to update its color model either.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.