]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Integrate content of the two documents.
authorWilliam Victor Mote <vmote@apache.org>
Mon, 21 Apr 2003 23:56:10 +0000 (23:56 +0000)
committerWilliam Victor Mote <vmote@apache.org>
Mon, 21 Apr 2003 23:56:10 +0000 (23:56 +0000)
Add table for the renderer implementations.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196300 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/design/renderers.xml

index d341ee3cf01211968ab5b489fb53f19216f8429b..de8b461ecd3e897df52038df8986c7d9a579a72d 100644 (file)
@@ -10,7 +10,7 @@
     </authors>
   </header>
   <body>
-    <section>
+    <section id="intro">
       <title>Introduction</title>
       <p>A renderer is primarily designed to convert a given area tree into the output
 document format. It should be able to produce pages and fill the pages
@@ -22,108 +22,148 @@ from the area tree or depends on the destination of the document.</p>
 The area tree is simply a representation of the pages and the placement
 of text and graphical objects on those pages.</p>
       <p>The renderer will be given each page as it is ready and an output stream
-to write the data out. The renderer is responsible for managing the
-output format and associated data and flow.</p>
-    </section>
-    <section>
-      <title>Renderers</title>
-      <p>A renderer is used to convert the Area Tree into the output document.
-The renderer is given the tree one page at a time. All pages are supplied
-in the order they appear in the document. In order to save memory it is
-possble to render the pages out of order. Any page that is not reeady to
+to write the data out.
+All pages are supplied in the order they appear in the document.
+In order to save memory it is
+possble to render the pages out of order. Any page that is not ready to
 be rendered is setup by the renderer first so that it can reserve a space
-or reference for when the page is ready to be rendered.</p>
-      <p>The AbstractRenderer does most of the work to iterate through the area
-tree parts. This means that the most renderers simply need to implement
-the specific parts with inserting text, images and lines. The methods can
-easily be overridden to handle things in a different way or do some extra
-processing.</p>
+or reference for when the page is ready to be rendered.The renderer is responsible for managing the
+output format and associated data and flow.</p>
     </section>
-    <section>
+    <section id="fonts">
       <title>Fonts</title>
-      <p>The fonts are setup by the renderer being used. The font metrics are used
+      <p>Because font metrics (and therefore layout) are obtained in two different ways depending on the renderer, the renderer actually sets up the fonts being used. The font metrics are used
 during the layout process to determine the size of characters.</p>
     </section>
-    <section>
+    <section id="context">
       <title>Render Context</title>
-      <p>The render context is used by handlers. It contains information about the
-current state of the renderer. Such as the page, the position and any
-other miscellanous objects that are required to draw into the page.</p>
+      <p>The render context is used by handlers.
+It contains information about the current state of the renderer, such as the page, the position, and any other miscellanous objects that are required to draw into the page.</p>
     </section>
     <section>
       <title>XML Handling</title>
-      <p>A document may contain information in the form of XML for an image or
-instream foreign object. This XML is handled
-through the user agent. A standard extension for PDF is the SVG handler.</p>
-      <p>If there is XML in the SVG namespace it is given to the handler which
-renders the SVG into the pdf document at the given location.
+      <p>A document may contain information in the form of XML for an image or instream foreign object.
+This XML is handled through the user agent.
+A standard extension for PDF is the SVG handler.</p>
+      <p>If there is XML in the SVG namespace it is given to the handler which renders the SVG into the pdf document at the given location.
 This separation means that other XML handlers can easily be added.</p>
     </section>
     <section>
       <title>Extensions</title>
-      <p>Document level extensions are handled with an extension handler. This
-handles the information from the AreaTree and adds renders it to the
-document. An example is the pdf bookmarks. This information first needs to
-have all references resolved. Then the extension handler is ready to put
-the information into the pdf document.</p>
+      <p>Document level extensions are handled with an extension handler.
+This handles the information from the AreaTree and adds renders it to the document.
+An example is the pdf bookmarks. This information first needs to have all references resolved.
+Then the extension handler is ready to put the information into the pdf document.</p>
     </section>
