pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matteo Gamboz <gam...@medialab.sissa.it>
Subject Re: resize inline images
Date Thu, 28 Feb 2019 16:41:16 GMT
... 
> Please retry there strategy where you had the closing error (fix the
> bug I mentioned), and post enough code and upload the source and
> result PDFs.

Hi Tilman, thank you for the comments and suggestions.

I think I'm reaching a good point; my approach is now as follows:
. extend PDFStreamEngine and process all operators,
. when I find an Inline Image, save away its transformation matrix
. after finishing with the operators, I parse the page into tokens
. and scan through the tokens
. when I find the BI operator
. I use the transformation matrix (saved before)
. and generate a new image,
. then I substitute the BI token with the new image

I must yet fix the image parameters to correctly represent the new
image data, but it seems feasible.

If anyone is interested, I'm attaching my last code and an example pdf
that I'm trying to modify. If you spot any obvious mistake I would be
grateful for suggestions :-)

m



Mime
View raw message