Loading ...
Sorry, an error occurred while loading the content.

What do you use for best qualifty rendering ?

Expand Messages
  • Pascal Marcou
    Hi all, I made some tries with to render an XML file into PDF. My XML file include SVG. * FOP It seems that FOP doesn t understand absolute-position. FOP
    Message 1 of 4 , Apr 2 11:24 PM
    • 0 Attachment
      Hi all,

      I made some tries with to render an XML file into PDF.
      My XML file include SVG.

      * FOP
      It seems that FOP doesn't understand absolute-position.
      FOP undestands inline-objects and use batik to convert SVG.
      But the quality of the converted images is low.
      Do you get the same issue ?

      * XEP
      it understands absolute-position, good.
      But ... FOP doesn't understand inline-objects, so I must convert SVG
      images by myself ....
      If I use batik, the quality is low, as with FOP.

      MY QUESTION :
      What do you use for best quality rendering ?

      Thanks.

      Pascal Marcou
    • W. Eliot Kimber
      ... Antenna House XSL Formatter supports SVG on Windows using the Adobe SVG plugin and provides a Java API (but is not native Java). For XEP, you could
      Message 2 of 4 , Apr 3 9:04 AM
      • 0 Attachment
        Pascal Marcou wrote:
        > Hi all,
        >
        > I made some tries with to render an XML file into PDF.
        > My XML file include SVG.
        >
        > * FOP
        > It seems that FOP doesn't understand absolute-position.
        > FOP undestands inline-objects and use batik to convert SVG.
        > But the quality of the converted images is low.
        > Do you get the same issue ?
        >
        > * XEP
        > it understands absolute-position, good.
        > But ... FOP doesn't understand inline-objects, so I must convert SVG
        > images by myself ....
        > If I use batik, the quality is low, as with FOP.

        Antenna House XSL Formatter supports SVG on Windows using the Adobe SVG
        plugin and provides a Java API (but is not native Java).

        For XEP, you could preprocess the SVG graphics with Batik and then use
        an XSLT on the FO instance to rewrite the graphic reference URLs to
        point to the Batik-generated graphics.

        But you may still find that the graphic quality of rasterized SVG is too
        low, regardless of what technology you use. The only complete solution
        would be an SVG-to-PostScript/EPS transform, which as far as I can
        determine does not yet exist.

        Cheers,

        E.
        --
        W. Eliot Kimber, eliot@...
        Consultant, ISOGEN International

        1016 La Posada Dr., Suite 240
        Austin, TX 78752 Phone: 512.656.4139
      • Klaas_Bals@inventivedesigners.com
        ... Eliot, I know that you know, but I wanted to make this clear to everyone: SVG is not per definition bad and postscript good. The problem lies in
        Message 3 of 4 , Apr 4 12:22 AM
        • 0 Attachment
          "W. Eliot Kimber" <eliot@...> wrote on 2003-04-03 19:04:45:

          > Pascal Marcou wrote:
          > > Hi all,
          > >
          > > I made some tries with to render an XML file into PDF.
          > > My XML file include SVG.

          > But you may still find that the graphic quality of rasterized SVG is too
          > low, regardless of what technology you use.

          Eliot, I know that you know, but I wanted to make this clear to everyone:
          SVG is not per definition bad and postscript good. The problem lies in
          rasterizing the drawing. If you rasterize SVG or PS you get equally bad
          results.

          If SVG would be rendered natively by XSL-FO formatters, it would give equal
          results to embedding PS/EPS.

          > The only complete solution
          > would be an SVG-to-PostScript/EPS transform, which as far as I can
          > determine does not yet exist.

          I think SVG to PS would be an intermediate solution, and native SVG support
          would be the 'only complete solution', especially in this XML world.

          When rasterizing, choose a high resolution, so the artifacts of rasterizing
          become less visible...

          Best regards,
          -----
          Klaas Bals - Scriptura Development Manager

          Scriptura - a WYSIWYG XSL-FO editor: www.inventivedesigners.com/scriptura

          Inventive Designers
          Direct Phone: +32 - 3 - 8210183
          Office Phone: +32 - 3 - 8210170
          Office Fax: +32 - 3 - 8210171
          Email: Klaas_Bals at inventivedesigners dot com
        • W. Eliot Kimber
          ... Note that, as I posted yesterday in a different thread on this list, that with Batik 1.5 and the latest FOP release candidate, you can render SVG to vector
          Message 4 of 4 , Apr 4 6:22 AM
          • 0 Attachment
            Klaas_Bals@... wrote:
            > "W. Eliot Kimber" <eliot@...> wrote on 2003-04-03 19:04:45:
            >
            >>Pascal Marcou wrote:
            >>
            >>>Hi all,
            >>>
            >>>I made some tries with to render an XML file into PDF.
            >>>My XML file include SVG.
            >
            >>But you may still find that the graphic quality of rasterized SVG is too
            >>low, regardless of what technology you use.
            >
            > Eliot, I know that you know, but I wanted to make this clear to everyone:
            > SVG is not per definition bad and postscript good. The problem lies in
            > rasterizing the drawing. If you rasterize SVG or PS you get equally bad
            > results.
            >
            > If SVG would be rendered natively by XSL-FO formatters, it would give equal
            > results to embedding PS/EPS.
            >
            >
            >>The only complete solution
            >>would be an SVG-to-PostScript/EPS transform, which as far as I can
            >>determine does not yet exist.

            Note that, as I posted yesterday in a different thread on this list,
            that with Batik 1.5 and the latest FOP release candidate, you can render
            SVG to vector PDF, eliminating most of the quality problems. There are
            still some documented issues with the resolution of raster graphics
            embedded in the original SVG, but for line drawings, the resulting
            quality should be as good as it can be (modulo any bugs in the code).
            This is implemented as a Batik "rasterizer" that uses code from the FOP
            library (I think--I'm still a little fuzzy on exactly how the PDF
            rasterizer code is organized, even after looking at the source code for
            the main Batik Rasterizer classes).

            This largely addresses the concerns I've had about using SVG instead of
            native PostScript graphics.

            Even if you are using an FO processor that does not support SVG directly
            (or does not provide a way to integrate Batik directly) you could easily
            create an XSLT or Java processor that would take an FO instance, find
            all the inline or external graphics that contain or reference SVG
            graphics, call the PDF rasterizer to generate EPS files, and then write
            out a new FO instance with the URLs for the graphics rewritten to point
            to the generated EPS graphics. To do this with XSLT would require a
            simple extension element or function to handle the calling of the
            rasterizer, but that would probably be easier to implement than writing
            a DOM application to do the transform (but maybe not, now that I think
            about it--a DOM identity transform is pretty basic stuff).

            Cheers,

            E.
            --
            W. Eliot Kimber, eliot@...
            Consultant, ISOGEN International

            1016 La Posada Dr., Suite 240
            Austin, TX 78752 Phone: 512.656.4139
          Your message has been successfully submitted and would be delivered to recipients shortly.