xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maciej Płaza <maciej.pl...@geosolution.pl>
Subject FOP 2.0 - SVG to PDF font rendering.
Date Mon, 07 Dec 2015 11:40:05 GMT

I have quite big problem with fonts rendering using FOP 2.0 with Batik 
1.8. Every char has grey border around it and I don't know why. With FOP 
1.1 and Batik 1.7 everything works ok. When I export my SVG before 
transforming it to PDF everything is ok too.
Example.png - screenshot of result PDF.

My fop.xconf:

    <?xml version="1.0"?>
    <fop version="1.0">
       <default-page-settings height="11in" width="8.26in"/>

         <renderer mime="application/pdf">


         <renderer mime="application/postscript">

         <renderer mime="application/vnd.hp-PCL">

         <renderer mime="image/svg+xml">
           <format type="paginated"/>
           <link value="true"/>
           <strokeText value="false"/>

         <renderer mime="application/awt">

         <renderer mime="image/png">

         <renderer mime="image/tiff">

         <renderer mime="text/xml">

         <renderer mime="text/plain">
           <pageSize columns="80"/>

Part of the layout where SVG is embeded (<wykres/> is imported as 
instream-foreign-object tag):

    <fo:block-container absolute-position="absolute" height="175.56mm"
    left="5mm" top="75mm" width="175.42mm" >
         <fo:block text-align="center">

Java code (pdfStream is ByteArrayOutputStream):

    DefaultConfigurationBuilder cfgBuilder = new
    Configuration cfg = cfgBuilder.buildFromFile(new File(absPath));
    FopFactoryBuilder fopFactoryBuilder = new FopFactoryBuilder(new
    FopFactory fopFactory = fopFactoryBuilder.build();
    Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, pdfStream);

    Source src = new DOMSource(fopDocument);
    Result res = new SAXResult(fop.getDefaultHandler());

    Transformer transformer =
    transformer.transform(src, res);

Can anyone help?

Maciej Płaza.

View raw message