On 03.09.2008 21:00:10 Samuel Penn wrote: > > Hi all, > > I'm currently using FOP 0.93, and I've just started looking at > using SVG images in the rendered PDFs. One thing that I have > noticed is that the image size of the resulting PDF grows > considerably. > > It would appear that if I import an SVG multiple times, the > resulting PDF includes a new instance of the image. If I have > a 20k SVG displayed in the header of a 20 page document, then > it adds 400k to the PDF (before compression). Is this correct?
To be expected in FOP 0.93, yes. > If so, is there a way around it? My plan is to use a small > number of SVGs a large number of times, so being able to embed > an image once, and simply reference it each time it is used in > the PDF would greatly reduce space. If you switch to FOP 0.95, as Pascal suggested, the file sizes should get smaller as FOP should be able to paint more text as text rather than convert almost all text to graphics. Of course, you'll only profit if there's text in the SVG. But for the issue about only including the SVG once, that is currently not possible. We've got a task hanging around somewhere to generate the SVG as a form object in PDF. That way it could be reused multiple times. The tricky part here is to preserve any links inside the SVG and to make them appear in the right place on the page. This would have to be solved first. Nobody seems to have had an itch, yet, I'm afraid. > If this isn't the case, then I obviously need to try and > figure out why my PDFs seem to grow considerably if I > repeat the same image. > > I'm mostly importing SVGs as background images, but some are > inserted with <fop:external-graphic> > > Thanks. > > -- > Be seeing you, http://www.glendale.org.uk > Sam. Mail/IM (Jabber): [EMAIL PROTECTED] > Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
