<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN"
    "http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd">

<document>
  <header>
    <title>SVG Developer Issues</title>
  </header>
  <body>
    <p>See also <link href="../graphics.html#svg">SVG User Documentation</link> for more information.</p>
          <section>
            <title>Examples</title>
            <p>
These examples illustrate a number of issues relating to conversion
to PDF:
            </p>
  <table>
    <caption>SVG to PDF examples</caption>
    <tr>
      <th></th>
      <th>svg file</th>
      <th>png file</th>
      <th>pdf result</th>
    </tr>
    <tr>
      <td>images</td>
      <td><link href="svg/images.svg">images.svg</link></td>
      <td><!--link href="svg/images.png"-->images.png<!--/link--></td>
      <td><link href="svg/images.pdf">images.pdf</link></td>
    </tr>
    <tr>
      <td>svg linking</td>
      <td><link href="svg/link.svg">link.svg</link></td>
      <td><!--link href="svg/link.png"-->link.png<!--/link--></td>
      <td><link href="svg/link.pdf">link.pdf</link></td>
    </tr>
    <tr>
      <td>gradients and patterns</td>
      <td><link href="svg/paints.svg">paints.svg</link></td>
      <td><!--link href="svg/paints.png"-->paints.png<!--/link--></td>
      <td><link href="svg/paints.pdf">paints.pdf</link></td>
    </tr>
    <tr>
      <td>various text and effects on text</td>
      <td><link href="svg/text.svg">text.svg</link></td>
      <td><!--link href="svg/text.png"-->text.png<!--/link--></td>
      <td><link href="svg/text.pdf">text.pdf</link></td>
    </tr>
    <tr>
      <td>transparent objects</td>
      <td><link href="svg/transparency.svg">transparency.svg</link></td>
      <td><!--link href="svg/transparency.png"-->transparency.png<!--/link--></td>
      <td><link href="svg/transparency.pdf">transparency.pdf</link></td>
    </tr>
  </table>
    <p>
 As can be seen most of the specific issues are handled.
    </p>
<note>
You will need Acrobat 5.0 to see transparency.
</note>
  <table>
    <caption>XSL:FO to PDF examples</caption>
    <tr>
      <th></th>
      <th>fo file</th>
      <th>pdf result</th>
    </tr>
    <tr>
      <td>embedding svg</td>
      <td><link href="fo/embedding.fo">embedding.fo</link></td>
      <td><link href="fo/embedding.fo.pdf">embedding.fo.pdf</link></td>
    </tr>
  </table>
          </section>
          <section>
            <title>Developer Notes</title>
            <p>
For most output formats in FOP the SVG is simply drawn into
an image with Batik.
For PDF there are a set of classes to handle drawing the
<link href="http://xml.apache.org/batik/architecture.html">GVT (Graphic Vector Toolkit)</link>
into PDF markup.
            </p>
          <section>
            <title>Classes</title>
            <p>
These are the relevant classes, found in the package org.apache.fop.svg :
    </p>
<ul>
<li><em>PDFGraphics2D</em>
<br/>
used for drawing onto a Graphics2D into an existing pdf document, used
internally to draw the svg.
</li>
<li><em>PDFDocumentGraphics2D</em>
<br/>
used to create a pdf document and inherits from PDFGraphics2D to do the
rest of the drawing. Used by the transcoder to create a standalone pdf
document from an svg. Can be used independantly the same as any Graphics2D.
</li>
<li><em>PDFTranscoder</em>
<br/>
used by Batik to transcode an svg document into a standalone pdf, via
PDFDocumentGraphics2D.
</li>
</ul>
          </section>
          <section>
            <title>Ideas</title>
            <p>
Batik can convert ttf to svg font.
This svg font could be converted into a pdf stroked font
(type 3 font).
        </p>
      </section>
    </section>
  </body>
</document>

