xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: SVG as Form Xobjects?
Date Wed, 17 Mar 2010 11:13:36 GMT
Hi Jussi

Yes, at the moment FOP doesn't support generating SVG graphics as Form
XObjects. So far noone seems to have found it important enough to invest
time in this.

Doing that is perfectly feasible but involves at least one trouble
spot:
- SVG links result in link annotations in PDF and they require absolute
coordinates for the page they are on. They cannot be attached to a Form
XObject. So if you have the same SVG multiple times in a PDF document,
the link annotations would still have to be generated again in the right
spot for each link. Doable but complicates matters obviously.

If generating a Form XObject makes sense for SVG in an
fo:instream-foreign-object, I'm not sure.

For your case, you can do a work-around: Convert the SVG to PDF with the
PDFTranscoder and then use my PDF plug-in [1] to include the PDF which
does create Form XObjects for the imported pages. Or you can simply
convert the SVG to a bitmap.

[1] http://www.jeremias-maerki.ch/development/fop/index.html


On 16.03.2010 23:23:41 Jussi Paju wrote:
> Hi all,
> 
> Before I finally switch back to PHP-based PDF generators and return using
> FOP+Barcode4j only to generate vector barcodes to documents generated elsewhere,
> I would just like to ask confirmation for this:
> 
> Is it really so that at the moment FOP does not handle imported SVG's even in
> static areas any other way than re-importing the file again for every page
> generated?
> 
> I just generated about 900 invoice pages that all share same 160Kb SVG as their
> background and was stunned about the size of the resulting PDF - You do the
> math. ;) When doing this properly, the file shouldn't have been more than few
> megabytes maximum instead of 100+.
> 
> 
> Br,
> Jussi Paju



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message