Affects Version/s: trunk
Fix Version/s: None
When embedding SVG images (such as a logo) in a fo:static-content the SVG instructions (as converted to Postscript) gets inlined on every page of the generated PDF. Thus, the image doesn't exist only once in the PDF (as it should), but once for every page of the PDF.
This balloons the size of the PDF.
Test case is attached.
- The test case has 50 pages. Execute the test with -pdf test-50p.pdf.
- Now edit svg-test-case.xsl and reduce the body content to only 1 page.
- Execute again, but this time with -pdf test-1p.pdf.
- Now compare size of the two PDFs. They should be almost same size because there's virtually no body text on each page so it should matter very little in size if the PDF is 1 page or 50 pages. Yet, you'll notice that the PDF with the 50 pages is almost 50 times as large as the PDF with only one page. The reason is of course that the SVG gets copied into each and every page rather than simply existing once in the PDF as a common resource and then referenced on each page.
For raster graphics images this seems to be done correctly, meaning the image doesn't get duplicated with each page. So it seems to be a problem related to vector graphics.
But raster graphics is not an option. They are simply too ugly (doesn't scale, of course).