From: Keiron Liddle Date: Thu, 20 Sep 2001 10:12:38 +0000 (+0000) Subject: some small improvements to website docs X-Git-Tag: fop-0_20_3~48 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1b7e067ce9289dd31492650b13e3defc078d8711;p=xmlgraphics-fop.git some small improvements to website docs git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194470 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/xml-docs/fop/embedding.xml b/docs/xml-docs/fop/embedding.xml index 6a7884b70..d7f5aa58b 100644 --- a/docs/xml-docs/fop/embedding.xml +++ b/docs/xml-docs/fop/embedding.xml @@ -15,6 +15,8 @@ instantiate the class itself. The advantage of the latter is it enables runtime determination of Renderer and ElementMapping(s).

+ +

The simplest way to use Driver is to instantiate it with the InputSource and OutputStream, then set the renderer desired and call the run method. @@ -25,15 +27,30 @@ Driver driver = new Driver(new InputSource (args[0]), new FileOutputStream(args[1])); driver.setRenderer(RENDER_PDF); - driver.run(); -]]> + driver.run();]]> + +

You also need to set the Logger for logging messages, see + Jakarta Logkit + for more information. +

+

To setup the user config file you can do the following

+ options = new Options(userConfigFile);]]>

Once the Driver is set up, the render method is called. Depending on whether DOM or SAX is being used, the @@ -52,8 +69,7 @@ driver.setRenderer(Driver.RENDER_PDF); driver.setInputSource(new FileInputSource(args[0])); driver.setOutputStream(new FileOutputStream(args[1])); - driver.run(); -]]> + driver.run();]]>

You can also specify an xml and xsl file for the input.

Here is an example use of Driver with the XSLTInputHandler:

@@ -63,10 +79,22 @@ InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); XMLReader parser = inputHandler.getParser(); driver.setOutputStream(new FileOutputStream(outFile)); - driver.render(parser, inputHandler.getInputSource()); -]]> + driver.render(parser, inputHandler.getInputSource());]]>

Have a look at the classes CommandLineStarter or FopServlet for complete examples.

+ +

+If FOP is going to be used multiple times within your application +it may be useful to reuse certain objects to save time. +

+

+The renderers and the driver can both be reused. A renderer is reusable +once the previous render has been completed. The driver is reuseable +after the rendering is complete and the reset method is called. +You will need to setup the driver again with a new OutputStream, +IntputStream and renderer. +

+

In the directory xml-fop/docs/examples/embedding you can find a working example how to use Fop in a servlet. You can drop the fop.war into the webapps directory of Tomcat, then diff --git a/docs/xml-docs/fop/extensions.xml b/docs/xml-docs/fop/extensions.xml index f77f75f87..90b6d5e8f 100644 --- a/docs/xml-docs/fop/extensions.xml +++ b/docs/xml-docs/fop/extensions.xml @@ -33,8 +33,7 @@ Please see the SVG page for more details. Prerequisites - -]]> +]]>

It works similarly to a basic-link. There is also an external-destination property, but it isn't supported currently. See the pdfoutline.fo file in docs/examples/fo for a more complete example.

diff --git a/docs/xml-docs/fop/license.xml b/docs/xml-docs/fop/license.xml index 2bb39174f..7d184fdef 100644 --- a/docs/xml-docs/fop/license.xml +++ b/docs/xml-docs/fop/license.xml @@ -5,7 +5,7 @@ -

Copyright (C) 1999 The Apache Software Foundation. All rights reserved.

+

Copyright (C) 1999-2001 The Apache Software Foundation. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, diff --git a/docs/xml-docs/fop/limitations.xml b/docs/xml-docs/fop/limitations.xml index fd3b1288f..c2220c3be 100644 --- a/docs/xml-docs/fop/limitations.xml +++ b/docs/xml-docs/fop/limitations.xml @@ -32,36 +32,39 @@ 2) Cells have to contain block-level FOs. They can't contain straight character data.

A working basic example of a table looks like this:

-

<fo:table>

-

 <fo:table-column column-width="150pt"/>

-

 <fo:table-column column-width="150pt"/>

-

 <fo:table-body font-size="10pt" font-family="sans-serif">

-

  <fo:table-row>

-

   <fo:table-cell>

