You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Aaron Rustad <Aa...@Entero.com> on 2005/01/19 22:58:55 UTC

Different Renderers...

My application currently renders a PDF document in the AWTRenderer.
Often times, these documents are quite large and use more memory than is
available to the client's machine. One feature we must provide is this
ability to save a PDF. My question is this, is there anyway to quickly
and efficiently pipe the PDF information that was already transformed to
be displayed in the AWTRenderer to file, or do I have to do another
transformation?

 

Thanks!

AR.


Re: Different Renderers...

Posted by Jeremias Maerki <de...@greenmail.ch>.
Careful. You're not rendering a PDF document with the AWTRenderer. An
internal representation (the area tree) of the layouted document is
rendered by the AWTRenderer to a window or to a printer (through the use
of the Java2D Graphics2D interface). No PDF involved here. If you create
a PDF file using FOP a different renderer (the PDFRenderer) converts the
internal representation to a PDF document. These are two different
renderers. So much for establishing the context.

It is theoretically possible to create a PDF through the AWTRenderer.
FOP contains a Graphics2D implementation that generates PDF. This is
primarily used for converting SVG to PDF (through Batik). I could go to
lengths what is involved in making this happen but let me just say that
it's not worth the trouble with FOP 0.20.5. Simply render your FO
document a second time through the PDFRenderer. This might (!) be a bit
slower but you get there much quicker and with a high quality although
with the restriction that due to possible differences in font metrics
the generated document may not look 100.00% the same. But with the other
approach the same is true.

I hope this helps.

On 19.01.2005 22:58:55 Aaron Rustad wrote:
> My application currently renders a PDF document in the AWTRenderer.
> Often times, these documents are quite large and use more memory than is
> available to the client's machine. One feature we must provide is this
> ability to save a PDF. My question is this, is there anyway to quickly
> and efficiently pipe the PDF information that was already transformed to
> be displayed in the AWTRenderer to file, or do I have to do another
> transformation?


Jeremias Maerki


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