papastavro
papastavro

Reputation: 61

Generated PDF is double the size of the original PDF

I have a PDF with 8 pages. I use the pages in this PDF as background images to create a new PDF with XSL-FO via Antenna House. This new PDF is nearly the same as the original PDF, just with some additional personalized text content.

What I am wondering about is that the file size of the original PDF is about 24 MB, but the new PDF is twice the size of the original PDF (approx. 56 mb).

To embed the backgound PDF pages I am using the following FO code

<fo:page-sequence master-reference="Inhalt" initial-page-number="9"
    background-repeat="no-repeat" background-position="center"
    background-image="sample_pdf.pdf#page=8">

Is there any explanation why the new PDF is twice the size of the original PDF?

Regards...

Upvotes: 1

Views: 142

Answers (1)

Tony Graham
Tony Graham

Reputation: 8068

You may get a better result if you use the axf:background-repeat extension on your fo:simple-page-master so that AH Formatter uses successive pages from the one PDF as backgrounds:

<fo:simple-page-master axf:background-image="sample_pdf.pdf#page=1-"
                       axf:background-repeat="paginate" ...>

See https://www.antennahouse.com/product/ahf63/ahf-pdf.html#pdf-embedding

Upvotes: 1

Related Questions