Turns out it was much easier than I feared. I'm now generating Spot colors under the PDF renderer in version 0.95. This only works with fo -- I don't need SVG support, so I haven't even looked at adding it there.
I'm a bit unhappy with the underlying code - the biggest issue was that the "colorSpace" member of PDFPathPaint is a PDFDeviceColorSpace and the PDFResources "addColorSpace" method expects a PDFICCBasedColorSpace. Changing the methods to expect a PDFColorSpace interface argument is a bit unsatisfying as well. I spent some time trying to find a way to use polymorphism here, but it was still rather ugly. Tomorrow I'm moving on to the bitmap-based renderers. I haven't diff'd the code with HEAD, so I'm not certain how compatible my hacks are beyond .95. Anyone interested in helping me clean it up or providing some thoughts as to an approach? -Patrick From: Patrick Jaromin [mailto:patr...@jgsullivan.com] Sent: Wednesday, January 27, 2010 2:37 PM To: firstname.lastname@example.org Subject: Understanding the PDFRenderer I've been charged with implementing spot colors in FOP. I've followed some earlier threads, but the discussion appears to have ended without any final contribution from the poster. First - just in case I've missed it - is there any work that's been done on this that I'm not seeing? Second - I've begun the process and have discovered that parsing the function is rather easy (I chose to extend rgb-icc after following some prior threads). I've also reviewed the PDF specification and have a decent understanding of how to make this work in PDF format...and can manually insert the appropriate code into the file. So, the my next step is to work out the code to emit the appropriate PDF commands from FOP. I've created a "PDFSeparationColorSpace" class and extended "ColorExt." My issue now is that I'm having trouble following the flow of the PDF document generation - and consequently haven't yet worked out where I can and should add my resources (the ColorSpace and tint function) to the document resources. I'm still working through the code and believe I can ultimately suss this out by myself if I have to, but I would be very grateful if someone with some experience with this renderer could provide some time-saving hints/guidance. BTW, I'm working with the 0.95 code base (I can't move to trunk right now) and will gladly contribute the results if they're usable/wanted. Thanks! -Patrick ________________________________ Patrick K. Jaromin VP Technology 312.943.1600 * fax 312.640.8100 JGSullivan Interactive, Inc.