1

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...

Tony Graham
  • 7,306
  • 13
  • 20
papastavro
  • 61
  • 2
  • 7
  • Which AH Formatter version are you using? – Tony Graham Apr 13 '16 at 14:24
  • I am using 5.2 M5. I tried the extension you suggested. I reduced the PDF size about 5-10 %. – papastavro Apr 15 '16 at 05:24
  • V5.2 is somewhat old. It's still supported, but it won't get any more enhancements. https://www.antennahouse.com/support/qa/QA-maintenance-V6.htm notes that both V6.0 MR1 and V6.3 R1 (from this year) had enhancements for reduced PDF file sizes. You could try an evaluation version of the current AH Formatter to see how well that works in your case. – Tony Graham Apr 15 '16 at 08:01
  • Thank you Tony, I'll test it with the evaluation version of V6.3. – papastavro Apr 19 '16 at 14:51

1 Answers1

1

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

Tony Graham
  • 7,306
  • 13
  • 20