Well, in FOP 0.20.5 it is possible to generate uncompressed PDF documents. Although this may increase the file size, sometimes dramatically, it makes the RGB->CMYK replace operation much simpler, Because the PDF document wont need to be decompressed before performing those tasks. Then, what you will need is a regular expression, that finds any 'RG' or 'rg' color commands, to replace them with 'K' or 'k', respectively. Of course, the expression needs to be smart enough only to replace occurrences of 'RG' or 'rg' that is actually color commands. Searching for occurrences of three space separated numbers followed by space and then 'RG' or 'rg' is a hack, that might (but only might) be good enough.
Then, the XRef Table needs to be rebuilt. This tasks should be possible to do with another regular expression, That searches for any occurrences of '[anInteger] [anotherInteger] obj' and adds the byte offset positions of these matches into a new XRef Table, that in the end should replace the existing XRef Table. Also, the number on the second last line of the document should be replaced with the number of bytes written until the occurrence of the last 'endobj' command. There is a number of plug-ins, that can be used from within Adobe Reader to convert the RGB colors of a PDF document into CMYK colors. There is a tool named QuiteABoxOfTricks that can be found at http://www.quite.com doing this. I am sure it is possible to setup a batch processing solution as well, in order to create a totally automated hack solution for this lack. PitStop server is another solution. Regards, Dennis JD Myrén Developer Tel: (+47) 98 00 11 92 Mail: [EMAIL PROTECTED] Web: www.oslokb.no -----Original Message----- From: Timo Haberkern [mailto:[EMAIL PROTECTED] Sent: 21. november 2003 14:38 To: [EMAIL PROTECTED] Subject: Re: CMYK again Ben, > The President of my employer is a lawyer. Dunno if open-source will > happen anytime soon for that lib. ;-) > > Have you checked if the open-source Multivalent lib supports this type > of operation? I'll try and take a gander too, but you should check > and see. > I will check it next week. Thanks for the tip. I think it should be possible to create cmyk pdf from FOP directly. So if you can't "open-source" your solution, maybe you can talk a little bit about how to do such a replacement, so that i can maybe hack something similar into FOP? Timo --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]