Am 18.01.2019 um 20:49 schrieb JZ Q:
Hi everyone,
I have a task to convert pdf files which have colored photo in it to
grayscale. How do I do it using pdfbox? Any guidance? Thank you.
First you get the page, then the resources, then the names, then the
image with the name (seacrh in the APIs for all these). Then you convert
to a BufferedImage, that one you convert to b/w or grayscale. Then you
create a new XImage (with LosslessFactory) and reassign that one to the
resources but by using the same name. It is important that the new image
has the same size.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]