Thanks for the so many replies.
Ben's idea is especially helpful. I've been following
up on that in last few days.
Looks like in the output method in PDFDocument.java,
we can intercept each PDFObject before it is printed
to pdf file, if it's a PDFStream object, we can decode
the data string and do the replacement Ben suggested,
and then put it back to PDFStream.
I hope I don't miss any piece.
LZ
--- Ben Galbraith [EMAIL PROTECTED] wrote:
iText can't do the manipulation in question, but
Multivalent
(sourceforge) might do the trick. Multivalent
didn't successfully
uncompress the objects in my largish 80 MB PDF,
however.
I wound up home-growing my own utilities to
post-process the PDF as a
learning exercise. Took about a day. PDF is a
well-documented format
and uses well-documented widely-supported
compression algorithms.
We actually use iText to create composite PDFs (two
or more PDFs placed
on top of each other) and our utility to add the
spot colors or convert
to CMYK programmatically.
I wish I could share some of our code... working on
getting approval to
open-source some of it.
Ben
George Yi wrote:
I heard Jeremias mentioned Chamelon(Spell) Colour
can do the post process
but I never tried.
George
-Original Message-
From: Clay Leeds [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 11:59 AM
To: [EMAIL PROTECTED]
Subject: Re: CMKY
Ben Galbraith wrote:
FOP does support CMYK JPEGs -- there's a previous
thread on this issue
that I participated in that should document it
fairly well.
XSL-FO may provide support for CMYK through its
color space features;
haven't studied it enough to grok it, not sure.
FOP doesn't not support CMYK for the elements it
renders. However, I've
found that post-processing the PDF is actually
fairly straight-forward
and enables introduction of both spot colors and
CMYK colors. This
process involves searching through each object in
the PDF and replacing
the RGB commands (PDF: rg/RG) with CMYK (PDF: k/K)
or color space (PDF:
cs/CS, scn/SCN) commands. It seemed scary at
first, but actually not
that bad. If anyone has interest in learning more
about this technique,
let me know.
Ben
I'm interested in this topic more because I'd like
to add this type of
information to the FOP web site than for any other
reason (my company
currently doesn't really care *that* much about
color--but I'm
interested!). I assume you use some sort of
post-processor like iText or
something? If you could create some sort of
tutorial or something on how
to do this, I think it would be *very* useful.
Sounds intriguing!
Web Maestro Clay
-
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]
-
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]