On 18.04.2010 20:00, Andreas Lehmkuehler wrote:
Theoretically it should be possible to replace the used cs with PDFBox:
- load the pdf using PDDocument.load
- search for the used cs (in your case it seems to be named as Cs6)
- replace the cs
- save the pdf
If you really like to implement such a program, you should have a look
at the PDFDebugger which comes with PDFBox. You can use it to visualize
the content
of your pdf in a much more understandable way. The cs you are looking
for can
be found in the resources dictionary of the page.
Thanks a lot for your valuable feedback!
It looks as if the hardest part is step 3 (replace the cs)...I've got
everything else covered. I can confirm that the actual cs instance is a
org.apache.pdfbox.pdmodel.graphics.color.PDICCBased. However, since all
of this is new stuff for me I'm not yet certain what to do with that object.
Should I create a brand new cs (how to init the values)?
Should I get Java cs from it (would be
java.awt.color.ICC_ColorSpace.getProfile()) and work with that?
Working with the Java cs I saw that the one I'm interested in has a
java.awt.color.ICC_ProfileRGB. So, it would have been cool if there was
a way to replace the RGB values in that given profile :-(
I'll keep digging.
Cheers,
Marcel
--
Marcel Stör, http://www.frightanic.com
Couchsurfing: http://www.couchsurfing.com/people/marcelstoer
Skype: marcelstoer
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org