1

I need to produce an AFP document that contains a lot of images. I'm creating an AFP file using FOP. XSL has references to images that are included in the document. The produced AFP file size is approximately 10 times larger than the included images, so having about 15 MB of images means the resulting AFP is around 150 MB. A PDF file that is produced using the same images and XSL is about the size of the included images. I have created a test program that includes only images of size 1.7 MB. A PDF file is exactly 1.7 MB. An AFP file is 15 MB and contains only an image.

1 Answers1

1

I have found the answer in this document https://xmlgraphics.apache.org/fop/1.1/output.html

By default, JPEG images are rasterized to a bitmap and the bitmap is included in the AFP doc. Attribute native="true" in images allows to include jpeg image as it is, i.e. with default compression. For more details, look at the document above.