Bug 49403 - [PATCH] Spot color support for the PDF Renderer
Summary: [PATCH] Spot color support for the PDF Renderer
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.95
Hardware: All All
: P2 enhancement
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-08 09:14 UTC by Patrick Jaromin
Modified: 2012-04-01 06:19 UTC (History)
0 users



Attachments
Spot Color Support for PDF Renderer (32.10 KB, application/octet-stream)
2010-06-08 09:14 UTC, Patrick Jaromin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Jaromin 2010-06-08 09:14:39 UTC
Created attachment 25549 [details]
Spot Color Support for PDF Renderer

This patch provides spot color support for spot colors for the PDF renderer. It was developed against the 0.95 codebase, so it may not be compatible with the HEAD.

The code's rather rough and unforgiving (you need to specify the color function with ALL arguments correctly or it will likely die), but it's sufficient for our current production environment. Values for the alternate colorspaces (RGB/CMYK) must be provided, with the tint pre-calculated...though I believe it currently only actually uses one of the alternates (I think CMYK ??) for non-PDF renderers.

With this patch applied, you may specify spot colors in your FO using the following function:

rgb-icc(R,G,B,'#Separation',spot-color-name,tint-value,C,M,Y,K)

Here's one with real values:
rgb-icc(0,91,165,'#Separation','Reflex Blue CV',1,0.96,0.7,0.04,0)

I'm posting this here at Jeremias' request since he's working on implementing full support for spot colors. If you're looking at this for your own fork, you should probably review the status of his efforts first!
Comment 1 Jeremias Maerki 2010-06-25 08:30:01 UTC
Thanks for your code on spot colors, Patrick. I've kind of cherry-picked parts of your changes and adjusted those to the new color classes I've built in XML Graphics Commons.

What I haven't added, yet, is to provide the CMYK fallback. So right now, the syntax for separation colors is:

rgb-icc(R,G,B,'#Separation',spot-color-name[,tint-value])

PDF will fall back to the sRGB value instead of the CMYK value, mostly because sRGB is a calibrated color space where as DeviceCMYK isn't. I'm not sure if the CMYK fallback is that important at all. I assume the fallback is mostly used on the computer screen. On the printer, you will want to have the separation color configured. If I decide to write support for NCPs (ICC named color profiles), I will likely use CIE Lab as the fallback. WDYT?

I've started two branches for the color work:
https://svn.apache.org/repos/asf/xmlgraphics/commons/branches/Temp_Color
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Color

The initial changes based on your work:
http://svn.apache.org/viewvc?rev=957913&view=rev

This is all still work in progress! I'm keeping this issue open until the work on FOP and XGC is completed.
Comment 2 Jeremias Maerki 2010-09-09 09:08:00 UTC
Patrick's changes along with mine are now in the color branch mentioned earlier. I've got the functionality running in production.

The initial commit with Patrick's work was: http://svn.apache.org/viewvc?view=revision&revision=957913

I consider this issue closed. Only some cleanup and a merge back to trunk is left.

Thanks, Patrick!
Comment 3 Glenn Adams 2012-04-01 06:19:16 UTC
batch transition to closed; if someone wishes to restore one of these to resolved in order to perform a verification step, then feel free to do so