I need to create a PDF file automatically (preferable via a batch process / command-line, the optimum would be something XSLT/SAXON-based).
The PDF will have many pages (ca. 500), and each page contains nothing but a set of (partially overlapping) images (in scalable format, e.g. SVG or WMF).
But there is only a basic set of ~20 images used for this, and the various pages differ one from another only in the particular choice out of these 20 images.
The problem: If I use XSL-FO and feed it into the Apache FOP then the result is a PDF of approx. 300 MB file-size, because the image data is fed multiple times into the PDF.
Now I am looking for a possibility to create a PDF in a way such that the image data of these 20 images are present only once in the PDF, and each PDF-page uses only "links"/references to this set of image data (so that the resulting PDF-file has only ~2MB file-size).
I know that the PDF-language as such features such references, but of course, I am not interested to build a PDF-file directly, "low Level" ;-)
Any help/ideas would be highly appreciated! Thanks a lot!