reduce size of PDF generated with FOP

2019-06-06 01:54发布

问题:

I have unsuccessfully browsed this site (that has so often saved my life in the past) and the web for an answer to this question:

I use Java, XSL-FO and FOP to generate PDFs that consist in one or more pages of data and images, each page having a header and a footer containing images themselves. These header and footer are repeated on each and every page of the PDF documents. The images are responsible for a large part of the size of the resulting PDF (about 50 %). I noticed that, by converting them from JPEG to TIFF, and by reducing their resolution, I was able to reduce considerably the size of the PDF as well. But I now have the feeling that I have reached a dead-end as far as images as concerned.

The PDFs are still very huge, compared to those that used to be generated with FrameMaker, the Adobe PDF generation system that we're willing to get rid of. And I'm sorry to say that I can't think of another way to reduce the PDFs' size, as the Web mainly talks about pre-processing images in order to make PDFs smaller. I was wondering whether, maybe, it would be possible in a way or another to tell FOP to repeat the images in all headers and footers in some kind of way so that the images would be embedded only once in the document and just "mirrored" on the other pages. Plus, there ought to be other ways to reduce the PDF size, apart from images, don't you think?

I would highly appreciate any advice on this topic. Thanks a lot in advance for your time and help.

Erwann