-    <section>
-      <title>Types</title>
-      <section>
-        <title>PDF</title>
-        <p>This uses the PDFDocument classes to create a PDF document. This supports
-out of order rendering as it is possible to reserve a pdf page object that
-can be later filled. Most of the work is to insert text or create lines.
-SVG is handled by the XML handler that uses the PDFGraphics2D and batik to
-draw the svg into the pdf page.</p>
-        <p>This also allows for font embedding.</p>
-      </section>
-      <section>
-        <title>SVG</title>
-        <p>This creates a single svg document that contains all the pages rendered
-with page sequences horizontally and pages vertically. This also adds
+    <section id="implement">
+      <title>Renderer Implementations</title>
+      <table>
+        <tr>
+          <th>Name</th>
+          <th>Type</th>
+          <th>Font Source</th>
+          <th>Font Embedding?</th>
+          <th>Out of Order Rendering?</th>
+          <th>Notes</th>
+        </tr>
+        <tr>
+          <td>PDF</td>
+          <td>Paginated</td>
+          <td>FOP</td>
+          <td>Yes</td>
+          <td>Yes</td>
+          <td>Uses the PDFDocument classes to create a PDF document. Most of the work is to insert text or create lines. SVG is handled by the XML handler that uses the PDFGraphics2D and batik to
+draw the svg into the pdf page.</td>
+        </tr>
+        <tr>
+          <td>PostScript</td>
+          <td>Paginated</td>
+          <td>FOP</td>
+          <td>Not implemented</td>
+          <td>?</td>
+          <td>Similar to PDF.</td>
+        </tr>
+        <tr>
+          <td>PCL</td>
+          <td>Paginated</td>
+          <td>FOP</td>
+          <td>?</td>
+          <td>?</td>
+          <td>Similar to PDF.</td>
+        </tr>
+        <tr>
+          <td>SVG</td>
+          <td>Paginated</td>
+          <td>?</td>
+          <td>?</td>
+          <td>?</td>
+          <td>Creates a single svg document that contains all the pages rendered
+with page sequences horizontally and pages vertically. Adds
 links between the pages so that it can be viewed by clicking on the page
-to go to the next page.</p>
-      </section>
-      <section>
-        <title>TXT</title>
-        <p>This simply outputs to a text document.</p>
-      </section>
-      <section>
-        <title>AWT</title>
-        <p>This draws the pages into an AWT graphic.</p>
-      </section>
-      <section>
-        <title>PS and PCL</title>
-        <p>Similar to PDF.</p>
-      </section>
-      <section>
-        <title>XML</title>
-        <p>Creates an XML file that represents the AreaTree.</p>
-      </section>
-      <section>
-        <title>Print</title>
-        <p>This prints the document using the java printing facitlities. The AWT
-rendering is used to draw the pages onto the printjob.</p>
-      </section>
-      <section>
-        <title>RTF and MIF</title>
-        <p>These formats do not use this rendering mechanism.</p>
-      </section>
+to go to the next page.</td>
+        </tr>
+        <tr>
+          <td>TXT</td>
+          <td>Paginated</td>
+          <td>N/A</td>
+          <td>N/A</td>
+          <td>No</td>
+          <td>Outputs to a text document.</td>
+        </tr>
+        <tr>
+          <td>AWT</td>
+          <td>Paginated</td>
+          <td>AWT</td>
+          <td>N/A</td>
+          <td>?</td>
+          <td>This draws the pages into an AWT graphic.</td>
+        </tr>
+        <tr>
+          <td>XML</td>
+          <td>Paginated</td>
+          <td>FOP</td>
+          <td>No</td>
+          <td>No</td>
+          <td>Creates an XML file that represents the AreaTree.</td>
+        </tr>
+        <tr>
+          <td>Print</td>
+          <td>Paginated</td>
+          <td>AWT</td>
+          <td>?</td>
+          <td>No</td>
+          <td>Prints the document using the java printing facitlities. The AWT
+rendering is used to draw the pages onto the printjob.</td>
+        </tr>
+        <tr>
+          <td>RTF</td>
+          <td>Structural</td>
+          <td>N/A</td>
+          <td>N/A</td>
+          <td>No</td>
+          <td>Structural format uses a different rendering mechanism.</td>
+        </tr>
+        <tr>
+          <td>MIF</td>
+          <td>Structural</td>
+          <td>N/A</td>
+          <td>N/A</td>
+          <td>No</td>
+          <td>Structural format uses a different rendering mechanism.</td>
+        </tr>
+      </table>
     </section>
-    <section>
+    <section id="add">
       <title>Adding a Renderer</title>
-      <p>It is also possible to add other renderers. The renderer simply needs to
-implement the Renderer interface. The AbstractRenderer does most of what
-is needed so it is better to extend this. This means that you only need to
-implement the basic functionality such as text and lines.</p>
+      <p>You can add other renderers by implementing the Renderer interface.
+However, the AbstractRenderer does most of what is needed, including iterating through the tree parts, so it is probably better to extend this.
+This means that you only need to implement the basic functionality such as text, images, and lines.
+AbstractRenderer's methods can easily be overridden to handle things in a different way or do some extra processing.</p>
     </section>
-    <section>
+    <section id="multiple">
       <title>Multiple Renderers</title>
       <p>The layout of the document depends mainly on the font being used.
-If two renderers have the same font metrics then it is possible to render
-the Area Tree in each renderer. This can be handled by the AreaTree
-Handler.</p>
+If two renderers have the same font metrics then it is possible to use the same Area Tree to render both. This can be handled by the AreaTree Handler.</p>
     </section>
   </body>
 </document>