Jamie Browning wrote:

Forgive my ignorance of PDF but I would like to ask a couple of high-level questions about the transcoder...

The SVG2PDF transcoder that is included with Batik, this is actually produced by the FOP project right?

Well the PDF part is. The provide an implementation of the Java Graphics2D interface that renders to PDF instead of the screen (or a printer).

In what sense is the SVG 'transcoded' into PDF? Is an SVG <circle> element converted into a relevant PDF element (I don't think PDF is XML)?

As much as possible the geometry is converted to PDF primitives. So an SVG circle would likely become a series of 4 cubic Beziers. Which isn't 100% accurate but is very close.

Or is the SVG image placed as a rasterized bitmap in the PDF?

For certain features of SVG it isn't possible to do a direct mapping (in particular anything that has a filter effect applied will be inserted as a raster).


If so what format (PNG/TIFF)?

I'm not 100% certain, I would guess PNG, but JPEG is also likely.

What happens to script elements?

There is an option to run 'onload' events before transcoding occurs, but basically script is ignored. The "open" versions of PDF are static.

Is the FOP transcoder essentially for static SVG images.

Essentially.

The reason I am asking is because I recently ran Kevin Lindsays' svg2pdf.pl script. What it seems to me is that the SVG has been inserted as some low-level object, much like using the <object>/<embed> tag in HTML. When you view the document in Reader then the SVG Viewer renders the SVG and still retains all its interactivity etc. Is this just a totally Adobe solution, or could the same thing be achieved by creating the PDF through the FOP transcoder?

This is an Adobe thing (people have reverse engineered some of it) that basically triggers the Adobe SVG Viewer inside of Acrobat. It might be possible for Batik to do something similar but this only works with recent versions of Adobe Acrobat Reader (actually I think you need a reader extension for this to work).

   There are also lots of complications around externally referenced
content that would make this difficult to make a 'general' solution.

Once again sorry for my PDF ignorance. But I have a use case where I would like to embed a dynamic SVG graph into a predominantly textual PDF and still retain the ability to "drill-down" through the data.

This whole thing is a bit confusing anyway, I mean how does printing relate to dynamic documents, when print is a static medium?

I think you can embed two versions of the "page" and the static one is used for printing but I don't really know the details.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to