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 fr...@gerling.com on 2003/02/17 10:18:19 UTC

Different page layout using pdf renderer or awt renderer

Hi.
Rendering a document through the awtrenderer (sent directly to the printer)
doesn't give me the same result than rendering the samep document throught
the PDF renderer (PDF is generated in a servlet, then open in a browser
window). 
Both modules share the embedded fonts and xslt file.
Any hints?
Frédéric

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


Re: Different page layout using pdf renderer or awt renderer

Posted by Joop Vriend <jo...@ddnh.nl>.
Jeremias Maerki wrote:
> This happens because the two renderer use a different font source which
> results in slightly different font metrics for the same fonts. This in
> turn has consequences on the layout. There's currently nothing you can
> do to get the same output other than by switching renderers. PDF and
> PostScript, for example, should produce almost exactly the same output
> because they can use the same font source. That's not possible with AWT.

But PostScript output still has some limitations as pointed out at

http://xml.apache.org/fop/output.html#xpointer(/document[1]/body[1]/section[1]/section[4])

Indeed I have experienced differences in character spacing. Perhaps 
because we used *negative* letter-spacing, while on line 691 of the 
PSRenderer.java of the FOP 0.20.4 source, the check for letter-spacing 
is as follows:

if (area.getFontState().getLetterSpacing() > 0) ...

??

<snip/>

Joop Vriend.


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


Re: Different page layout using pdf renderer or awt renderer

Posted by Jeremias Maerki <de...@greenmail.ch>.
This happens because the two renderer use a different font source which
results in slightly different font metrics for the same fonts. This in
turn has consequences on the layout. There's currently nothing you can
do to get the same output other than by switching renderers. PDF and
PostScript, for example, should produce almost exactly the same output
because they can use the same font source. That's not possible with AWT.
It is even possible that different JDK version lead to different results
with the AWT renderer. Please be aware that the AWT renderer doesn't
directly support font embedding. Font embedding is done by the printer
driver of your operating system if it is enabled there.

On 17.02.2003 10:18:19 frederic.kieffer wrote:
> Rendering a document through the awtrenderer (sent directly to the printer)
> doesn't give me the same result than rendering the samep document throught
> the PDF renderer (PDF is generated in a servlet, then open in a browser
> window). 
> Both modules share the embedded fonts and xslt file.
> Any hints?


Jeremias Maerki


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