Am 10.01.2017 um 23:37 schrieb Gilad Denneboom:
Hi all,

I'm trying to manipulate an existing image in my PDF file (double it in
size, for example), but I'm coming up short-handed... Any tips on how to
approach this using PDFBox? Is it at all possible?

Thanks in advance!


The easiest way would be to edit the PDF. Run WriteDecodedDoc to get an uncompressed PDF, find where the image is invoked, then change the "cm" parameters just before the image is invoked. Usually the cm command is like this:

width 0 0 height xpos ypos cm

(You can also view it with PDFDebugger, but you can't change it)


if you edit the PDF make sure that the offsets stay identical. (position of "endstream")


When done, open the PDF with Adobe Reader and save it. It will be compressed again.


Tilman


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to