-

    <fo:block>text</fo:block>

-

   </fo:table-cell>

-

   <fo:table-cell>

-

    <fo:block>text</fo:block>

-

   </fo:table-cell>

-

  </fo:table-row>

-

  <fo:table-row>

-

   <fo:table-cell>

-

    <fo:block>text</fo:block>

-

   </fo:table-cell>

-

   <fo:table-cell>

-

    <fo:block>text</fo:block>

-

   </fo:table-cell>

-

  </fo:table-row>

-

  <fo:table-row>

-

   <fo:table-cell>

-

    <fo:block>text</fo:block>

-

   </fo:table-cell>

-

   <fo:table-cell>

-

    <fo:block>text</fo:block>

-

   </fo:table-cell>

-

  </fo:table-row>

-

 </fo:table-body>

-

</fo:table>

+

+ + + + + + + text + + + text + + + + + text + + + text + + + + + text + + + text + + + +]]> +

diff --git a/docs/xml-docs/fop/readme.xml b/docs/xml-docs/fop/readme.xml index 69e7db6a3..d9a15dddf 100644 --- a/docs/xml-docs/fop/readme.xml +++ b/docs/xml-docs/fop/readme.xml @@ -2,7 +2,7 @@ - +

FOP is the world's first print formatter driven by XSL formatting objects. It is a Java application that reads a formatting object @@ -15,7 +15,7 @@ You can download Fop including a precompiled version, the source code and many example files to get you started. Pointers to introductions into xsl:fo can be found in the - section specifications. Please be aware, that + resources section. Please be aware, that Fop is at the moment not a full implementation of the basic conformance level of the xsl:fo standard. You can find a list of supported flow objects and properties in the section Features and in section diff --git a/docs/xml-docs/fop/running.xml b/docs/xml-docs/fop/running.xml index 3c2a7ed44..8ee55f348 100644 --- a/docs/xml-docs/fop/running.xml +++ b/docs/xml-docs/fop/running.xml @@ -33,16 +33,14 @@ -x dump configuration settings
-q quiet mode
-c cfg.xml use additional configuration file cfg.xml
- -l lang the language to use for user information
- + -l lang the language to use for user information

[INPUT]
infile xsl:fo input file (the same as the next)
-fo infile xsl:fo input file
-xml infile xml input file, must be used together with -xsl
- -xsl stylesheet xslt stylesheet
- + -xsl stylesheet xslt stylesheet

[OUTPUT]
@@ -54,8 +52,7 @@ -pcl outfile input will be rendered as pcl file (outfile req'd)
-txt outfile input will be rendered as text file (outfile req'd)
-print input file will be rendered and sent to the printer
- see options with "-print help"
- + see options with "-print help"

[Examples]
@@ -65,8 +62,7 @@ Fop -xsl foo.xsl -xml foo.xml -pdf foo.pdf
Fop foo.fo -mif foo.mif
Fop foo.fo -print or Fop -print foo.fo
- Fop foo.fo -awt
- + Fop foo.fo -awt

diff --git a/docs/xml-docs/fop/todo.xml b/docs/xml-docs/fop/todo.xml index aa1effcbf..b2e12c8af 100644 --- a/docs/xml-docs/fop/todo.xml +++ b/docs/xml-docs/fop/todo.xml @@ -64,15 +64,10 @@ there are no invalid children. Should help process the layout better.
- -

-Support for proper logging with logKit. -

-

-Needs to be a bit more solid and allow for direct insertion of images -(jpeg) into the pdf. +Needs to be a bit more solid. +Allow for direct insertion of jpeg images in svg into the pdf.

@@ -99,9 +94,15 @@ no dependancies on any specific renderers.
- + +

+Need better handling of font names, since a font can have several names. +

+
+

-support the a link rendering for the svg output. +A user agent (or some similar thing) is needed to handle adjustable +values, such as setting dpi resolution.

@@ -126,15 +127,20 @@ suggested by Vincent Hardy.

Support for different encoding on different types of streams in pdf document. -For example images. +For example images and text. +

+
+ +

+Add support for the pdf graphic state for use with transparency +in pdf 1.4.

-currently patterns and gradients are not generated properly +Currently patterns and gradients are not generated properly

-