From f02d9c1b949d496bd72a840e22d50ae5b3581499 Mon Sep 17 00:00:00 2001
From: Simon Pepping
- Apache FOP provides an Ant task for automating the document build process.
-
- The FOP Ant task will convert XSL-FO documents to PDF, PS, PCL etc. output
- (see Output formats for available formats).
-
- To call FOP tasks within Ant, first add a FOP task definition to your Ant build file.
- One method of defining the task is as follows:
-
- Then create FOP tasks within your Ant build file, using the FOP task parameters listed below.
- The following example converts a single XSL-FO file to a PDF document:
-
- This example converts all XSL-FO files within an entire directory to PostScript:
-
- FOP distributions are either pre-compiled binary or source.
- If you are using a binary distribution, it is already built and there is no need to build it again.
- See the Download Instructions for information about whether a
- binary or source distribution is best for your needs.
-
- If you got the source code from a repository snapshot or via Subversion you will need to build FOP
- in any case.
-
- Building FOP requires a minimum Java Development Kit (JDK/SDK) of 1.3
- (A Java Runtime Environment is not sufficient).
-
- There is generally no need to setup a classpath. All libraries needed to compile FOP are included
- in the source distribution and are referenced by the build script.
- You will only need to adjust the classpath if you build FOP in some other way. See the build
- script build.xml for details.
-
- The build script uses Apache Ant, a popular
- Java-based build tool, which usually requires that the environment variable JAVA_HOME point to
- your local JDK root directory. This is true even if you use JDK 1.2 or above, which normally
- does not need this setting.
-
- Apache Ant must be installed in order to
- build FOP. Following best practices we don't include Ant with FOP anymore. You can find the
- instructions to install Ant in the Ant manual on the web.
-
- Change to the FOP root directory and build FOP by executing the build script (build.xml)
- using the "ant" command.
-
- The file build.xml in the FOP root directory is the blueprint that Ant uses for the build. It
- contains information for numerous build targets, many of which are building blocks to more
- useful target, and others which are primarily used by the FOP developers.
- You may benefit from looking through this file to learn more about the various build targets.
- To obtain a complete list of useful build targets:
- The most useful targets are: To run the build: For example to do a normal build for the "all" target (which is the default): OR To clean the build directory first: If you have problems building FOP, please try the following:
- The FOP configuration file is an XML file containing a variety of settings that are useful
- for controlling FOP's behavior, and for helping it find resources that you wish it to use.
-
- The easiest way to get started using a FOP configuration file is to copy the sample found
- at After creating your configuration file, you must tell FOP how to find it:
- See Setting the Configuration Programmatically
- for instructions on how to do so in an embedded environment.
-
- This is an excerpt from the example configuration file coming with FOP:
-
- Each Renderer has its own configuration section which is identified by the
- MIME type the Renderer is written for, ex. "application/pdf" for the PDF Renderer.
-
- The configuration for the PDF Renderer could look like this:
-
- The details on the font configuration can be found on the separate Fonts page.
- Note especially the section entitled Register Fonts with FOP.
-
- The configuration element for the PDF renderer contains two elements. One is for the font configuration
- (please follow the link above) and one is for the "filter list". The filter list controls how the
- individual objects in a PDF file are encoded. By default, all objects get "flate" encoded (i.e. simply
- compressed with the same algorithm that is also used in ZIP files). Most users don't need to change that
- setting. For debugging purposes, it may be desired not to compress the internal objects at all so the
- generated PDF commands can be read. In that case, you can simply use the following filter list. The
- second filter list (type="image") ensures that all images still get compressed but also ASCII-85 encoded
- so the produced PDF file is still easily readable in a text editor.
-
- Besides the normal font configuration (the same "fonts" element as for the PDF renderer) the PostScript
- renderer has an additional setting to force landscape pages to be rotated to fit on a page inserted into
- the printer in portrait mode. Set the value to "true" to activate this feature. The default is "false".
- Example:
- FOP searches the configuration file for the information it
-expects, at the position it expects. When that information is not
-present, FOP will not complain, it will just continue. When there is
-other information in the file, FOP will not complain, it will just
-ignore it. That means that when your configuration information is in
-the file but in a different XML element, or in a different XML path,
-than FOP expects, it will be silently ignored. Check the following possibilities:
- Review Running FOP for important information that applies
- to embedded applications as well as command-line use, such as options and performance.
-
- To embed Apache FOP in your application, first create a new
- org.apache.fop.apps.FopFactory instance. This object can be used to launch multiple
- rendering runs. For each run, create a new org.apache.fop.apps.Fop instance through
- one of the factory methods of FopFactory. In the method call you specify which output
- format (i.e. Renderer) to use and, if the selected renderer requires an OutputStream,
- which OutputStream to use for the results of the rendering. You can customize FOP's
- behaviour in a rendering run by supplying your own FOUserAgent instance. The
- FOUserAgent can, for example, be used to set your own Renderer instance (details
- below). Finally, you retrieve a SAX DefaultHandler instance from the Fop object and
- use that as the SAXResult of your transformation.
-
- Apache FOP relies heavily on JAXP. It uses SAX events exclusively to receive the XSL-FO
- input document. It is therefore a good idea that you know a few things about JAXP (which
- is a good skill anyway). Let's look at the basic usage pattern for FOP...
- Here is the basic pattern to render an XSL-FO file to PDF:
-
- Let's discuss these 5 steps in detail:
-
- If you're not totally familiar with JAXP Transformers, please have a look at the
- Embedding examples below. The section contains examples
- for all sorts of use cases. If you look at all of them in turn you should be able
- to see the patterns in use and the flexibility this approach offers without adding
- too much complexity.
-
- This may look complicated at first, but it's really just the combination of an
- XSL transformation and a FOP run. It's also easy to comment out the FOP part
- for debugging purposes, for example when you're tracking down a bug in your
- stylesheet. You can easily write the XSL-FO output from the XSL transformation
- to a file to check if that part generates the expected output. An example for that
- can be found in the Embedding examples (See "ExampleXML2FO").
-
- Logging is now a little different than it was in FOP 0.20.5. We've switched from
- Avalon Logging to Jakarta Commons Logging.
- While with Avalon Logging the loggers were directly given to FOP, FOP now retrieves
- its logger(s) through a statically available LogFactory. This is similar to the
- general pattern that you use when you work with Apache Log4J directly, for example.
- We call this "static logging" (Commons Logging, Log4J) as opposed to "instance logging"
- (Avalon Logging). This has a consequence: You can't give FOP a logger for each
- processing run anymore. The log output of multiple, simultaneously running FOP instances
- is sent to the same logger.
-
- By default, Jakarta Commons Logging uses
- JDK logging (available in JDKs 1.4 or higher) as its backend. You can configure Commons
- Logging to use an alternative backend, for example Log4J. Please consult the
- documentation for Jakarta Commons Logging on
- how to configure alternative backends.
-
- Once the Fop instance is set up, call
- If you want to process XSL-FO generated from XML using XSLT we recommend
- again using standard JAXP to do the XSLT part and piping the generated SAX
- events directly through to FOP. The only thing you'd change to do that
- on the basic usage pattern above is to set up the Transformer differently:
-
- The input XSL-FO document is always received by FOP as a SAX stream (see the
- Parsing Design Document for the rationale).
-
- However, you may not always have your input document available as a SAX stream.
- But with JAXP it's easy to convert different input sources to a SAX stream so you
- can pipe it into FOP. That sounds more difficult than it is. You simply have
- to set up the right Source instance as input for the JAXP transformation.
- A few examples:
-
- There are a variety of upstream data manipulations possible.
- For example, you may have a DOM and an XSL stylesheet; or you may want to
- set variables in the stylesheet. Interface documentation and some cookbook
- solutions to these situations are provided in
- Xalan Basic Usage Patterns.
-
- Apache FOP provides two levels on which you can customize FOP's
- behaviour: the FopFactory and the user agent.
-
- The FopFactory holds configuration data and references to objects which are reusable over
- multiple rendering runs. It's important to instantiate it only once (except in special
- environments) and reuse it every time to create new FOUserAgent and Fop instances.
-
- You can set all sorts of things on the FopFactory:
-
- The font base URL to use when resolving relative URLs for fonts. Example:
-
- Disable strict validation. When disabled FOP is less strict about the rules
- established by the XSL-FO specification. Example:
-
- Enable an alternative set of rules for text indents that tries to mimic the behaviour of many commercial
- FO implementations, that chose to break the specification in this respect. The default of this option is
- 'false', which causes Apache FOP to behave exactly as described in the specification. To enable the
- alternative behaviour, call:
-
- Set the source resolution for the document. This is used internally to determine the pixel
- size for SVG images and bitmap images without resolution information. Default: 72 dpi. Example:
-
- Manually add an ElementMapping instance. If you want to supply a special FOP extension
- you can give the instance to the FOUserAgent. Normally, the FOP extensions can be automatically detected
- (see the documentation on extension for more info). Example:
-
- Set a URIResolver for custom URI resolution. By supplying a JAXP URIResolver you can add
- custom URI resolution functionality to FOP. For example, you can use
- Apache XML Commons Resolver to make use of XCatalogs. Example:
-
- The user agent is the entity that allows you to interact with a single rendering run, i.e. the processing of a single
- document. If you wish to customize the user agent's behaviour, the first step is to create your own instance
- of FOUserAgent using the appropriate factory method on FopFactory and pass that
- to the factory method that will create a new Fop instance:
-
- You can do all sorts of things on the user agent:
-
- The base URL to use when resolving relative URLs. Example:
-
- Set the producer of the document. This is metadata information that can be used for certain output formats such as PDF. The default producer is "Apache FOP". Example:
-
- Set the creating user of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
-
- Set the author of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
-
- Override the creation date and time of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
-
- Set the title of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
-
- Set the keywords of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
-
- Set the target resolution for the document. This is used to
- specify the output resolution for bitmap images generated by bitmap renderers
- (such as the TIFF renderer) and by bitmaps generated by Apache Batik for filter
- effects and such. Default: 72 dpi. Example:
-
- Set your own Renderer instance. If you want to supply your own renderer or
- configure a Renderer in a special way you can give the instance to the FOUserAgent. Normally,
- the Renderer instance is created by FOP. Example:
-
- Set your own FOEventHandler instance. If you want to supply your own FOEventHandler or
- configure an FOEventHandler subclass in a special way you can give the instance to the FOUserAgent. Normally,
- the FOEventHandler instance is created by FOP. Example:
-
- Set a URIResolver for custom URI resolution. By supplying a JAXP URIResolver you can add
- custom URI resolution functionality to FOP. For example, you can use
- Apache XML Commons Resolver to make use of XCatalogs. Example:
-
- Instead of setting the parameters manually in code as shown above you can also set
- many values from an XML configuration file:
-
- The layout of the configuration file is described on the Configuration page.
-
- Fop instances shouldn't (and can't) be reused. Please recreate
- Fop and FOUserAgent instances for each rendering run using the FopFactory.
- This is a cheap operation as all reusable information is held in the
- FopFactory. That's why it's so important to reuse the FopFactory instance.
-
- If your XSL-FO files contain SVG then Apache Batik will be used. When Batik is
- initialised it uses certain classes in
- The thread means that the Java application may not automatically quit
- when finished, you will need to call
- If you run into trouble running FOP on a head-less server, please see the
- notes on Batik.
-
- To get the number of pages that were rendered by FOP you can call
-
- There are several options to consider:
-
- Apache FOP may currently not be completely thread safe.
- The code has not been fully tested for multi-threading issues, yet.
- If you encounter any suspicious behaviour, please notify us.
-
- There is also a known issue with fonts being jumbled between threads when using
- the Java2D/AWT renderer (which is used by the -awt and -print output options).
- In general, you cannot safely run multiple threads through the AWT renderer.
-
- The directory "{fop-dir}/examples/embedding" contains several working examples.
- This
-
- example
-demonstrates the basic usage pattern to transform an XSL-FO
-file to PDF using FOP.
- This
-
- example
-has nothing to do with FOP. It is there to show you how an XML
-file can be converted to XSL-FO using XSLT. The JAXP API is used to do the
-transformation. Make sure you've got a JAXP-compliant XSLT processor in your
-classpath (ex. Xalan).
- This
-
- example
-demonstrates how you can convert an arbitrary XML file to PDF
-using XSLT and XSL-FO/FOP. It is a combination of the first two examples
-above. The example uses JAXP to transform the XML file to XSL-FO and FOP to
-transform the XSL-FO to PDF.
-
-The output (XSL-FO) from the XSL transformation is piped through to FOP using
-SAX events. This is the most efficient way to do this because the
-intermediate result doesn't have to be saved somewhere. Often, novice users
-save the intermediate result in a file, a byte array or a DOM tree. We
-strongly discourage you to do this if it isn't absolutely necessary. The
-performance is significantly higher with SAX.
- This
-
- example
-is a preparatory example for the next one. It's an example that
-shows how an arbitrary Java object can be converted to XML. It's an often
-needed task to do this. Often people create a DOM tree from a Java object and
-use that. This is pretty straightforward. The example here, however, shows how
-to do this using SAX, which will probably be faster and not even more
-complicated once you know how this works.
-
-For this example we've created two classes: ProjectTeam and ProjectMember
-(found in xml-fop/examples/embedding/java/embedding/model). They represent
-the same data structure found in
-xml-fop/examples/embedding/xml/xml/projectteam.xml. We want to serialize to XML a
-project team with several members which exist as Java objects.
-Therefore we created the two classes: ProjectTeamInputSource and
-ProjectTeamXMLReader (in the same place as ProjectTeam above).
-
-The XMLReader implementation (regard it as a special kind of XML parser) is
-responsible for creating SAX events from the Java object. The InputSource
-class is only used to hold the ProjectTeam object to be used.
-
-Have a look at the source of ExampleObj2XML.java to find out how this is
-used. For more detailed information see other resources on JAXP (ex.
-An older JAXP tutorial).
- This
-
- example
-combines the previous and the third to demonstrate
-how you can transform a Java object to a PDF directly in one smooth run
-by generating SAX events from the Java object that get fed to an XSL
-transformation. The result of the transformation is then converted to PDF
-using FOP as before.
- This
-
- example
-has FOP use a DOMSource instead of a StreamSource in order to
-use a DOM tree as input for an XSL transformation.
- This
-
- example
-shows the usage of the PDF Transcoder, a sub-application within FOP.
-It is used to generate a PDF document from an SVG file.
-
-These examples should give you an idea of what's possible. It should be easy
-to adjust these examples to your needs. Also, if you have other examples that you
-think should be added here, please let us know via either the fop-users or fop-dev
-mailing lists. Finally, for more help please send your questions to the fop-users
-mailing list.
-
- By "extension", we mean any data that can be placed in the input XML document that
- is not addressed by the XSL-FO standard.
- By having a mechanism for supporting extensions, FOP is able to add features that
- are not covered in the specification.
-
- The extensions documented here are included with FOP, and are automatically available
- to you. If you wish to add an extension of your own to FOP, please see the
- Developers' Extension Page.
-
- Please see the SVG documentation for more details.
-
- By convention, FO extensions in FOP use the "fox" namespace prefix.
- To use any of the FO extensions, add a namespace entry for
-
- In previous versions of Apache FOP there was a This extension element hasn't been reimplemented for the redesigned code, yet. This extension element hasn't been reimplemented for the redesigned code, yet. The following table summarizes the font capabilities of the various FOP renderers: The Adobe PDF Specification specifies a set of 14 fonts that must be available to every PDF reader: Helvetica (normal, bold, italic, bold italic), Times (normal, bold, italic, bold italic), Courier (normal, bold, italic, bold italic), Symbol and ZapfDingbats. The AWT family of renderers (AWT, Print, SVG), use the Java AWT libraries for font metric information. Through operating system registration, the AWT libraries know what fonts are available on the system, and the font metrics for each one. Support for custom fonts is added by creating font metric files (written in XML) from the actual font files, and registering them with FOP. Currently only Type 1 and TrueType fonts can be added.
-More information about fonts can be found at: FOP includes PFMReader, which reads the PFM file that normally comes with a Type 1 font, and generates an appropriate font metrics file for it.
-To use it, run the class org.apache.fop.fonts.apps.PFMReader: Windows (on JDK 1.4 and later): Windows (on JDK 1.3.x): Unix (on JDK 1.4 and later): Unix (on JDK 1.3.1): PFMReader [options]: FOP includes TTFReader, which reads the TTF file and generates an appropriate font metrics file for it.
-Use it in a similar manner to PFMReader.
-For example, to create such a metrics file in Windows from the TrueType font at c:\myfonts\cmr10.ttf: TTFReader [options]: TrueType collections (.ttc files) contain more than one font.
-To create metrics files for these fonts, you must specify which font in the collection should be generated, by using the "-ttcname" option with the TTFReader. To get a list of the fonts in a collection, just start the TTFReader as if it were a normal TrueType file (without the -ttcname option).
-It will display all of the font names and exit with an Exception. Here is an example of generating a metrics file for a .ttc file: You must tell FOP how to find and use the font metrics files by registering them in the FOP Configuration. Add entries for your custom fonts, regardless of font type, to the configuration file in a manner similar to the following: Font embedding is enabled in the userconfig.xml file and controlled by the embed-url attribute.
-If you don't specify the embed-url attribute the font will not be embedded, but will only be referenced. When FOP embeds a font, it adds a prefix to the fontname to ensure that the name will not match the fontname of an installed font.
-This is helpful with older versions of Acrobat Reader that preferred installed fonts over embedded fonts. When embedding PostScript fonts, the entire font is always embedded. When embedding TrueType fonts (ttf) or TrueType Collections (ttc), a subset of the original font, containing only the glyphs used, is embedded in the output document.
-Currently, this embedded font contains only the minimum data needed to be embedded in a pdf document, and does not contain any codepage information.
-The PDF document contains indexes to the glyphs in the font instead of to encoded characters.
-While the document will be displayed correctly, the net effect of this is that searching, indexing, and cut-and-paste will not work properly. One workaround for this behavior is to use the "-enc ansi" option when generating metrics with TTFReader.
-This will cause the whole font to be embedded in the pdf document.
-Characters will be WinAnsi encoded (as specified in the PDF spec), so you lose the ability to use characters from other character sets.
-See Table of TTF Encoding Options for more details.
- There are cases where you might want to force the embedding of one or more of the base 14 fonts that
- can normally be considered available on the target platform (viewer, printer). One of these cases is
- PDF/A which mandates the embedding of even the base 14 fonts. Embedding a font such as Helvetica or
- Courier is straight-forward. The "Symbol" and "ZapfDingbats" fonts, however, currently present a
- problem because FOP cannot correctly determine the encoding of these two single-byte fonts through
- the PFM file. FOP now correctly interprets the "encoding" value in the XML font metrics file, but the
- PFMReader application writes "UnknownEncoding" to the generated XML file. In order to embed "Symbol"
- and "ZapfDingbats" you have to manually change the XML font metrics file and specify "SymbolEncoding"
- or "ZapfdingbatsEncoding" encoding respectively as the value for the "encoding" element.
- Example:
- The table below summarizes the theoretical support for graphical formats within FOP. In other words, within the constraints of the limitations listed here, these formats should work. However, many of them have not been tested, and there may be limitations that have not yet been discovered or documented. The packages needed to support some formats are not included in the FOP distribution and must be installed separately. Follow the links in the "Support Thru" column for more details.
-
- FOP has native ability to handle some graphic file formats.
-
- Apache Batik contains codecs for PNG and TIFF access. FOP can use these.
-
- For JDKs 1.4 or higher, FOP provides a wrapper to load images through the
- JDK's Image I/O API (JSR 015).
- Image I/O allows to dynamically add additional image codecs. An example of such an add-on library are the
- JAI Image I/O Tools available from Sun.
-
- Because of licensing issues, the JIMI image library is not included in the FOP distribution. First, download and install it.
-Then, copy the file "JimiProClasses.zip" from the archive to {fop-install-dir}/lib/jimi-1.0.jar. Please note that FOP binary distributions are compiled with JIMI support, so there is no need for you to build FOP to add the support. If jimi-1.0.jar is installed in the right place, it will automatically be used by FOP, otherwise it will not.
-
- FOP has been compiled with JAI support, but JAI is not included in the FOP distribution.
-To use it, install JAI, then copy the jai_core.jar and the jai_codec.jar files to {fop-install-dir}/lib.
-JAI is much faster than JIMI, but is not available for all platforms. See What platforms are supported? on the JAI FAQ page for more details.
- Current FOP distributions include a distribution of the Apache Batik version 1.6.
-It is automatically installed with FOP.
-Because Batik's API changes frequently, it is highly recommended that you use the version that ships with FOP, at least when running FOP. Batik must be run in a graphical environment.
-It uses AWT classes for rendering SVG, which in turn require an X server on Unixish systems.
-If you run a server without X, or if you can't connect to the X server due to security restrictions or policies (a so-called "headless" environment), SVG rendering will fail. Here are some workarounds: FOP native support for BMP images is limited to the RGB color-space. FOP provides support for two output targets:
- Other output targets can't be supported at the moment because
- FOP lacks a PostScript interpreter. Furthermore, FOP is not able
- to parse the preview bitmaps sometimes contained in EPS files.
- FOP native support of JPEG does not include all variants, especially those containing unusual color lookup tables and color profiles.
-If you have trouble with a JPEG image in FOP, try opening it with an image processing program (such as Photoshop or Gimp) and then saving it.
-Specifying 24-bit color output may also help.
-For the PDF and PostScript renderers most JPEG images can be passed through without decompression.
-User reports indicate that grayscale, RGB, and CMYK color-spaces are all rendered properly.
- If using JAI for PNG support, only RGB and RGBA color-spaces are supported for FOP rendering. FOP uses Batik for SVG support.
-This format can be handled as an
-The SVG is rendered into PDF by using PDF commands to draw and fill
-lines and curves. This means that the graphical objects created with
-this remain as vector graphics.
-
-There are a number of SVG things that cannot be converted directly into
-PDF. Parts of the graphic such as effects, patterns and images are inserted
-into the PDF as a raster graphic. The resolution of this graphic may not
-be ideal depending on the FOP dpi (72dpi) and the scaling for that graphic.
-We hope to improve this in the future.
-Currently transparency is not supported in PDF so many svg images that
-contain effects or graphics with transparent areas will not be displayed
-correctly.
- If possible, Batik will use normal PDF text when inserting text. It does
-this by checking if the text can be drawn normally and the font is
-supported. This example svg text.svg /
-text.pdf
-shows how various types and effects with text are handled.
-Note that tspan and outlined text are not yet implemented.
-Otherwise, text is converted and drawn as a set of shapes by batik, using the stroking text painter.
-This means that a typical character will
-have about 10 curves (each curve consists of at least 20 characters).
-This can make the pdf files large and when the pdf is viewed the
-viewer does not normally draw those fine curves very well (turning on
-Smooth Line Art in the Acrobat preferences will fix this).
-If the text is inserted into the PDF using the inbuilt text commands
-for PDF it will use a single character.
-
-For PDF output, there is a configuration option to force SVG text to be rendered as text.
-The drawback to this approach is that it is effective only for available fonts (including embedded fonts).
-Font sizes are rounded to the next integer point size.
-This will be improved in the future.
- Note that because SVG text can be rendered as either text or a vector graphic, you may need to consider settings in your viewer for both.
-The Acrobat viewer has both "smooth line art" and "smooth text" settings that may need to be set for SVG images to be displayed nicely on your screen (see Edit / Preferences / Display).
-This setting will not affect the printing of your document, which should be OK in any case, but will only affect the quality of the screen display. Currently, SVG images are rendered with the dimensions specified in the SVG file, within the viewport specified in the fo:external-graphic element.
-For everything to work properly, the two should be equal.
-The SVG standard leaves this issue as an implementation detail.
-FOP will probably implement a scaling mechanism in the future. FOP-native TIFF support is limited to PDF and PostScript output only. Also, according to user reports, FOP's native support for TIFF is limited to images with the following characteristics (all must be true for successful rendering): JAI: Supports RGB and RGBA only for FOP rendering. Some bitmapped image file formats store a dots-per-inch (dpi) or other resolution value. Since PDF and most output formats do not have a concept of resolution, but only of absolute image units (i.e. pixels) FOP ignores the resolution values as well. Instead, FOP uses the dimensions of the image as specified in the fo:external-graphic element to render the image: If you need a higher apparent output resolution for bitmapped images, first make sure that at least one dimension of the image is defined in your XSL-FO input. Apart from that, resolution problems are in the image file itself, and must be corrected there: use or create a higher-resolution image file.
- FOP caches images between runs. The URL is used as a key to identify images which means that when
- a particular URL appears again, the image is taken from the cache. If you have a servlet that
- generates a different image each time it is called with the same URL you need to use a constantly
- changing dummy parameter on the URL to avoid caching.
-
- The image cache has been improved considerably in the redesigned code. Therefore, a resetCache() method
- has become unnecessary. If you still experience OutOfMemoryErrors, please notify us.
- FOP uses Liang's hyphenation algorithm, well known from TeX. It needs
- language specific pattern and other data for operation. Because of licensing issues (and for
- convenience), all hyphenation patterns for FOP are made available through
- the Objects For
- Formatting Objects project. Many of the hyphenation files distributed with TeX and its offspring are
- licenced under the LaTeX
- Project Public License (LPPL), which prevents them from being
- distributed with Apache software. The LPPL puts restrictions on file names
- in redistributed derived works which we feel can't guarantee. Some
- hyphenation pattern files have other or additional restrictions, for
- example against use for commercial purposes. Although Apache FOP cannot redistribute hyphenation pattern files that do
- not conform with its license scheme, that does not necessarily prevent users
- from using such hyphenation patterns with FOP. However, it does place on
- the user the responsibility for determining whether the user can rightly use
- such hyphenation patterns under the hyphenation pattern license. The most important source of hyphenation pattern files is the
- CTAN TeX
- Archive. To install a custom hyphenation pattern for use with FOP: If you would like to build your own hyphenation pattern files, or modify
- existing ones, this section will help you understand how to do so. Even
- when creating a pattern file from scratch, it may be beneficial to start
- with an existing file and modify it. See
- OFFO's Hyphenation page for examples.
- Here is a brief explanation of the contents of FOP's hyphenation patterns: If you want to convert a TeX hyphenation pattern file, you have to undo
- the TeX encoding for non-ASCII text. FOP uses Unicode, and the patterns
- must be proper Unicode too. You should be aware of the XML encoding issues,
- preferably use a good Unicode editor. Note that FOP does not do Unicode character normalization. If you use
- combining chars for accents and other character decorations, you must
- declare character classes for them, and use the same sequence of base character
- and combining marks in the XSLFO source, otherwise the pattern wouldn't match.
- Fortunately, Unicode provides precomposed characters for all important cases
- in common languages, until now nobody run seriously into this issue. Some dead
- languages and dialects, especially ancient ones, may pose a real problem
- though. If you want to generate your own patterns, an open-source utility called
- patgen is available on many Unix/Linux distributions and every TeX
- distribution which can be used to assist in
- creating pattern files from dictionaries. Pattern creation for languages like
- english or german is an art. If you can, read Frank Liang's original paper
- "Word Hy-phen-a-tion by Com-pu-ter" (yes, with hyphens). It is not available
- online. The original patgen.web source, included in the TeX source distributions,
- contains valuable comments, unfortunately technical details obscure often the
- high level issues. Another important source is
- The
- TeX Book, appendix H (either read the TeX source, or run it through
- TeX to typeset it). Secondary articles, for example the works by Petr Sojka,
- may also give some much needed insight into problems arising in automated
- hyphenation.
- The Apache FOP team is proud to present to you the largely rewritten codebase which is
- finally in a state where you can start to use it. It has taken over three years to get this
- far and over two years without a new release from the FOP project. We would like to encourage
- you to download the code and to play with it. We're still in the process of adding new major
- features and stabilizing the code. We welcome any feedback you might have and even more, any
- other form of help to get the project forward.
-
- This third release contains many bug fix release and new features compared
- to 0.91beta. To see what has changed since the last release, please visit the
- Changes Page and the Release Notes.
-
- If you're upgrading to this version from an earlier version of FOP, please read the
- information contained on the Upgrading page!
-
- To download this version, please visit the download page.
-
- The intermediate format (IF) is a proprietary XML format that represents the area tree
- generated by the layout engine. The area tree is conceptually defined in the
- XSL-FO specification in chapter 1.1.2.
- The IF can be generated through the area tree XML Renderer (the XMLRenderer).
-
- The intermediate format can be used to generate intermediate documents that are modified
- before they are finally rendered to their ultimate output format. Modifications include
- adjusting and changing trait values, adding or modifying area objects, inserting prefabricated
- pages, overlays, imposition (n-up, rotation, scaling etc.). Multiple IF files can be combined
- to a single output file.
-
- As already mentioned, the IF is generated by using the XMLRenderer (MIME type:
- application/X-fop-areatree). So, you basically set the right MIME type for
- the output format and process your FO files as if you would create a PDF file. However, there
- is an important detail to consider: The various Renderers don't all use the same font sources.
- To be able to create the right area tree for the ultimate output file, you need to create
- the IF file using the right font setup. This is achieved by telling the XMLRenderer to mimic
- another renderer. This is done by calling the XMLRenderer's mimicRenderer() method with an
- instance of the ultimate target renderer as the single parameter. This has a consequence: An
- IF file rendered with the Java2DRenderer may not look as expected when it was actually generated
- for the PDF renderer. For renderers that use the same font setup, this restriction does not
- apply (PDF and PS, for example). Generating the intermediate format file is the first step.
-
- The second step is to reparse the IF file using the AreaTreeParser which is
- found in the org.apache.fop.area package. The pages retrieved from the IF file are added to an
- AreaTreeModel instance from where they are normally rendered using one of the available Renderer
- implementations. You can find examples for the IF processing in the
-
- The basic pattern to parse the IF format looks like this:
-
- This example simply reads an IF file and renders it to a PDF file. Please note, that in normal
- FOP operation you're shielded from having to instantiate the FontInfo object yourself. This
- is normally a task of the AreaTreeHandler which is not present in this scenario. The same
- applies to the AreaTreeModel instance, in this case an instance of a subclass called
- RenderPagesModel. RenderPagesModel is ideal in this case as it has very little overhead
- processing the individual pages. An important line in the example is the call to
-
- The intermediate format can also be used from the command-line
- by using the "-atin" parameter for specifying the area tree XML as input file. You can also
- specify a "mimic renderer" by inserting a MIME type between "-at" and the output file.
-
- This initial example is obviously not very useful. It would be faster to create the PDF file
- directly. As the ExampleConcat.java
- example shows you can easily parse multiple IF files in a row and add the parsed pages to the
- same AreaTreeModel instance which essentially concatenates all the input document to one single
- output document.
-
- One of the most important use cases for the intermediate format is obviously modifying the area
- tree XML before finally rendering it to the target format. You can easily use XSLT to process
- the IF file according to your needs. Please note, that we will currently not formally describe
- the intermediate format. You need to have a good understanding its structure so you don't
- create any non-parseable files. We may add an XML Schema and more detailed documentation at a
- later time. You're invited to help us with that.
-
- The generation of the intermediate format as well as it parsing process has been designed to allow
- for maximum flexibility and optimization. Please note that you can call
- FOP supports multiple output formats by using a different renderer for each format.
- The renderers do not all have the same set of capabilities, sometimes because of
- the output format itself, sometimes because some renderers get more development
- attention than others.
-
- Most FOP renderers use a FOP-specific system for font registration.
- However, the Java2D/AWT and print renderers use the Java AWT package, which gets its
- font information from the operating system registration.
- This can result in several differences, including actually using different fonts,
- and having different font metrics for the same font.
- The net effect is that the layout of a given FO document can be quite different between
- renderers that do not use the same font information.
-
- The most obvious way to print your document is to use the FOP
- print renderer, which uses the Java2D API (AWT).
- However, you can also send output from the Postscript renderer directly to a Postscript
- device, or output from the PCL renderer directly to a PCL device.
-
- Here are Windows command-line examples for Postscript and PCL:
-
- Here is some Java code to accomplish the task in UNIX:
-
- Set the output MIME type to "application/x-pcl" (MimeConstants.MIME_PCL) and
- it happily sends the PCL to the UNIX printer queue.
-
- PDF is the best supported output format. It is also the most accurate
- with text and layout. This creates a PDF document that is streamed out
- as each page is rendered. This means that the internal page index
- information is stored near the end of the document.
- The PDF version supported is 1.4. PDF versions are forwards/backwards
- compatible.
-
- Note that FOP does not currently support "tagged PDF", PDF/X or PDF/A-1a.
- Support for PDF/A-1b has recently been added, however.
-
- PDF has a set of fonts that are always available to all PDF viewers;
- to quote from the PDF Specification:
-
- "PDF prescribes a set of 14 standard fonts that can be used without prior
- definition.
- These include four faces each of three Latin text typefaces (Courier,
- Helvetica, and Times), as well as two symbolic fonts (Symbol and ITC Zapf
- Dingbats). These fonts, or suitable substitute fonts with the same metrics, are
- guaranteed to be available in all PDF viewer applications."
-
- FOP does not currently support several desirable PDF features: XMP metadata and watermarks.
- One workaround is to use Adobe Acrobat (the full version, not the Reader) to process
- the file manually or with scripting that it supports.
-
- Another popular post-processing tool is iText,
- which has tools for adding security features, document properties, watermarks, and many
- other features to PDF files.
-
- Here is some sample code that uses iText to encrypt a FOP-generated PDF. (Note that FOP now
- supports PDF encryption. However the principles for using
- iText for other PDF features are similar.)
-
- Check the iText tutorial and documentation for setting access flags, password,
- encryption strength and other parameters.
-
- In addition to the PDF Post-processing options, consider the following workarounds:
-
- The PostScript renderer has been brought up to a similar quality as the
- PDF renderer, but may still be missing certain features. It provides good
- support for most text and layout.
- Images and SVG are not fully supported, yet. Currently, the PostScript
- renderer generates PostScript Level 3 with most DSC comments. Actually,
- the only Level 3 feature used is FlateDecode, everything else is Level 2.
-
- JFOR, an open source XSL-FO to RTF converter has been integrated into Apache FOP.
- This will create an RTF (rich text format) document that will
- attempt to contain as much information from the fo document as
- possible. The RTF output follows Microsoft's RTF specifications
- and produces best results on Microsoft Word.
-
- This is primarily for testing and verification. The XML created is simply
- a representation of the internal area tree put into XML. We use that to verify
- the functionality of FOP's layout engine.
-
- The other use case of the Area Tree XML is as FOP's "intermediate format". More information
- on that can be found on the page dedicated to the Intermediate Format.
-
- The AWT viewer shows a window with the pages displayed inside a
- Java graphic. It displays one page at a time.
- The fonts used for the formatting and viewing depend on the fonts
- available to your JRE.
-
- It is possible to directly print the document from the command line.
- This is done with the same code that renders to the Java2D/AWT renderer.
-
- It is possible to directly create bitmap images from the individual
- pages generated by the layout engine.
- This is done with the same code that renders to the Java2D/AWT renderer.
-
- Currently, two output formats are supported: PNG and TIFF. TIFF produces
- one file with multiple pages, while PNG output produces one file per
- page. The quality of the bitmap depends on the resolution setting on the
- FOUserAgent.
-
- The text renderer produces plain ASCII text output
- that attempts to match the output of the PDFRenderer as closely as
- possible. This was originally developed to accommodate an archive system
- that could only accept plain text files, and is primarily useful for getting
- a quick-and-dirty view of the document text. The renderer is very limited,
- so do not be surprised if it gives unsatisfactory results.
-
- The Text renderer works with a fixed size page buffer. The size of this
- buffer is controlled with the textCPI and textLPI public variables.
- The textCPI is the effective horizontal characters per inch to use.
- The textLPI is the vertical lines per inch to use. From these values
- and the page width and height the size of the buffer is calculated.
- The formatting objects to be rendered are then mapped to this grid.
- Graphic elements (lines, borders, etc) are assigned a lower priority
- than text, so text will overwrite any graphic element representations.
-
- Because FOP lays the text onto a grid during layout, there are frequently
- extra or missing spaces between characters and lines, which is generally
- unsatisfactory.
- Users have reported that the optimal settings to avoid such spacing problems are:
-
- Due to the state of certain renderers we moved some of them to a "sandbox" area until
- they are ready for more serious use. The renderers and FOEventHandlers in the sandbox
- can be found under src/sandbox and are compiled into build/fop-sandbox.jar during the
- main build. The output formats in the sandbox are marked as such below.
-
- This format is for the Hewlett-Packard PCL printers.
- It should produce output as close to identical as possible to the
- printed output of the PDFRenderer within the limitations of the
- renderer, and output device.
-
- This format is the Maker Interchange Format which is used by
- Adobe Framemaker.
-
- This format creates an SVG document that has links between the pages.
- This is primarily for slides and creating svg images of pages.
- Large documents will create SVG files that are far too large for
- an SVG viewer to handle. Since FO documents usually have text the
- SVG document will have a large number of text elements.
- The font information for the text is obtained from the JVM in the
- same way as for the AWT viewer. If the SVG is viewed on a
- system where the fonts are different, such as another platform,
- then the page may look wrong.
-
- Apache FOP is easily extensible and allows you to add new output formats to enhance FOP's functionality. There's a number of output formats
- which are on our wish list. We're looking for volunteers to help us implement them.
-
- PDF/A is a standard which turns PDF into an "electronic document file
- format for long-term preservation". PDF/A-1 is the first part of the
- standard and is documented in
- ISO 19005-1:2005(E).
- Work on PDF/A-2 is in progress at
- AIIM.
-
- Design documentation on PDF/A can be found on FOP's Wiki on the
- PDFA1ConformanceNotes page.
-
- PDF/A-1b is implemented to the degree that FOP supports
- the creation of the elements described in ISO 19005-1.
-
- There is a restriction with
- XMP metadata. If an XMP metadata packet is present in the fo:declarations
- element of an FO file, the values from the XMP packet are not synchronized
- with the Info PDF object as is mandated by chapter 6.7.3 of the ISO document.
- However, if no XMP packet is supplied FOP automatically generates an XMP
- packet from the values in the Info PDF object.
-
- Tests have been performed against jHove and Adobe Acrobat 7.0.7 (Preflight function).
-
- PDF/A-1a is not implemented, yet. This is mostly because of the requirement
- for tagged PDF which is not available in FOP, yet.
-
- If you specify "-pdfa1b" instead of "-pdf" for the output format on the
- command line, support for PDF/A-1b is activated. If there is a violation of
- one of the validation rules for PDF/A, an error message is presented and the
- processing stops.
-
- When FOP is embedded in another Java application you can set a special option
- on the renderer options in the user agent to activate the PDF/A-1b profile.
- Here's an example:
-
- If one of the validation rules of PDF/A is violated, an PDFConformanceException
- (descendant of RuntimeException) is thrown.
-
- There are a number of things that must be looked after if you activate a PDF/A
- profile. If you receive a PDFConformanceException, have a look at the following
- list (not necessarily comprehensive):
-
- FOP supports encryption of PDF output, thanks to Patrick
- C. Lankswert. This feature is commonly used to prevent
- unauthorized viewing, printing, editing, copying text from the
- document and doing annotations. It is also possible to ask the
- user for a password in order to view the contents. Note that
- there already exist third party applications which can decrypt
- an encrypted PDF without effort and allow the aforementioned
- operations, therefore the degree of protection is limited.
-
- For further information about features and restrictions regarding PDF
- encryption, look at the documentation coming with Adobe Acrobat or the
- technical documentation on the Adobe web site.
-
- Encryption is enabled by supplying any of the encryption related
- options.
-
- An owner password is set with the
- If no owner password has been supplied but FOP was asked to apply some
- restrictions, a random password is used. In this case it is obviously
- impossiible to disregard restrictions in PDF processing tools.
-
- A user password, supplied with the
- Further restrictions can be imposed by using the
- When FOP is embedded in another Java application you need to set an
- options map on the renderer. These are the supported options:
-
- An example to enable PDF encryption in Java code:
-
- The parameters for the constructor of PDFEncryptionParams are:
-
- Alternatively, you can set each value separately in the Map provided by
- FOUserAgent.getRendererOptions() by using the following keys:
-
- In order to use PDF encryption, FOP has to be compiled with
- cryptography support. Currently, only JCE
- is supported. JCE is part of JDK 1.4. For earlier JDKs, it can
- be installed separately. The build process automatically
- detects JCE presence and installs PDF encryption support if
- possible, otherwise a stub is compiled in.
-
- Cryptography support must also be present at run time. In particular, a
- provider for the RC4 cipher is needed. Unfortunately, the sample JCE
- provider in Sun's JDK 1.4 does not provide RC4. If you
- get a message saying
-
- then you don't have the needed infrastructure.
-
- There are several commercial and a few Open Source packages which
- provide RC4. A pure Java implementation is produced by The Legion of the Bouncy
- Castle. Mozilla
- JSS is an interface to a native implementation.
-
- The pure Java implementation from Bouncy Castle is easy to
- install.
-
- If you have any experience with Mozilla JSS or any other
- cryptography provider, please post it to the fop-user list.
- The following software must be installed: The following software is optional, depending on your needs: In addition, the following system requirements apply:
- Basic FOP installation consists of first unzipping the
- Some Mac OSX users have experienced filename truncation problems using Stuffit to unzip
- and unarchive their distribution media. This is a legacy of older Mac operating systems,
- which had a 31-character pathname limit. Several Mac OSX users have recommended that
- Mac OSX users use the shell command
- The usual and recommended practice for starting FOP from the command line is to run the
- batch file fop.bat (Windows) or the shell script fop (Unix/Linux).
- If you write your own scripts, be sure to review these standard scripts to make sure that
- you get your environment properly configured.
-
- The standard scripts for starting FOP require that the environment variable JAVA_HOME be
- set to a path pointing to the appropriate Java installation on your system. Macintosh OSX
- includes a Java environment as part of its distribution. We are told by Mac OSX users that
- the path to use in this case is
- As an alternative to the start scripts you can run "java -jar build/fop.jar" in which case
- FOP tries to build the classpath for running FOP dynamically. Please note, that this might
- not always work as expected.
-
- PDF encryption is only available if FOP was compiled with encryption support
- and if compatible encryption support is availabe at run time.
- Currently, only the JCE is supported. Check the Details.
-
- FOP sessions that use -xml and -xsl input instead of -fo input are actually
- controlling two distinct conversions: Tranforming XML to XSL-FO, then formatting
- the XSL-FO to PDF (or another FOP output format).
- Although FOP controls both of these processes, the first is included merely as
- a convenience and for performance reasons.
- Only the second is part of FOP's core processing.
- If a user has a problem running FOP, it is important to determine which of these
- two processes is causing the problem.
- If the problem is in the first process, the user's stylesheet is likely the cause.
- The FOP development team does not have resources to help with stylesheet issues,
- although we have included links to some useful
- Specifications and
- Books/Articles.
- If the problem is in the second process, FOP may have a bug or an unimplemented
- feature that does require attention from the FOP development team.
-
- In the case of using -xml and -xsl input, although the user is responsible for
- the XSL-FO code that is FOP's input, it is not visible to the user. To make the
- intermediate FO file visible, the FOP distribution includes the "-foout" option
- which causes FOP to run only the first (transformation) step, and write the
- results to a file. (See also the Xalan command-line below)
-
- The -foout option works the same way as if you would call the
- Xalan command-line:
-
-
- Note that there are some subtle differences between the FOP and Xalan command-lines.
-
- FOP can consume quite a bit of memory, even though this has been continually improved.
- This is partly inherent to the formatting process and partly caused by implementation choices.
- All FO processors currently on the market have memory problems with certain layouts.
-
- If you are running out of memory when using FOP, here are some ideas that may help:
-
- One of FOP's stated design goals is to be able to process input of arbitrary size.
- Addressing this goal is one of the prime motivations behind the
- FOP Redesign.
- If you have problems running FOP, please see the "How to get Help" page.
- This page discusses topic all around using Apache FOP in a servlet environment.
-
- In the directory {fop-dir}/src/java/org/apache/fop/servlet, you'll find a working example
- of a FOP-enabled servlet.
-
- The servlet is automatically built when you build Apache FOP using the supplied Ant script. After building
- the servlet, drop fop.war into the webapps directory of Apache Tomcat (or any other web container). Then, you can use
- URLs like the following to generate PDF files:
- The source code for the servlet can be found under {fop-dir}/src/java/org/apache/fop/servlet/FopServlet.java.
- Here is a minimal code snippet to demonstrate the basics:
-
- A common requirement is to transform an XML source to
- XSL-FO using an XSL transformation. It is recommended to use
- JAXP for this task. The following snippet shows the basic
- code:
-
- The
- Because you have an explicit
- You can easily set up your own FOUserAgent as demonstrated on the Embedding page.
-
- There are several options to consider:
-
- Of course, the
- performance hints from the Embedding page
- apply here, too.
-
- Some versions of Internet Explorer will not automatically show the PDF or call the servlet multiple times.
- These are well-known limitations of Internet Explorer and are not a problem of the servlet.
- However, Internet Explorer can still be used to download the PDF so that it can be viewed later.
- Here are some suggestions in this context:
-
- When using a servlet engine, there are potential CLASSPATH issues, and potential conflicts
- with existing XML/XSLT libraries. Servlet containers also often use their own classloaders
- for loading webapps, which can cause bugs and security problems.
-
- Check Tomcat's documentation for detailed instructions about installing FOP and Cocoon.
- There are known bugs that must be addressed, particularly for Tomcat 4.0.3.
-
- Put a copy of a working parser in some directory where WebSphere can access it.
- For example, if /usr/webapps/yourapp/servlets is the CLASSPATH for your servlets,
- copy the Xerces jar into it (any other directory would also be fine).
- Do not add the jar to the servlet CLASSPATH, but add it to the CLASSPATH of the
- application server which contains your web application.
- In the WebSphere administration console, click on the "environment" button in the
- "general" tab. In the "variable name" box, enter "CLASSPATH".
- In the "value" box, enter the correct path to the parser jar file
- (/usr/webapps/yourapp/servlets/Xerces.jar in our example here).
- Press "OK", then apply the change and restart the application server.
-
- Sometimes the requirements for a servlet get quite sophisticated: SQL data sources,
- multiple XSL transformations, merging of several datasources etc. In such a case
- consider using Apache Cocoon instead
- of a custom servlet to accomplish your goal.
-
- If you're planning to upgrade to the latest FOP version there are a few very important things
- to consider:
-
- The new code is much more strict about the interpretation of the XSL-FO 1.0 specification.
- Things that worked fine in version 0.20.5 might start to produce warnings or even errors
- now. FOP 0.20.5 contains many bugs which have been corrected in the new code.
-
- When you use your existing FO files or XML/XSL files which work fine with FOP version
- 0.20.5 against this FOP version some things may not work as expected. The following
- list will hopefully help you to identify and correct those problems.
-
+ Apache FOP provides an Ant task for automating the document build process.
+
+ The FOP Ant task will convert XSL-FO documents to PDF, PS, PCL etc. output
+ (see Output formats for available formats).
+
+ To call FOP tasks within Ant, first add a FOP task definition to your Ant build file.
+ One method of defining the task is as follows:
+
+ Then create FOP tasks within your Ant build file, using the FOP task parameters listed below.
+ The following example converts a single XSL-FO file to a PDF document:
+
+ This example converts all XSL-FO files within an entire directory to PostScript:
+
+ FOP distributions are either pre-compiled binary or source.
+ If you are using a binary distribution, it is already built and there is no need to build it again.
+ See the Download Instructions for information about whether a
+ binary or source distribution is best for your needs.
+
+ If you got the source code from a repository snapshot or via Subversion you will need to build FOP
+ in any case.
+
+ Building FOP requires a minimum Java Development Kit (JDK/SDK) of 1.3
+ (A Java Runtime Environment is not sufficient).
+
+ There is generally no need to setup a classpath. All libraries needed to compile FOP are included
+ in the source distribution and are referenced by the build script.
+ You will only need to adjust the classpath if you build FOP in some other way. See the build
+ script build.xml for details.
+
+ The build script uses Apache Ant, a popular
+ Java-based build tool, which usually requires that the environment variable JAVA_HOME point to
+ your local JDK root directory. This is true even if you use JDK 1.2 or above, which normally
+ does not need this setting.
+
+ Apache Ant must be installed in order to
+ build FOP. Following best practices we don't include Ant with FOP anymore. You can find the
+ instructions to install Ant in the Ant manual on the web.
+
+ Change to the FOP root directory and build FOP by executing the build script (build.xml)
+ using the "ant" command.
+
+ The file build.xml in the FOP root directory is the blueprint that Ant uses for the build. It
+ contains information for numerous build targets, many of which are building blocks to more
+ useful target, and others which are primarily used by the FOP developers.
+ You may benefit from looking through this file to learn more about the various build targets.
+ To obtain a complete list of useful build targets:
+ The most useful targets are: To run the build: For example to do a normal build for the "all" target (which is the default): OR To clean the build directory first: If you have problems building FOP, please try the following:
+ The FOP configuration file is an XML file containing a variety of settings that are useful
+ for controlling FOP's behavior, and for helping it find resources that you wish it to use.
+
+ The easiest way to get started using a FOP configuration file is to copy the sample found
+ at After creating your configuration file, you must tell FOP how to find it:
+ See Setting the Configuration Programmatically
+ for instructions on how to do so in an embedded environment.
+
+ This is an excerpt from the example configuration file coming with FOP:
+
+ Each Renderer has its own configuration section which is identified by the
+ MIME type the Renderer is written for, ex. "application/pdf" for the PDF Renderer.
+
+ The configuration for the PDF Renderer could look like this:
+
+ The details on the font configuration can be found on the separate Fonts page.
+ Note especially the section entitled Register Fonts with FOP.
+
+ The configuration element for the PDF renderer contains two elements. One is for the font configuration
+ (please follow the link above) and one is for the "filter list". The filter list controls how the
+ individual objects in a PDF file are encoded. By default, all objects get "flate" encoded (i.e. simply
+ compressed with the same algorithm that is also used in ZIP files). Most users don't need to change that
+ setting. For debugging purposes, it may be desired not to compress the internal objects at all so the
+ generated PDF commands can be read. In that case, you can simply use the following filter list. The
+ second filter list (type="image") ensures that all images still get compressed but also ASCII-85 encoded
+ so the produced PDF file is still easily readable in a text editor.
+
+ Another (optional) setting specific to the PDF Renderer is an output color profile, an ICC
+ color profile which indicates the target color space the PDF file is generated for. This
+ setting is mainly used in conjunction with the PDF/X feature.
+ An example:
+
+ Besides the normal font configuration (the same "fonts" element as for the PDF renderer) the PostScript
+ renderer has an additional setting to force landscape pages to be rotated to fit on a page inserted into
+ the printer in portrait mode. Set the value to "true" to activate this feature. The default is "false".
+ Example:
+
+ Non-standard fonts for the PCL renderer are made available through the Java2D subsystem which means that
+ you don't have to do any custom font configuration in this case but you have to use the font names
+ offered by Java.
+
+ Additionally, there are certain settings that control who the renderer handles various elements.
+
+ The default value for the "rendering" setting is "speed" which causes borders
+ to be painted as plain rectangles. In this mode, no special borders (dotted,
+ dashed etc.) are available. If you want support for all border modes, set the
+ value to "quality" as indicated above. This will cause the borders to be painted
+ as bitmaps.
+
+ The default value for the "text-rendering" setting is "auto" which paints the
+ base fonts using PCL fonts. Non-base fonts are painted as bitmaps through Java2D.
+ If the mix of painting methods results in unwelcome output, you can set this
+ to "bitmap" which causes all text to be rendered as bitmaps.
+ FOP searches the configuration file for the information it
+expects, at the position it expects. When that information is not
+present, FOP will not complain, it will just continue. When there is
+other information in the file, FOP will not complain, it will just
+ignore it. That means that when your configuration information is in
+the file but in a different XML element, or in a different XML path,
+than FOP expects, it will be silently ignored. Check the following possibilities:
+ Review Running FOP for important information that applies
+ to embedded applications as well as command-line use, such as options and performance.
+
+ To embed Apache FOP in your application, first create a new
+ org.apache.fop.apps.FopFactory instance. This object can be used to launch multiple
+ rendering runs. For each run, create a new org.apache.fop.apps.Fop instance through
+ one of the factory methods of FopFactory. In the method call you specify which output
+ format (i.e. Renderer) to use and, if the selected renderer requires an OutputStream,
+ which OutputStream to use for the results of the rendering. You can customize FOP's
+ behaviour in a rendering run by supplying your own FOUserAgent instance. The
+ FOUserAgent can, for example, be used to set your own Renderer instance (details
+ below). Finally, you retrieve a SAX DefaultHandler instance from the Fop object and
+ use that as the SAXResult of your transformation.
+
+ Apache FOP relies heavily on JAXP. It uses SAX events exclusively to receive the XSL-FO
+ input document. It is therefore a good idea that you know a few things about JAXP (which
+ is a good skill anyway). Let's look at the basic usage pattern for FOP...
+ Here is the basic pattern to render an XSL-FO file to PDF:
+
+ Let's discuss these 5 steps in detail:
+
+ If you're not totally familiar with JAXP Transformers, please have a look at the
+ Embedding examples below. The section contains examples
+ for all sorts of use cases. If you look at all of them in turn you should be able
+ to see the patterns in use and the flexibility this approach offers without adding
+ too much complexity.
+
+ This may look complicated at first, but it's really just the combination of an
+ XSL transformation and a FOP run. It's also easy to comment out the FOP part
+ for debugging purposes, for example when you're tracking down a bug in your
+ stylesheet. You can easily write the XSL-FO output from the XSL transformation
+ to a file to check if that part generates the expected output. An example for that
+ can be found in the Embedding examples (See "ExampleXML2FO").
+
+ Logging is now a little different than it was in FOP 0.20.5. We've switched from
+ Avalon Logging to Jakarta Commons Logging.
+ While with Avalon Logging the loggers were directly given to FOP, FOP now retrieves
+ its logger(s) through a statically available LogFactory. This is similar to the
+ general pattern that you use when you work with Apache Log4J directly, for example.
+ We call this "static logging" (Commons Logging, Log4J) as opposed to "instance logging"
+ (Avalon Logging). This has a consequence: You can't give FOP a logger for each
+ processing run anymore. The log output of multiple, simultaneously running FOP instances
+ is sent to the same logger.
+
+ By default, Jakarta Commons Logging uses
+ JDK logging (available in JDKs 1.4 or higher) as its backend. You can configure Commons
+ Logging to use an alternative backend, for example Log4J. Please consult the
+ documentation for Jakarta Commons Logging on
+ how to configure alternative backends.
+
+ Once the Fop instance is set up, call
+ If you want to process XSL-FO generated from XML using XSLT we recommend
+ again using standard JAXP to do the XSLT part and piping the generated SAX
+ events directly through to FOP. The only thing you'd change to do that
+ on the basic usage pattern above is to set up the Transformer differently:
+
+ The input XSL-FO document is always received by FOP as a SAX stream (see the
+ Parsing Design Document for the rationale).
+
+ However, you may not always have your input document available as a SAX stream.
+ But with JAXP it's easy to convert different input sources to a SAX stream so you
+ can pipe it into FOP. That sounds more difficult than it is. You simply have
+ to set up the right Source instance as input for the JAXP transformation.
+ A few examples:
+
+ There are a variety of upstream data manipulations possible.
+ For example, you may have a DOM and an XSL stylesheet; or you may want to
+ set variables in the stylesheet. Interface documentation and some cookbook
+ solutions to these situations are provided in
+ Xalan Basic Usage Patterns.
+
+ Apache FOP provides two levels on which you can customize FOP's
+ behaviour: the FopFactory and the user agent.
+
+ The FopFactory holds configuration data and references to objects which are reusable over
+ multiple rendering runs. It's important to instantiate it only once (except in special
+ environments) and reuse it every time to create new FOUserAgent and Fop instances.
+
+ You can set all sorts of things on the FopFactory:
+
+ The font base URL to use when resolving relative URLs for fonts. Example:
+
+ Disable strict validation. When disabled FOP is less strict about the rules
+ established by the XSL-FO specification. Example:
+
+ Enable an alternative set of rules for text indents that tries to mimic the behaviour of many commercial
+ FO implementations, that chose to break the specification in this respect. The default of this option is
+ 'false', which causes Apache FOP to behave exactly as described in the specification. To enable the
+ alternative behaviour, call:
+
+ Set the source resolution for the document. This is used internally to determine the pixel
+ size for SVG images and bitmap images without resolution information. Default: 72 dpi. Example:
+
+ Manually add an ElementMapping instance. If you want to supply a special FOP extension
+ you can give the instance to the FOUserAgent. Normally, the FOP extensions can be automatically detected
+ (see the documentation on extension for more info). Example:
+
+ Set a URIResolver for custom URI resolution. By supplying a JAXP URIResolver you can add
+ custom URI resolution functionality to FOP. For example, you can use
+ Apache XML Commons Resolver to make use of XCatalogs. Example:
+
+ The user agent is the entity that allows you to interact with a single rendering run, i.e. the processing of a single
+ document. If you wish to customize the user agent's behaviour, the first step is to create your own instance
+ of FOUserAgent using the appropriate factory method on FopFactory and pass that
+ to the factory method that will create a new Fop instance:
+
+ You can do all sorts of things on the user agent:
+
+ The base URL to use when resolving relative URLs. Example:
+
+ Set the producer of the document. This is metadata information that can be used for certain output formats such as PDF. The default producer is "Apache FOP". Example:
+
+ Set the creating user of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
+
+ Set the author of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
+
+ Override the creation date and time of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
+
+ Set the title of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
+
+ Set the keywords of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
+
+ Set the target resolution for the document. This is used to
+ specify the output resolution for bitmap images generated by bitmap renderers
+ (such as the TIFF renderer) and by bitmaps generated by Apache Batik for filter
+ effects and such. Default: 72 dpi. Example:
+
+ Set your own Renderer instance. If you want to supply your own renderer or
+ configure a Renderer in a special way you can give the instance to the FOUserAgent. Normally,
+ the Renderer instance is created by FOP. Example:
+
+ Set your own FOEventHandler instance. If you want to supply your own FOEventHandler or
+ configure an FOEventHandler subclass in a special way you can give the instance to the FOUserAgent. Normally,
+ the FOEventHandler instance is created by FOP. Example:
+
+ Set a URIResolver for custom URI resolution. By supplying a JAXP URIResolver you can add
+ custom URI resolution functionality to FOP. For example, you can use
+ Apache XML Commons Resolver to make use of XCatalogs. Example:
+
+ Instead of setting the parameters manually in code as shown above you can also set
+ many values from an XML configuration file:
+
+ The layout of the configuration file is described on the Configuration page.
+
+ Fop instances shouldn't (and can't) be reused. Please recreate
+ Fop and FOUserAgent instances for each rendering run using the FopFactory.
+ This is a cheap operation as all reusable information is held in the
+ FopFactory. That's why it's so important to reuse the FopFactory instance.
+
+ If your XSL-FO files contain SVG then Apache Batik will be used. When Batik is
+ initialised it uses certain classes in
+ The thread means that the Java application may not automatically quit
+ when finished, you will need to call
+ If you run into trouble running FOP on a head-less server, please see the
+ notes on Batik.
+
+ To get the number of pages that were rendered by FOP you can call
+
+ There are several options to consider:
+
+ Apache FOP may currently not be completely thread safe.
+ The code has not been fully tested for multi-threading issues, yet.
+ If you encounter any suspicious behaviour, please notify us.
+
+ There is also a known issue with fonts being jumbled between threads when using
+ the Java2D/AWT renderer (which is used by the -awt and -print output options).
+ In general, you cannot safely run multiple threads through the AWT renderer.
+
+ The directory "{fop-dir}/examples/embedding" contains several working examples.
+ This
+
+ example
+demonstrates the basic usage pattern to transform an XSL-FO
+file to PDF using FOP.
+ This
+
+ example
+has nothing to do with FOP. It is there to show you how an XML
+file can be converted to XSL-FO using XSLT. The JAXP API is used to do the
+transformation. Make sure you've got a JAXP-compliant XSLT processor in your
+classpath (ex. Xalan).
+ This
+
+ example
+demonstrates how you can convert an arbitrary XML file to PDF
+using XSLT and XSL-FO/FOP. It is a combination of the first two examples
+above. The example uses JAXP to transform the XML file to XSL-FO and FOP to
+transform the XSL-FO to PDF.
+
+The output (XSL-FO) from the XSL transformation is piped through to FOP using
+SAX events. This is the most efficient way to do this because the
+intermediate result doesn't have to be saved somewhere. Often, novice users
+save the intermediate result in a file, a byte array or a DOM tree. We
+strongly discourage you to do this if it isn't absolutely necessary. The
+performance is significantly higher with SAX.
+ This
+
+ example
+is a preparatory example for the next one. It's an example that
+shows how an arbitrary Java object can be converted to XML. It's an often
+needed task to do this. Often people create a DOM tree from a Java object and
+use that. This is pretty straightforward. The example here, however, shows how
+to do this using SAX, which will probably be faster and not even more
+complicated once you know how this works.
+
+For this example we've created two classes: ProjectTeam and ProjectMember
+(found in xml-fop/examples/embedding/java/embedding/model). They represent
+the same data structure found in
+xml-fop/examples/embedding/xml/xml/projectteam.xml. We want to serialize to XML a
+project team with several members which exist as Java objects.
+Therefore we created the two classes: ProjectTeamInputSource and
+ProjectTeamXMLReader (in the same place as ProjectTeam above).
+
+The XMLReader implementation (regard it as a special kind of XML parser) is
+responsible for creating SAX events from the Java object. The InputSource
+class is only used to hold the ProjectTeam object to be used.
+
+Have a look at the source of ExampleObj2XML.java to find out how this is
+used. For more detailed information see other resources on JAXP (ex.
+An older JAXP tutorial).
+ This
+
+ example
+combines the previous and the third to demonstrate
+how you can transform a Java object to a PDF directly in one smooth run
+by generating SAX events from the Java object that get fed to an XSL
+transformation. The result of the transformation is then converted to PDF
+using FOP as before.
+ This
+
+ example
+has FOP use a DOMSource instead of a StreamSource in order to
+use a DOM tree as input for an XSL transformation.
+ This
+
+ example
+shows the usage of the PDF Transcoder, a sub-application within FOP.
+It is used to generate a PDF document from an SVG file.
+
+These examples should give you an idea of what's possible. It should be easy
+to adjust these examples to your needs. Also, if you have other examples that you
+think should be added here, please let us know via either the fop-users or fop-dev
+mailing lists. Finally, for more help please send your questions to the fop-users
+mailing list.
+
+ By "extension", we mean any data that can be placed in the input XML document that
+ is not addressed by the XSL-FO standard.
+ By having a mechanism for supporting extensions, FOP is able to add features that
+ are not covered in the specification.
+
+ The extensions documented here are included with FOP, and are automatically available
+ to you. If you wish to add an extension of your own to FOP, please see the
+ Developers' Extension Page.
+
+ Please see the SVG documentation for more details.
+
+ By convention, FO extensions in FOP use the "fox" namespace prefix.
+ To use any of the FO extensions, add a namespace entry for
+
+ In previous versions of Apache FOP there was a This extension element hasn't been reimplemented for the redesigned code, yet. This extension element hasn't been reimplemented for the redesigned code, yet.
+ The two proprietary extension properties, fox:orphan-content-limit and
+ fox:widow-content-limit, are used to improve the layout of list-blocks and tables.
+ If you have a table with many entries, you don't want a single row to be left over
+ on a page. You will want to make sure that at least two or three lines are kept
+ together. The properties take an absolute length which specifies the area at the
+ beginning (fox:widow-content-limit) or at the end (fox:orphan-content-limit) of a
+ table or list-block. The properties are inherited and only have an effect on fo:table
+ and fo:list-block. An example: fox:widow-content-limit="3 * 1.2em" would make sure
+ the you'll have at least three lines (assuming line-height="1.2") together on a table
+ or list-block.
+ The following table summarizes the font capabilities of the various FOP renderers: The Adobe PDF Specification specifies a set of 14 fonts that must be available to every PDF reader: Helvetica (normal, bold, italic, bold italic), Times (normal, bold, italic, bold italic), Courier (normal, bold, italic, bold italic), Symbol and ZapfDingbats. The AWT family of renderers (AWT, Print, SVG), use the Java AWT libraries for font metric information. Through operating system registration, the AWT libraries know what fonts are available on the system, and the font metrics for each one. Support for custom fonts is added by creating font metric files (written in XML) from the actual font files, and registering them with FOP. Currently only Type 1 and TrueType fonts can be added.
+More information about fonts can be found at: FOP includes PFMReader, which reads the PFM file that normally comes with a Type 1 font, and generates an appropriate font metrics file for it.
+To use it, run the class org.apache.fop.fonts.apps.PFMReader: Windows (on JDK 1.4 and later): Windows (on JDK 1.3.x): Unix (on JDK 1.4 and later): Unix (on JDK 1.3.1): PFMReader [options]: FOP includes TTFReader, which reads the TTF file and generates an appropriate font metrics file for it.
+Use it in a similar manner to PFMReader.
+For example, to create such a metrics file in Windows from the TrueType font at c:\myfonts\cmr10.ttf: TTFReader [options]: TrueType collections (.ttc files) contain more than one font.
+To create metrics files for these fonts, you must specify which font in the collection should be generated, by using the "-ttcname" option with the TTFReader. To get a list of the fonts in a collection, just start the TTFReader as if it were a normal TrueType file (without the -ttcname option).
+It will display all of the font names and exit with an Exception. Here is an example of generating a metrics file for a .ttc file: You must tell FOP how to find and use the font metrics files by registering them in the FOP Configuration. Add entries for your custom fonts, regardless of font type, to the configuration file in a manner similar to the following: Font embedding is enabled in the userconfig.xml file and controlled by the embed-url attribute.
+If you don't specify the embed-url attribute the font will not be embedded, but will only be referenced. When FOP embeds a font, it adds a prefix to the fontname to ensure that the name will not match the fontname of an installed font.
+This is helpful with older versions of Acrobat Reader that preferred installed fonts over embedded fonts. When embedding PostScript fonts, the entire font is always embedded. When embedding TrueType fonts (ttf) or TrueType Collections (ttc), a subset of the original font, containing only the glyphs used, is embedded in the output document.
+Currently, this embedded font contains only the minimum data needed to be embedded in a pdf document, and does not contain any codepage information.
+The PDF document contains indexes to the glyphs in the font instead of to encoded characters.
+While the document will be displayed correctly, the net effect of this is that searching, indexing, and cut-and-paste will not work properly. One workaround for this behavior is to use the "-enc ansi" option when generating metrics with TTFReader.
+This will cause the whole font to be embedded in the pdf document.
+Characters will be WinAnsi encoded (as specified in the PDF spec), so you lose the ability to use characters from other character sets.
+See Table of TTF Encoding Options for more details.
+ There are cases where you might want to force the embedding of one or more of the base 14 fonts that
+ can normally be considered available on the target platform (viewer, printer). One of these cases is
+ PDF/A which mandates the embedding of even the base 14 fonts. Embedding a font such as Helvetica or
+ Courier is straight-forward. The "Symbol" and "ZapfDingbats" fonts, however, currently present a
+ problem because FOP cannot correctly determine the encoding of these two single-byte fonts through
+ the PFM file. FOP now correctly interprets the "encoding" value in the XML font metrics file, but the
+ PFMReader application writes "UnknownEncoding" to the generated XML file. In order to embed "Symbol"
+ and "ZapfDingbats" you have to manually change the XML font metrics file and specify "SymbolEncoding"
+ or "ZapfdingbatsEncoding" encoding respectively as the value for the "encoding" element.
+ Example:
+ The table below summarizes the theoretical support for graphical formats within FOP. In other words, within the constraints of the limitations listed here, these formats should work. However, many of them have not been tested, and there may be limitations that have not yet been discovered or documented. The packages needed to support some formats are not included in the FOP distribution and must be installed separately. Follow the links in the "Support Thru" column for more details.
+
+ FOP has native ability to handle some graphic file formats.
+
+ Apache Batik contains codecs for PNG and TIFF access. FOP can use these.
+
+ For JDKs 1.4 or higher, FOP provides a wrapper to load images through the
+ JDK's Image I/O API (JSR 015).
+ Image I/O allows to dynamically add additional image codecs. An example of such an add-on library are the
+ JAI Image I/O Tools available from Sun.
+
+ Because of licensing issues, the JIMI image library is not included in the FOP distribution. First, download and install it.
+Then, copy the file "JimiProClasses.zip" from the archive to {fop-install-dir}/lib/jimi-1.0.jar. Please note that FOP binary distributions are compiled with JIMI support, so there is no need for you to build FOP to add the support. If jimi-1.0.jar is installed in the right place, it will automatically be used by FOP, otherwise it will not.
+
+ FOP has been compiled with JAI support, but JAI is not included in the FOP distribution.
+To use it, install JAI, then copy the jai_core.jar and the jai_codec.jar files to {fop-install-dir}/lib.
+JAI is much faster than JIMI, but is not available for all platforms. See What platforms are supported? on the JAI FAQ page for more details.
+ Current FOP distributions include a distribution of the Apache Batik version 1.6.
+It is automatically installed with FOP.
+Because Batik's API changes frequently, it is highly recommended that you use the version that ships with FOP, at least when running FOP. Batik must be run in a graphical environment.
+It uses AWT classes for rendering SVG, which in turn require an X server on Unixish systems.
+If you run a server without X, or if you can't connect to the X server due to security restrictions or policies (a so-called "headless" environment), SVG rendering will fail. Here are some workarounds: FOP native support for BMP images is limited to the RGB color-space. FOP provides support for two output targets:
+ Other output targets can't be supported at the moment because
+ FOP lacks a PostScript interpreter. Furthermore, FOP is not able
+ to parse the preview bitmaps sometimes contained in EPS files.
+ FOP native support of JPEG does not include all variants, especially those containing unusual color lookup tables and color profiles.
+If you have trouble with a JPEG image in FOP, try opening it with an image processing program (such as Photoshop or Gimp) and then saving it.
+Specifying 24-bit color output may also help.
+For the PDF and PostScript renderers most JPEG images can be passed through without decompression.
+User reports indicate that grayscale, RGB, and CMYK color-spaces are all rendered properly.
+ If using JAI for PNG support, only RGB and RGBA color-spaces are supported for FOP rendering. FOP uses Batik for SVG support.
+This format can be handled as an
+The SVG is rendered into PDF by using PDF commands to draw and fill
+lines and curves. This means that the graphical objects created with
+this remain as vector graphics.
+
+There are a number of SVG things that cannot be converted directly into
+PDF. Parts of the graphic such as effects, patterns and images are inserted
+into the PDF as a raster graphic. The resolution of this graphic may not
+be ideal depending on the FOP dpi (72dpi) and the scaling for that graphic.
+We hope to improve this in the future.
+Currently transparency is not supported in PDF so many svg images that
+contain effects or graphics with transparent areas will not be displayed
+correctly.
+ If possible, Batik will use normal PDF text when inserting text. It does
+this by checking if the text can be drawn normally and the font is
+supported. This example svg text.svg /
+text.pdf
+shows how various types and effects with text are handled.
+Note that tspan and outlined text are not yet implemented.
+Otherwise, text is converted and drawn as a set of shapes by batik, using the stroking text painter.
+This means that a typical character will
+have about 10 curves (each curve consists of at least 20 characters).
+This can make the pdf files large and when the pdf is viewed the
+viewer does not normally draw those fine curves very well (turning on
+Smooth Line Art in the Acrobat preferences will fix this).
+If the text is inserted into the PDF using the inbuilt text commands
+for PDF it will use a single character.
+ Note that because SVG text can be rendered as either text or a vector graphic, you may need to consider settings in your viewer for both.
+The Acrobat viewer has both "smooth line art" and "smooth text" settings that may need to be set for SVG images to be displayed nicely on your screen (see Edit / Preferences / Display).
+This setting will not affect the printing of your document, which should be OK in any case, but will only affect the quality of the screen display. Currently, SVG images are rendered with the dimensions specified in the SVG file, within the viewport specified in the fo:external-graphic element.
+For everything to work properly, the two should be equal.
+The SVG standard leaves this issue as an implementation detail.
+FOP will probably implement a scaling mechanism in the future. FOP-native TIFF support is limited to PDF and PostScript output only. Also, according to user reports, FOP's native support for TIFF is limited to images with the following characteristics (all must be true for successful rendering): JAI: Supports RGB and RGBA only for FOP rendering. Some bitmapped image file formats store a dots-per-inch (dpi) or other resolution value. Since PDF and most output formats do not have a concept of resolution, but only of absolute image units (i.e. pixels) FOP ignores the resolution values as well. Instead, FOP uses the dimensions of the image as specified in the fo:external-graphic element to render the image: If you need a higher apparent output resolution for bitmapped images, first make sure that at least one dimension of the image is defined in your XSL-FO input. Apart from that, resolution problems are in the image file itself, and must be corrected there: use or create a higher-resolution image file.
+ FOP caches images between runs. The URL is used as a key to identify images which means that when
+ a particular URL appears again, the image is taken from the cache. If you have a servlet that
+ generates a different image each time it is called with the same URL you need to use a constantly
+ changing dummy parameter on the URL to avoid caching.
+
+ The image cache has been improved considerably in the redesigned code. Therefore, a resetCache() method
+ has become unnecessary. If you still experience OutOfMemoryErrors, please notify us.
+ FOP uses Liang's hyphenation algorithm, well known from TeX. It needs
+ language specific pattern and other data for operation. Because of licensing issues (and for
+ convenience), all hyphenation patterns for FOP are made available through
+ the Objects For
+ Formatting Objects project. Many of the hyphenation files distributed with TeX and its offspring are
+ licenced under the LaTeX
+ Project Public License (LPPL), which prevents them from being
+ distributed with Apache software. The LPPL puts restrictions on file names
+ in redistributed derived works which we feel can't guarantee. Some
+ hyphenation pattern files have other or additional restrictions, for
+ example against use for commercial purposes. Although Apache FOP cannot redistribute hyphenation pattern files that do
+ not conform with its license scheme, that does not necessarily prevent users
+ from using such hyphenation patterns with FOP. However, it does place on
+ the user the responsibility for determining whether the user can rightly use
+ such hyphenation patterns under the hyphenation pattern license. The most important source of hyphenation pattern files is the
+ CTAN TeX
+ Archive. To install a custom hyphenation pattern for use with FOP: If you would like to build your own hyphenation pattern files, or modify
+ existing ones, this section will help you understand how to do so. Even
+ when creating a pattern file from scratch, it may be beneficial to start
+ with an existing file and modify it. See
+ OFFO's Hyphenation page for examples.
+ Here is a brief explanation of the contents of FOP's hyphenation patterns: If you want to convert a TeX hyphenation pattern file, you have to undo
+ the TeX encoding for non-ASCII text. FOP uses Unicode, and the patterns
+ must be proper Unicode too. You should be aware of the XML encoding issues,
+ preferably use a good Unicode editor. Note that FOP does not do Unicode character normalization. If you use
+ combining chars for accents and other character decorations, you must
+ declare character classes for them, and use the same sequence of base character
+ and combining marks in the XSLFO source, otherwise the pattern wouldn't match.
+ Fortunately, Unicode provides precomposed characters for all important cases
+ in common languages, until now nobody run seriously into this issue. Some dead
+ languages and dialects, especially ancient ones, may pose a real problem
+ though. If you want to generate your own patterns, an open-source utility called
+ patgen is available on many Unix/Linux distributions and every TeX
+ distribution which can be used to assist in
+ creating pattern files from dictionaries. Pattern creation for languages like
+ english or german is an art. If you can, read Frank Liang's original paper
+ "Word Hy-phen-a-tion by Com-pu-ter" (yes, with hyphens). It is not available
+ online. The original patgen.web source, included in the TeX source distributions,
+ contains valuable comments, unfortunately technical details obscure often the
+ high level issues. Another important source is
+ The
+ TeX Book, appendix H (either read the TeX source, or run it through
+ TeX to typeset it). Secondary articles, for example the works by Petr Sojka,
+ may also give some much needed insight into problems arising in automated
+ hyphenation.
+ The Apache FOP team is proud to present to you the largely rewritten codebase which is
+ finally in a state where you can use it. It has taken over three years to get this
+ far and over two years without a new release from the FOP project. We're still in the process of adding new
+ features. We welcome any feedback you might have and even more, any
+ other form of help to get the project forward.
+
+ This fourth release contains many bug fix release and new features compared
+ to 0.92beta. To see what has changed since the last release, please visit the
+ Changes Page and the Release Notes.
+
+ If you're upgrading to this version from an earlier version of FOP, please read the
+ information contained on the Upgrading page!
+
+ To download this version, please visit the download page.
+
+ The intermediate format (IF) is a proprietary XML format that represents the area tree
+ generated by the layout engine. The area tree is conceptually defined in the
+ XSL-FO specification in chapter 1.1.2.
+ The IF can be generated through the area tree XML Renderer (the XMLRenderer).
+
+ The intermediate format can be used to generate intermediate documents that are modified
+ before they are finally rendered to their ultimate output format. Modifications include
+ adjusting and changing trait values, adding or modifying area objects, inserting prefabricated
+ pages, overlays, imposition (n-up, rotation, scaling etc.). Multiple IF files can be combined
+ to a single output file.
+
+ As already mentioned, the IF is generated by using the XMLRenderer (MIME type:
+ application/X-fop-areatree). So, you basically set the right MIME type for
+ the output format and process your FO files as if you would create a PDF file. However, there
+ is an important detail to consider: The various Renderers don't all use the same font sources.
+ To be able to create the right area tree for the ultimate output file, you need to create
+ the IF file using the right font setup. This is achieved by telling the XMLRenderer to mimic
+ another renderer. This is done by calling the XMLRenderer's mimicRenderer() method with an
+ instance of the ultimate target renderer as the single parameter. This has a consequence: An
+ IF file rendered with the Java2DRenderer may not look as expected when it was actually generated
+ for the PDF renderer. For renderers that use the same font setup, this restriction does not
+ apply (PDF and PS, for example). Generating the intermediate format file is the first step.
+
+ The second step is to reparse the IF file using the AreaTreeParser which is
+ found in the org.apache.fop.area package. The pages retrieved from the IF file are added to an
+ AreaTreeModel instance from where they are normally rendered using one of the available Renderer
+ implementations. You can find examples for the IF processing in the
+
+ The basic pattern to parse the IF format looks like this:
+
+ This example simply reads an IF file and renders it to a PDF file. Please note, that in normal
+ FOP operation you're shielded from having to instantiate the FontInfo object yourself. This
+ is normally a task of the AreaTreeHandler which is not present in this scenario. The same
+ applies to the AreaTreeModel instance, in this case an instance of a subclass called
+ RenderPagesModel. RenderPagesModel is ideal in this case as it has very little overhead
+ processing the individual pages. An important line in the example is the call to
+
+ The intermediate format can also be used from the command-line
+ by using the "-atin" parameter for specifying the area tree XML as input file. You can also
+ specify a "mimic renderer" by inserting a MIME type between "-at" and the output file.
+
+ This initial example is obviously not very useful. It would be faster to create the PDF file
+ directly. As the ExampleConcat.java
+ example shows you can easily parse multiple IF files in a row and add the parsed pages to the
+ same AreaTreeModel instance which essentially concatenates all the input document to one single
+ output document.
+
+ One of the most important use cases for the intermediate format is obviously modifying the area
+ tree XML before finally rendering it to the target format. You can easily use XSLT to process
+ the IF file according to your needs. Please note, that we will currently not formally describe
+ the intermediate format. You need to have a good understanding its structure so you don't
+ create any non-parseable files. We may add an XML Schema and more detailed documentation at a
+ later time. You're invited to help us with that.
+
+ The generation of the intermediate format as well as it parsing process has been designed to allow
+ for maximum flexibility and optimization. Please note that you can call
+ FOP supports multiple output formats by using a different renderer for each format.
+ The renderers do not all have the same set of capabilities, sometimes because of
+ the output format itself, sometimes because some renderers get more development
+ attention than others.
+
+ Most FOP renderers use a FOP-specific system for font registration.
+ However, the Java2D/AWT and print renderers use the Java AWT package, which gets its
+ font information from the operating system registration.
+ This can result in several differences, including actually using different fonts,
+ and having different font metrics for the same font.
+ The net effect is that the layout of a given FO document can be quite different between
+ renderers that do not use the same font information.
+
+ The most obvious way to print your document is to use the FOP
+ print renderer, which uses the Java2D API (AWT).
+ However, you can also send output from the Postscript renderer directly to a Postscript
+ device, or output from the PCL renderer directly to a PCL device.
+
+ Here are Windows command-line examples for Postscript and PCL:
+
+ Here is some Java code to accomplish the task in UNIX:
+
+ Set the output MIME type to "application/x-pcl" (MimeConstants.MIME_PCL) and
+ it happily sends the PCL to the UNIX printer queue.
+
+ PDF is the best supported output format. It is also the most accurate
+ with text and layout. This creates a PDF document that is streamed out
+ as each page is rendered. This means that the internal page index
+ information is stored near the end of the document.
+ The PDF version supported is 1.4. PDF versions are forwards/backwards
+ compatible.
+
+ Note that FOP does not currently support "tagged PDF" or PDF/A-1a.
+ Support for PDF/A-1b and PDF/X has recently been added, however.
+
+ PDF has a set of fonts that are always available to all PDF viewers;
+ to quote from the PDF Specification:
+
+ "PDF prescribes a set of 14 standard fonts that can be used without prior
+ definition.
+ These include four faces each of three Latin text typefaces (Courier,
+ Helvetica, and Times), as well as two symbolic fonts (Symbol and ITC Zapf
+ Dingbats). These fonts, or suitable substitute fonts with the same metrics, are
+ guaranteed to be available in all PDF viewer applications."
+
+ FOP does not currently support several desirable PDF features: XMP metadata and watermarks.
+ One workaround is to use Adobe Acrobat (the full version, not the Reader) to process
+ the file manually or with scripting that it supports.
+
+ Another popular post-processing tool is iText,
+ which has tools for adding security features, document properties, watermarks, and many
+ other features to PDF files.
+
+ Here is some sample code that uses iText to encrypt a FOP-generated PDF. (Note that FOP now
+ supports PDF encryption. However the principles for using
+ iText for other PDF features are similar.)
+
+ Check the iText tutorial and documentation for setting access flags, password,
+ encryption strength and other parameters.
+
+ In addition to the PDF Post-processing options, consider the following workarounds:
+
+ The PostScript renderer has been brought up to a similar quality as the
+ PDF renderer, but may still be missing certain features. It provides good
+ support for most text and layout.
+ Images and SVG are not fully supported, yet. Currently, the PostScript
+ renderer generates PostScript Level 3 with most DSC comments. Actually,
+ the only Level 3 feature used is FlateDecode, everything else is Level 2.
+
+ This format is for the Hewlett-Packard PCL printers and other printers
+ supporting PCL. It should produce output as close to identical as possible
+ to the printed output of the PDFRenderer within the limitations of the
+ renderer, and output device.
+
+ The output created by the PCLRenderer is generic PCL 5, HP GL/2 and PJL.
+ This should allow any device fully supporting PCL 5 to be able to
+ print the output generated by the PCLRenderer. PJL is used to control the
+ print job and switch to the PCL language. PCL 5 is used for text, raster
+ graphics and rectangular fill graphics. HP GL/2 is used for more complex
+ painting operations. Certain painting operations are done off-screen and
+ rendered to PCL as bitmaps because of limitations in PCL 5.
+
+ The PCL renderer configuration currently allows the following settings:
+
+ The default value for the "rendering" setting is "speed" which causes borders
+ to be painted as plain rectangles. In this mode, no special borders (dotted,
+ dashed etc.) are available. If you want support for all border modes, set the
+ value to "quality" as indicated above. This will cause the borders to be painted
+ as bitmaps.
+
+ The default value for the "text-rendering" setting is "auto" which paints the
+ base fonts using PCL fonts. Non-base fonts are painted as bitmaps through Java2D.
+ If the mix of painting methods results in unwelcome output, you can set this
+ to "bitmap" which causes all text to be rendered as bitmaps.
+
+ You can control the output resolution for the PCL using the "target resolution"
+ setting on the FOUserAgent. The actual value will be rounded up to the next
+ supported PCL resolution. Currently, only 300 and 600 dpi are supported which
+ should be enough for most use cases. Note that this setting directly affects
+ the size of the output file and the print quality.
+ The PCL Renderer supports some PCL specific extensions which can be embedded
+ into the input FO document. To use the extensions the appropriate namespace must
+ be declared in the fo:root element like this:
+ The page-source extension attribute on fo:simple-page-master allows to
+ select the paper tray the sheet for a particular simple-page-master is
+ to be taken from. Example:
+
+ Note: the tray number is a positive integer and the value depends on
+ the target printer. Not all PCL printers support the same paper trays.
+ Usually,
+ "1" is the default tray,
+ "2" is the manual paper feed,
+ "3" is the manual envelope feed,
+ "4" is the "lower" tray and
+ "7" is "auto-select".
+ Consult the technical reference for your printer for all available values.
+
+ The FOP AFP Renderer deals with creating documents conforming to the IBM AFP document architecture
+ also refered to as MO:DCA (Mixed Object Document Content Architecture).
+ This list is most likely badly incomplete. The AFP Renderer requires special configuration particularly related to fonts.
+ AFP Render configuration is done through the normal FOP configuration file. The MIME type
+ for the AFP Renderer is application/x-afp which means the AFP Renderer section in the FOP configuration file
+ looks like: There are 3 font configuration variants supported: A typical raster font configuration looks like: An outline font configuration is simpler as the individual font size entries are not required.
+ However, the characterset definition is now required within the afp-font element. Experimentation has shown that the font metrics for the FOP built-in Base14 fonts are actually
+ very similar to some of the IBM outline and raster fonts. In cases were the IBM font files are not
+ available the path attribute in the afp-font element can be replaced by a base14-font attribute
+ giving the name of the matching Base14 font. In this case the AFP Renderer will take the
+ font metrics from the built-in font. By default the AFP Renderer converts all images to 8 bit grey level.
+ This can be overridden by the <images> configuration element. Example: This will put images as RGB images into the AFP output stream. The default setting is: Only the values "color" and "b+w" are allowed for the mode attribute. The bits-per-pixel
+ attribute is ignored if mode is "color". For "b+w" mode is must be 1, 4, or 8. The AFP Renderer supports some AFP specific extensions which can be embedded into the input
+ fo document. To use the extensions the appropriate namespace must be declared in the fo:root element like this: The include-page-overlay extension element allows to define on a per simple-page-master basis a page overlay resource. Example: The mandatory name attribute must refer to an 8 character (space padded) resource name that
+ must be known in the AFP processing environment. The include-page-segment extension element allows to define resource substitution for fo:external-graphics elements.
+ Example: The include-page-segment extension element can only occur within a simple-page-master.
+ Multiple include-page-segment extension elements within a simple-page-master are allowed.
+ The mandatory name attribute must refer to an 8 character
+ (space padded) resource name that must be known in the AFP processing environment.
+ The value of the mandatory src attribute is compared against the value of the src attribute in
+ fo:external-graphic elements and if it is identical (string matching is used) in the generated
+ AFP the external graphic is replaced by a reference to the given resource.
+ The tag-logical-element extension element allows to injects TLEs into the AFP output stream. Example:
+ Example: The tag-logical-element extension element can only occur within a simple-page-master.
+ Multiple tag-logical-element extension elements within a simple-page-master are allowed.
+ The name and value attributes are mandatory.
+
+ JFOR, an open source XSL-FO to RTF converter has been integrated into Apache FOP.
+ This will create an RTF (rich text format) document that will
+ attempt to contain as much information from the fo document as
+ possible. The RTF output follows Microsoft's RTF specifications
+ and produces best results on Microsoft Word.
+
+ This is primarily for testing and verification. The XML created is simply
+ a representation of the internal area tree put into XML. We use that to verify
+ the functionality of FOP's layout engine.
+
+ The other use case of the Area Tree XML is as FOP's "intermediate format". More information
+ on that can be found on the page dedicated to the Intermediate Format.
+
+ The Java2DRenderer provides the basic functionality for all
+ Java2D-based output formats (AWT viewer, direct print, PNG, TIFF).
+
+ The AWT viewer shows a window with the pages displayed inside a
+ Java graphic. It displays one page at a time.
+ The fonts used for the formatting and viewing depend on the fonts
+ available to your JRE.
+
+ It is possible to directly print the document from the command line.
+ This is done with the same code that renders to the Java2D/AWT renderer.
+
+ It is possible to directly create bitmap images from the individual
+ pages generated by the layout engine.
+ This is done with the same code that renders to the Java2D/AWT renderer.
+
+ Currently, two output formats are supported: PNG and TIFF. TIFF produces
+ one file with multiple pages, while PNG output produces one file per
+ page. The quality of the bitmap depends on the target resolution setting
+ on the FOUserAgent.
+
+ The TIFF and PNG renderer configuration currently allows the following settings:
+
+ The default value for the "transparent-page-background" setting is "false" which
+ paints an opaque, white background for the whole image. If you set this to true,
+ no such background will be painted and you will get a transparent image if
+ an alpha channel is available in the output format.
+
+ In addition to the above values the TIFF renderer configuration allows some additional
+ settings:
+
+ The default value for the "compression" setting is "PackBits" which
+ which is a widely supported RLE compression scheme for TIFF. The set of compression
+ names to be used here matches the set that the Image I/O API uses. Note that
+ not all compression schemes may be available during runtime. This depends on the
+ actual codecs being available. Here is a list of possible values:
+
+ The text renderer produces plain ASCII text output
+ that attempts to match the output of the PDFRenderer as closely as
+ possible. This was originally developed to accommodate an archive system
+ that could only accept plain text files, and is primarily useful for getting
+ a quick-and-dirty view of the document text. The renderer is very limited,
+ so do not be surprised if it gives unsatisfactory results.
+
+ The Text renderer works with a fixed size page buffer. The size of this
+ buffer is controlled with the textCPI and textLPI public variables.
+ The textCPI is the effective horizontal characters per inch to use.
+ The textLPI is the vertical lines per inch to use. From these values
+ and the page width and height the size of the buffer is calculated.
+ The formatting objects to be rendered are then mapped to this grid.
+ Graphic elements (lines, borders, etc) are assigned a lower priority
+ than text, so text will overwrite any graphic element representations.
+
+ Because FOP lays the text onto a grid during layout, there are frequently
+ extra or missing spaces between characters and lines, which is generally
+ unsatisfactory.
+ Users have reported that the optimal settings to avoid such spacing problems are:
+
+ Due to the state of certain renderers we moved some of them to a "sandbox" area until
+ they are ready for more serious use. The renderers and FOEventHandlers in the sandbox
+ can be found under src/sandbox and are compiled into build/fop-sandbox.jar during the
+ main build. The output formats in the sandbox are marked as such below.
+
+ This format is the Maker Interchange Format which is used by
+ Adobe Framemaker.
+
+ This format creates an SVG document that has links between the pages.
+ This is primarily for slides and creating svg images of pages.
+ Large documents will create SVG files that are far too large for
+ an SVG viewer to handle. Since FO documents usually have text the
+ SVG document will have a large number of text elements.
+ The font information for the text is obtained from the JVM in the
+ same way as for the AWT viewer. If the SVG is viewed on a
+ system where the fonts are different, such as another platform,
+ then the page may look wrong.
+
+ Apache FOP is easily extensible and allows you to add new output formats to enhance FOP's functionality. There's a number of output formats
+ which are on our wish list. We're looking for volunteers to help us implement them.
+
+ PDF/A is a standard which turns PDF into an "electronic document file
+ format for long-term preservation". PDF/A-1 is the first part of the
+ standard and is documented in
+ ISO 19005-1:2005(E).
+ Work on PDF/A-2 is in progress at
+ AIIM.
+
+ Design documentation on PDF/A can be found on FOP's Wiki on the
+ PDFA1ConformanceNotes page.
+
+ PDF/A-1b is implemented to the degree that FOP supports
+ the creation of the elements described in ISO 19005-1.
+
+ Tests have been performed against jHove and Adobe Acrobat 7.0.7 (Preflight function).
+ FOP does not validate completely against Apago's PDF Appraiser. Reasons unknown due to
+ lack of a full license to get a detailed error protocol.
+
+ PDF/A-1a is not implemented, yet. This is mostly because of the requirement
+ for tagged PDF which is not available in FOP, yet.
+
+ To activate PDF/A-1b from the command-line, specify "-pdfprofile PDF/A-1b"
+ as a parameter. If there is a violation of one of the validation rules for
+ PDF/A, an error message is presented and the processing stops.
+
+ When FOP is embedded in another Java application you can set a special option
+ on the renderer options in the user agent to activate the PDF/A-1b profile.
+ Here's an example:
+
+ If one of the validation rules of PDF/A is violated, an PDFConformanceException
+ (descendant of RuntimeException) is thrown.
+
+ There are a number of things that must be looked after if you activate a PDF/A
+ profile. If you receive a PDFConformanceException, have a look at the following
+ list (not necessarily comprehensive):
+
+ The PDF profiles "PDF/X-3:2003" and "PDF/A-1b" are compatible and can both be
+ activated at the same time.
+
+ FOP supports encryption of PDF output, thanks to Patrick
+ C. Lankswert. This feature is commonly used to prevent
+ unauthorized viewing, printing, editing, copying text from the
+ document and doing annotations. It is also possible to ask the
+ user for a password in order to view the contents. Note that
+ there already exist third party applications which can decrypt
+ an encrypted PDF without effort and allow the aforementioned
+ operations, therefore the degree of protection is limited.
+
+ For further information about features and restrictions regarding PDF
+ encryption, look at the documentation coming with Adobe Acrobat or the
+ technical documentation on the Adobe web site.
+
+ Encryption is enabled by supplying any of the encryption related
+ options.
+
+ An owner password is set with the
+ If no owner password has been supplied but FOP was asked to apply some
+ restrictions, a random password is used. In this case it is obviously
+ impossiible to disregard restrictions in PDF processing tools.
+
+ A user password, supplied with the
+ Further restrictions can be imposed by using the
+ When FOP is embedded in another Java application you need to set an
+ options map on the renderer. These are the supported options:
+
+ An example to enable PDF encryption in Java code:
+
+ The parameters for the constructor of PDFEncryptionParams are:
+
+ Alternatively, you can set each value separately in the Map provided by
+ FOUserAgent.getRendererOptions() by using the following keys:
+
+ In order to use PDF encryption, FOP has to be compiled with
+ cryptography support. Currently, only JCE
+ is supported. JCE is part of JDK 1.4. For earlier JDKs, it can
+ be installed separately. The build process automatically
+ detects JCE presence and installs PDF encryption support if
+ possible, otherwise a stub is compiled in.
+
+ Cryptography support must also be present at run time. In particular, a
+ provider for the RC4 cipher is needed. Unfortunately, the sample JCE
+ provider in Sun's JDK 1.4 does not provide RC4. If you
+ get a message saying
+
+ then you don't have the needed infrastructure.
+
+ There are several commercial and a few Open Source packages which
+ provide RC4. A pure Java implementation is produced by The Legion of the Bouncy
+ Castle. Mozilla
+ JSS is an interface to a native implementation.
+
+ The pure Java implementation from Bouncy Castle is easy to
+ install.
+
+ If you have any experience with Mozilla JSS or any other
+ cryptography provider, please post it to the fop-user list.
+
+ PDF/X is a standard which faciliates prepress digital data exchange using PDF.
+ Currently, only PDF/X-3:2003 is implemented out of the many different flavours of PDF/X
+ profiles. PDF/X-3:2003 is documented in
+ ISO 15930-6:2003(E).
+ More info on PDF/X can be found on the
+ PDF/X info site.
+
+ PDF/X-3:2003 is implemented to the degree that FOP supports
+ the creation of the elements described in ISO 15930-6.
+
+ An important restriction of the current implementation is that all normal
+ RGB colors specified in XSL-FO and SVG are left unchanged in the sRGB color
+ space (XSL-FO and SVG both use sRGB as their default color space).
+ There's no conversion to a CMYK color space. Although sRGB is a
+ calibrated color space, its color space has a different size than a CMYK
+ color space which makes the conversion a lossy conversion and can lead to
+ unwanted results. Although the use of the calibrated sRGB has been promoted
+ for years, print shops usually prefer to convert an sRGB PDF to CMYK prior
+ to production. Until there's full CMYK support in FOP you will have to
+ work closely with your print service provider to make sure you get the
+ intended result.
+
+ Tests have been performed against Adobe Acrobat 7.0.7 (Preflight function).
+ Note that there are bugs in Adobe Acrobat which cause false alarms if both
+ PDF/A-1b and PDF/X-3:2003 are activated at the same time.
+
+ To activate PDF/X-3:2003 from the command-line, specify "-pdfprofile PDF/X-3:2003"
+ as a parameter. If there is a violation of one of the validation rules for
+ PDF/X, an error message is presented and the processing stops.
+
+ When FOP is embedded in another Java application you can set a special option
+ on the renderer options in the user agent to activate the PDF/A-1b profile.
+ Here's an example:
+
+ If one of the validation rules of PDF/X is violated, an PDFConformanceException
+ (descendant of RuntimeException) is thrown.
+
+ There are a number of things that must be looked after if you activate a PDF/X
+ profile. If you receive a PDFConformanceException, have a look at the following
+ list (not necessarily comprehensive):
+
+ The PDF profiles "PDF/X-3:2003" and "PDF/A-1b" are compatible and can both be
+ activated at the same time.
+ The following software must be installed: The following software is optional, depending on your needs: In addition, the following system requirements apply:
+ Basic FOP installation consists of first unzipping the
+ Some Mac OSX users have experienced filename truncation problems using Stuffit to unzip
+ and unarchive their distribution media. This is a legacy of older Mac operating systems,
+ which had a 31-character pathname limit. Several Mac OSX users have recommended that
+ Mac OSX users use the shell command
+ The usual and recommended practice for starting FOP from the command line is to run the
+ batch file fop.bat (Windows) or the shell script fop (Unix/Linux).
+ If you write your own scripts, be sure to review these standard scripts to make sure that
+ you get your environment properly configured.
+
+ The standard scripts for starting FOP require that the environment variable JAVA_HOME be
+ set to a path pointing to the appropriate Java installation on your system. Macintosh OSX
+ includes a Java environment as part of its distribution. We are told by Mac OSX users that
+ the path to use in this case is
+ As an alternative to the start scripts you can run "java -jar build/fop.jar" in which case
+ FOP tries to build the classpath for running FOP dynamically. Please note, that this might
+ not always work as expected.
+
+ PDF encryption is only available if FOP was compiled with encryption support
+ and if compatible encryption support is availabe at run time.
+ Currently, only the JCE is supported. Check the Details.
+
+ FOP sessions that use -xml and -xsl input instead of -fo input are actually
+ controlling two distinct conversions: Tranforming XML to XSL-FO, then formatting
+ the XSL-FO to PDF (or another FOP output format).
+ Although FOP controls both of these processes, the first is included merely as
+ a convenience and for performance reasons.
+ Only the second is part of FOP's core processing.
+ If a user has a problem running FOP, it is important to determine which of these
+ two processes is causing the problem.
+ If the problem is in the first process, the user's stylesheet is likely the cause.
+ The FOP development team does not have resources to help with stylesheet issues,
+ although we have included links to some useful
+ Specifications and
+ Books/Articles.
+ If the problem is in the second process, FOP may have a bug or an unimplemented
+ feature that does require attention from the FOP development team.
+
+ In the case of using -xml and -xsl input, although the user is responsible for
+ the XSL-FO code that is FOP's input, it is not visible to the user. To make the
+ intermediate FO file visible, the FOP distribution includes the "-foout" option
+ which causes FOP to run only the first (transformation) step, and write the
+ results to a file. (See also the Xalan command-line below)
+
+ The -foout option works the same way as if you would call the
+ Xalan command-line:
+
+
+ Note that there are some subtle differences between the FOP and Xalan command-lines.
+
+ FOP can consume quite a bit of memory, even though this has been continually improved.
+ This is partly inherent to the formatting process and partly caused by implementation choices.
+ All FO processors currently on the market have memory problems with certain layouts.
+
+ If you are running out of memory when using FOP, here are some ideas that may help:
+
+ One of FOP's stated design goals is to be able to process input of arbitrary size.
+ Addressing this goal is one of the prime motivations behind the
+ FOP Redesign.
+ If you have problems running FOP, please see the "How to get Help" page.
+ This page discusses topic all around using Apache FOP in a servlet environment.
+
+ In the directory {fop-dir}/src/java/org/apache/fop/servlet, you'll find a working example
+ of a FOP-enabled servlet.
+
+ The servlet is automatically built when you build Apache FOP using the supplied Ant script. After building
+ the servlet, drop fop.war into the webapps directory of Apache Tomcat (or any other web container). Then, you can use
+ URLs like the following to generate PDF files:
+ The source code for the servlet can be found under {fop-dir}/src/java/org/apache/fop/servlet/FopServlet.java.
+ Here is a minimal code snippet to demonstrate the basics:
+
+ A common requirement is to transform an XML source to
+ XSL-FO using an XSL transformation. It is recommended to use
+ JAXP for this task. The following snippet shows the basic
+ code:
+
+ The
+ Because you have an explicit
+ You can easily set up your own FOUserAgent as demonstrated on the Embedding page.
+
+ There are several options to consider:
+
+ Of course, the
+ performance hints from the Embedding page
+ apply here, too.
+
+ Some versions of Internet Explorer will not automatically show the PDF or call the servlet multiple times.
+ These are well-known limitations of Internet Explorer and are not a problem of the servlet.
+ However, Internet Explorer can still be used to download the PDF so that it can be viewed later.
+ Here are some suggestions in this context:
+
+ When using a servlet engine, there are potential CLASSPATH issues, and potential conflicts
+ with existing XML/XSLT libraries. Servlet containers also often use their own classloaders
+ for loading webapps, which can cause bugs and security problems.
+
+ Check Tomcat's documentation for detailed instructions about installing FOP and Cocoon.
+ There are known bugs that must be addressed, particularly for Tomcat 4.0.3.
+
+ Put a copy of a working parser in some directory where WebSphere can access it.
+ For example, if /usr/webapps/yourapp/servlets is the CLASSPATH for your servlets,
+ copy the Xerces jar into it (any other directory would also be fine).
+ Do not add the jar to the servlet CLASSPATH, but add it to the CLASSPATH of the
+ application server which contains your web application.
+ In the WebSphere administration console, click on the "environment" button in the
+ "general" tab. In the "variable name" box, enter "CLASSPATH".
+ In the "value" box, enter the correct path to the parser jar file
+ (/usr/webapps/yourapp/servlets/Xerces.jar in our example here).
+ Press "OK", then apply the change and restart the application server.
+
+ Sometimes the requirements for a servlet get quite sophisticated: SQL data sources,
+ multiple XSL transformations, merging of several datasources etc. In such a case
+ consider using Apache Cocoon instead
+ of a custom servlet to accomplish your goal.
+
+ If you're planning to upgrade to the latest FOP version there are a few very important things
+ to consider:
+
+ The new code is much more strict about the interpretation of the XSL-FO 1.0 specification.
+ Things that worked fine in version 0.20.5 might start to produce warnings or even errors
+ now. FOP 0.20.5 contains many bugs which have been corrected in the new code.
+
+ When you use your existing FO files or XML/XSL files which work fine with FOP version
+ 0.20.5 against this FOP version some things may not work as expected. The following
+ list will hopefully help you to identify and correct those problems.
+
One of FOP's design goals is conformance to the
- W3C XSL-FO 1.0 standard, which specifies three levels
+ W3C XSL-FO 1.0 standard, which specifies three levels
of "conformance": basic, extended, and complete. Although FOP does not currently conform to
any of these levels, it is nevertheless a useful work-in-progress for many applications.
The information presented here demonstrates FOP's progress toward the goal of conformance,
@@ -183,7 +183,7 @@
merge-property-values
-
The following is a summary of FOP's current support for the standard XSL-FO objects.
The following is a summary of FOP's current support for the standard XSL-FO properties.
The following is a summary of FOP's current support for the XSL-FO Core Function Library.
When it's ready and the committers have enough time to go through
- the time-consuming process of creating a release. We'll try to do
- a new release every 3 or 4 months, but that's no promise. If you
+ the time-consuming process of creating a release. We
+ released version 0.93 on 9 January 2007, and intend to
+ release version 1.0 later in 2007. If you
want to speed up the process, consider to
contribute to FOP. The core redesign of FOP was necessary in order to be able to adress following issues: The code redesign of FOP was necessary in order to be able to adress following issues:
If you run FOP embedded in your servlet, web application or
other Java application, check the classpath of the
- application. Check the also the information pertaining servlet engines
+ application. Check the also the information pertaining to servlet engines
for further hints.
@@ -240,7 +241,7 @@
- See FOP Memory.
+ See FOP Memory.
If you use XSLT, problems in your style sheet and in your
source XML also can produce a NullPointerException. Run the transformation
+ href="0.93/running.html#check-input">Run the transformation
separately to check for this, usually you'll get a
detailed error message from the XSLT processor.
See the article "Review FOP's Standards Compliance". See FOP's Standards Compliance page.
-
-
-
- Attribute
- Description
- Required
-
-
- fofile
- XSL-FO file to be rendered
- Yes, if no fileset nested element is used
-
-
- outfile
- Output filename
- Yes, when fofile is used. (This attribute is not valid for filesets.)
-
-
- format
- Possible output formats:
-
- application/pdf
- application/postscript
- application/vnd.mif
- application/rtf
- application/vnd.hp-PCL
- text/plain
- text/xml
- No, defaults to
- application/pdf
-
- outdir
- Output directory
- Required if a fileset is used to specify the files to render; optional for fofile. (Can alternatively specify the full path in the fofile value.)
-
-
- force
- Recreate target files, even if they are newer than their corresponding
- source files. Note: This attribute is available in post-0.20.5
- versions (0.20.x nightly build and 1.0dev) only; target files are
- always generated (i.e., force=true) in 0.20.5 release.
-
- No, default is
- false
-
- basedir
- Base directory to resolve relative references (e.g., graphics files) within the
- FO document.
-
- No, for single FO File entry, default is to use the location
- of that FO file.
-
-
-
- relativebase
- For fileset usage only. A value of
- true
specifies using the location
- of each .fo file as the base directory for resolving relative file references located
- within that .fo file. A value of false
specifies using the value of
- basedir for all files within the fileset, or just the current working directory
- if basedir is not specified.
- No, default is
- false
.
-
-
- userconfig
- User configuration file (same as the FOP "-c" command line option).
- No
-
-
- messagelevel
- Logging level
-
- Possible values: error
, warn
, info
, verbose
, debug
. Currently doesn't work in FOP Trunk!!!No, defaults to
- verbose
-
- logFiles
- Controls whether the names of the files that are processed are logged
- (
- true
) or not (false
). Currently doesn't work in FOP Trunk!!!No, default is
- true
-
-
- Attribute
- Description
- Required
-
-
- fileset
- FileSets
- are used to specify multiple XSL-FO files to be rendered.
- Yes, if no fofile attribute is supplied
-
-
-
-
- {fop-dir}/conf/fop.xconf
to a location of your choice, and then to
- edit it according to your needs.
- It contains templates for the various configuration options, most of which are commented
- out. Remove the comments and change the settings for entries that you wish to use.
- Be sure to follow any instructions, including comments which specify the value range.
- Also, since the configuration file is XML, be sure to keep it well-formed.
-
-
-
-
-
-
- Element
- Data Type (for the value)
- Default Value
-
-
- base
- URL or directory
- Specifies the base URL based on which relative URL will be resolved.
-
-
- font-base
- URL or directory
- Specifies the base URL based on which relative font URLs will be resolved.
- If not specified defaults to the base URL above.
-
-
-
- hyphenation-base
- URL or directory
- Specifies the base URL based on which relative URLs to hyphenation pattern
- files will be resolved. If not specified, support for user-supplied hyphenation
- patterns remains disabled.
-
-
-
- source-resolution
- Integer, dpi
-
- Resolution in dpi (dots per inch) which is used internally to determine the pixel
- size for SVG images and bitmap images without resolution information.
-
-
-
- target-resolution
- Integer, dpi
-
- Resolution in dpi (dots per inch) used to specify the output resolution for bitmap
- images generated by bitmap renderers (such as the TIFF renderer) and by bitmaps
- generated by Apache Batik for filter effects and such.
-
-
-
- strict-validation
- Boolean (true, false)
-
- Setting this option to 'false' causes FOP to be more forgiving about XSL-FO validity,
- for example, you're allowed to specify a border on a region-body which is supported
- by some FO implementations but is non-standard. Note that such a border would
- currently have no effect in Apache FOP.
-
-
- break-indent-inheritance
- Boolean (true, false)
-
- Setting this option to 'true' causes FOP to use an alternative rule set to determine
- text indents specified through margins, start-indent and end-indent. Many commercial
- FO implementations have chosen to break the XSL specification in this aspect. This
- option tries to mimic their behaviour. Please note that Apache FOP may still not
- behave exactly like those implementations either because FOP has not fully matched
- the desired behaviour and because the behaviour among the commercial implementations
- varies. The default for this option (i.e. false) is to behave exactly like the
- specification describes.
-
-
- default-page-settings
- n/a
-
- Specifies the default width and height of a page if "auto" is specified
- for either or both values. Use "height" and "width" attributes on the
- default-page-settings element to specify the two values.
-
-
- renderers
- (see text below)
- Contains the configuration for each renderer. See below.
-
-
-
- schema
element:
-
-
-
-and run the configuration file through a validating schema
-parser. Note that the schema cannot detect all errors, and that it is
-stricter about the order of some elements than FOP itself is.-d
). This makes FOP report which configuration
-information it finds. Check if FOP finds what you expect.
-
- transform()
method returns FOP will also have finished converting
- the FO file to a PDF file and you can close the OutputStream.
- getDefaultHandler()
to obtain a SAX
- DefaultHandler instance to which you can send the SAX events making up the XSL-FO
- document you'd like to render. FOP processing starts as soon as the DefaultHandler's
- startDocument()
method is called. Processing stops again when the
- DefaultHandler's endDocument()
method is called. Please refer to the basic
- usage pattern shown above to render a simple XSL-FO document.
-
-
- Source src = new StreamSource("http://localhost:8080/testfile.xml");
- Source src = new StreamSource(new File("C:/Temp/myinputfile.xml"));
- Source src = new StreamSource(new StringReader(myString)); // myString is a String
- Source src = new StreamSource(new MyInputStream(something));
- Source src = new StreamSource(new ByteArrayInputStream(myBuffer)); // myBuffer is a byte[] here
- Source src = new DOMSource(myDocument); // myDocument is a Document or a Node
-
-
-
-
- java.awt
that
- intialise the Java AWT classes. This means that a daemon thread
- is created by the JVM and on Unix it will need to connect to a
- DISPLAY.
- System.exit()
. These
- issues should be fixed in the JDK 1.4.
- Fop.getResults()
. This returns a FormattingResults
object
- where you can look up the number of pages produced. It also gives you the
- page-sequences that were produced along with their id attribute and their
- numbers of pages. This is particularly useful if you render multiple
- documents (each enclosed by a page-sequence) and have to know the number of
- pages of each document.
-
-
- out = new java.io.BufferedOutputStream(out);
-
- Make sure you properly close the OutputStream when FOP is finished.
- Templates
object and reuse it each time you do
- the XSL transformation. (More information can be found
- here.)
- http://xml.apache.org/fop/extensions
to the root element:
- fox:outline
element
- which was used to create outlines in PDF files. The redesigned code makes use
- of the new bookmark feature defined in the latest XSL 1.1 working draft.
-
-
-
-
- Renderer
- Base-14
- AWT/OS
- Custom
- Custom Embedding
-
-
- PDF
- yes
- no
- yes
- yes
-
-
-
- PostScript
- yes
- no
- yes
- yes
-
-
- TXT
- yes (used for layout but not for output)
- no
- yes (used for layout but not for output)
- no
-
-
- AWT
- if available from OS
- yes
- yes
- n/a (display only)
-
-
- Print
- if available from OS
- yes
- yes
- controlled by OS printer driver
-
-
- RTF
- n/a (font metrics not needed)
- n/a
- n/a
- n/a
-
-
- MIF
- n/a (font metrics not needed)
- n/a
- n/a
- n/a
-
-
- SVG
- if available from OS
- yes
- no
- no
-
-
- XML
- yes
- no
- yes
- n/a
-
-
-
-
-
-
-
-
-
-
- Issue
- WinAnsi
- CID-keyed
-
-
- Usable Character Set
- Limited to WinAnsi character set, which is roughly equivalent to iso-8889-1.
- Limited only by the characters in the font itself.
-
-
- Character Encoding in the Output Document.
- Correct.
- Never correct. Search, index, and cut-and-paste operations in the output document
-will produce incorrect results.
-
-
- Character Display
- Correct.
- Correct, but copy/paste won't work in Acrobat Reader. (FOP currently doesn't emit the /ToUnicode table which is necessary for copy/paste to work.)
-
-
- Embedding the Font
- Optional.
- Mandatory. Not embedding the font produces invalid PDF documents.
-
-
-
-
-
-
-
- Format
- Type
- FOP native support
- Batik SVG
- Batik codecs
- Image I/O
- JAI
- JIMI
-
-
- BMP (Microsoft Windows Bitmap)
- bitmap
- X
-
-
-
-
-
-
-
- EPS (Encapsulated PostScript)
- metafile (both bitmap and vector), probably most frequently used for vector drawings
- (X)
-
-
-
-
-
-
-
- GIF (Graphics Interchange Format)
- bitmap
- X
-
-
- X
- X
- X
-
-
- JPEG (Joint Photographic Experts Group)
- bitmap
- (X)
-
-
-
-
-
-
-
- PNG (Portable Network Graphic)
- bitmap
-
-
- X
-
-
-
-
-
- SVG (Scalable Vector Graphics)
- vector (with embedded bitmaps)
-
- X
-
-
-
-
-
-
- TIFF (Tag Image Format File)
- bitmap
- (X)
-
- X
-
- X
-
-
-
-
- -Djava.awt.headless=true
command line option.
-
- fo:instream-foreign-object
or in a separate
-file referenced with fo:external-graphic
.
-
-
-
-
-
-
-
- {fop-dir}/hyph/hyphenation.dtd
.languageCode_countryCode.xml
. The country code is
- optional, and should be used only if needed. For example:
-
-
- The language and country codes must match the XSL-FO input, which
- follows ISO
- 639 (languages) and ISO
- 3166 (countries). NOTE: The ISO 639/ISO 3166 convention is that
- language names are written in lower case, while country codes are written
- in upper case. FOP does not check whether the language and country specified
- in the FO source are actually from the current standard, but it relies
- on it being two letter strings in a few places. So you can make up your
- own codes for custom hyphenation patterns, but they should be two
- letter strings too (patches for proper handling extensions are welcome)en_US.xml
would be the file name for American
- English hyphenation patterns.it.xml
would be the file name for Italian
- hyphenation patterns.
-
- {fop-dir}/lib
directory, or
- in a directory of your choice (and append the full path to the JAR to
- the environment variable FOP_HYPHENATION_PATH
).
-
- and run Ant with build target
- {fop-dir}/hyph
, user.hyph.dir
to point to that directory (in
- build-local.properties
),jar-hyphenation
. This will create a JAR containing the
- compiled patterns in {fop-dir}/build
that will be added to the
- classpath on the next run.
- (When FOP is built from scratch, and there are pattern source file(s)
- present in the directory pointed to by the
- user.hyph.dir
variable, this JAR will automatically
- be created from the supplied pattern(s)).
-
-
-
- This element is unused and not even read. It should be considered a
- documentation for parameters used during pattern generation.
-
-
- Here are some examples from the English patterns file:
-
-
- Note that the algorithm that uses this data searches for each of the word's substrings in the patterns, and chooses the highest value found for letter combination.
- examples/embedding
- directory in the FOP distribution
- endDocument()
on the AreaTreeModel. This lets the Renderer know that the processing
- is now finished.
- setTransformerHandler()
on
- XMLRenderer to give the XMLRenderer your own TransformerHandler instance in case you would like to
- do custom serialization (to a W3C DOM, for example) and/or to directly modify the area tree using
- XSLT. The AreaTreeParser on the other side allows you to retrieve a ContentHandler instance where
- you can manually send SAX events to to start the parsing process (see getContentHandler()
).
-
-
-
-
-
-
-
-
-
-
- -o
option. This
- password is actually used as encryption key. Many tools for
- PDF processing ask for this password to disregard any
- restriction imposed on the PDF document.
- -u
option, will
- cause the PDF display software to ask the reader for this password in
- order to view the contents of the document. If no user password was
- supplied, viewing the content is not restricted.
- -noprint
,
- -nocopy
, -noedit
and
- -noannotations
options, which disable printing, copying
- text, editing in Adobe Acrobat and making annotations, respectively.
-
-
-
-
- Option
- Description
- Values
- Default
-
-
- ownerPassword
- The owner password
- String
-
-
-
- userPassword
- The user password
- String
-
-
-
- allowPrint
- Allows/disallows printing of the PDF
- "TRUE" or "FALSE"
- "TRUE"
-
-
- allowCopyContent
- Allows/disallows copy/paste of content
- "TRUE" or "FALSE"
- "TRUE"
-
-
- allowEditContent
- Allows/disallows editing of content
- "TRUE" or "FALSE"
- "TRUE"
-
-
- allowEditAnnotations
- Allows/disallows editing of annotations
- "TRUE" or "FALSE"
- "TRUE"
-
-
-
-
-
-
- fop.sh
. If you have JDK 1.3 or earlier don't forget to
- install the JCE as well.
- java.security
file and add
- security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider
,
- preferably at the end of the block defining the other crypto
- providers. For JDK 1.4 this is detailed on Sun's web site.
-
-
-
-
-
-
-
-
- .gz
file that is the
- distribution medium, then unarchiving the resulting .tar
file in a
- directory/folder that is convenient on your system. Please consult your operating system
- documentation or Zip application software documentation for instructions specific to your
- site.
- tar -xzf
instead.
- /Library/Java/Home
. Caveat:
- We suspect that, as Apple releases new Java environments and as FOP upgrades the minimum
- Java requirements, the two will inevitably not match on some systems. Please see
- Java on Mac OSX FAQ for information as
- it becomes available.
- java org.apache.xalan.xslt.Process -IN xmlfile -XSL file -OUT outfile
-
-
-
-
-
- Source
instance used above is simply an
- example. If you have to read the XML from a string, supply
- a new StreamSource(new
- StringReader(xmlstring))
. Constructing and reparsing
- an XML string is generally less desirable than using a
- SAXSource if you generate your XML. You can alternatively
- supply a DOMSource as well. You may also use dynamically
- generated XSL if you like.
- Transformer
object, you can also use it to
- explicitely set parameters for the transformation run.
-
-
- org.apache.commons.io.output.ByteArrayOutputStream
-
-
- .pdf
, like
- http://myserver/servlet/stuff.pdf
. Yes, the servlet can
- be configured to handle this. If the URL has to contain parameters,
- try to have both the base URL as well as the last parameter end in
- .pdf
, if necessary append a dummy parameter, like
- http://myserver/servlet/stuff.pdf?par1=a&par2=b&d=.pdf
. The
- effect may depend on IEx version.
- Expires
header entry may help in
- this case:
response.setDateHeader("Expires",
- System.currentTimeMillis() + cacheExpiringDuration *
- 1000);
Consult your server manual and the
- relevant RFCs for further details on HTTP headers and
- caching.
-
-
- fo:table-cell
elements, the new code
- will complain about that (unless relaxed validation is enabled) because the specification
- demands at least one block-level element ((%block;)+
, see
- XSL-FO 1.0, 6.7.10)
- inside an fo:table-cell
element.
-
-
- <fo:table-cell></fo:table-cell>
- are not allowed by the specification. The same applies to empty static-content
- and block-container
elements, for example.
- external-graphic
)
- or instream-foreign-object
- objects. If images or SVGs are sized differently in your outputs with the new FOP version
- check Bug 37136
- as it contains some hints on what to. The file
-
- "examples/fo/basic/images.fo"
has
- a number of good examples that shows the new, more correct behaviour.
- fox:outline
extension not implemented in this version anymore.
- It has been superseded by the new bookmark elements from XSL-FO 1.1.
- fox:destination
extension is also not implemented in this version
- although it may be added in the future. See also
- Bug 37157.
-
+
+
+
+ Attribute
+ Description
+ Required
+
+
+ fofile
+ XSL-FO file to be rendered
+ Yes, if no fileset nested element is used
+
+
+ outfile
+ Output filename
+ Yes, when fofile is used. (This attribute is not valid for filesets.)
+
+
+ format
+ Possible output formats:
+
+ application/X-fop-awt-preview
+ application/X-fop-print
+ application/X-fop-areatree
+ application/pdf
+ application/postscript
+ application/mif
+ application/rtf
,
+ text/richtext
,
+ text/rtf
+ application/x-pcl
,
+ application/vnd.hp-PCL
+ application/x-afp
,
+ application/vnd.ibm.modcap
+ text/plain
+ image/svg+xml
+ image/gif
+ image/png
+ image/tiff
+ No, defaults to
+ application/pdf
+
+ outdir
+ Output directory
+ Required if a fileset is used to specify the files to render; optional for fofile. (Can alternatively specify the full path in the fofile value.)
+
+
+ force
+ Recreate target files, even if they are newer than their corresponding
+ source files. Note: This attribute is available in post-0.20.5
+ versions (0.20.x nightly build and 1.0dev) only; target files are
+ always generated (i.e., force=true) in 0.20.5 release.
+
+ No, default is
+ false
+
+ basedir
+ Base directory to resolve relative references (e.g., graphics files) within the
+ FO document.
+
+ No, for single FO File entry, default is to use the location
+ of that FO file.
+
+
+
+ relativebase
+ For fileset usage only. A value of
+ true
specifies using the location
+ of each .fo file as the base directory for resolving relative file references located
+ within that .fo file. A value of false
specifies using the value of
+ basedir for all files within the fileset, or just the current working directory
+ if basedir is not specified.
+ No, default is
+ false
.
+
+
+ userconfig
+ User configuration file (same as the FOP "-c" command line option).
+ No
+
+
+ messagelevel
+ Logging level
+
+ Possible values: error
, warn
, info
, verbose
, debug
. Currently doesn't work in FOP Trunk!!!No, defaults to
+ verbose
+
+ logFiles
+ Controls whether the names of the files that are processed are logged
+ (
+ true
) or not (false
). Currently doesn't work in FOP Trunk!!!No, default is
+ true
+
+
+ Attribute
+ Description
+ Required
+
+
+ fileset
+ FileSets
+ are used to specify multiple XSL-FO files to be rendered.
+ Yes, if no fofile attribute is supplied
+
+
+
+
+ {fop-dir}/conf/fop.xconf
to a location of your choice, and then to
+ edit it according to your needs.
+ It contains templates for the various configuration options, most of which are commented
+ out. Remove the comments and change the settings for entries that you wish to use.
+ Be sure to follow any instructions, including comments which specify the value range.
+ Also, since the configuration file is XML, be sure to keep it well-formed.
+
+
+
+
+
+
+ Element
+ Data Type (for the value)
+ Default Value
+
+
+ base
+ URL or directory
+ Specifies the base URL based on which relative URL will be resolved.
+
+
+ font-base
+ URL or directory
+ Specifies the base URL based on which relative font URLs will be resolved.
+ If not specified defaults to the base URL above.
+
+
+
+ hyphenation-base
+ URL or directory
+ Specifies the base URL based on which relative URLs to hyphenation pattern
+ files will be resolved. If not specified, support for user-supplied hyphenation
+ patterns remains disabled.
+
+
+
+ source-resolution
+ Integer, dpi
+
+ Resolution in dpi (dots per inch) which is used internally to determine the pixel
+ size for SVG images and bitmap images without resolution information.
+
+
+
+ target-resolution
+ Integer, dpi
+
+ Resolution in dpi (dots per inch) used to specify the output resolution for bitmap
+ images generated by bitmap renderers (such as the TIFF renderer) and by bitmaps
+ generated by Apache Batik for filter effects and such.
+
+
+
+ strict-validation
+ Boolean (true, false)
+
+ Setting this option to 'false' causes FOP to be more forgiving about XSL-FO validity,
+ for example, you're allowed to specify a border on a region-body which is supported
+ by some FO implementations but is non-standard. Note that such a border would
+ currently have no effect in Apache FOP.
+
+
+ break-indent-inheritance
+ Boolean (true, false)
+
+ Setting this option to 'true' causes FOP to use an alternative rule set to determine
+ text indents specified through margins, start-indent and end-indent. Many commercial
+ FO implementations have chosen to break the XSL specification in this aspect. This
+ option tries to mimic their behaviour. Please note that Apache FOP may still not
+ behave exactly like those implementations either because FOP has not fully matched
+ the desired behaviour and because the behaviour among the commercial implementations
+ varies. The default for this option (i.e. false) is to behave exactly like the
+ specification describes.
+
+
+ default-page-settings
+ n/a
+
+ Specifies the default width and height of a page if "auto" is specified
+ for either or both values. Use "height" and "width" attributes on the
+ default-page-settings element to specify the two values.
+
+
+ renderers
+ (see text below)
+ Contains the configuration for each renderer. See below.
+
+
+
+ schema
element:
+
+
+
+and run the configuration file through a validating schema
+parser. Note that the schema cannot detect all errors, and that it is
+stricter about the order of some elements than FOP itself is.-d
). This makes FOP report which configuration
+information it finds. Check if FOP finds what you expect.
+
+ transform()
method returns FOP will also have finished converting
+ the FO file to a PDF file and you can close the OutputStream.
+ getDefaultHandler()
to obtain a SAX
+ DefaultHandler instance to which you can send the SAX events making up the XSL-FO
+ document you'd like to render. FOP processing starts as soon as the DefaultHandler's
+ startDocument()
method is called. Processing stops again when the
+ DefaultHandler's endDocument()
method is called. Please refer to the basic
+ usage pattern shown above to render a simple XSL-FO document.
+
+
+ Source src = new StreamSource("http://localhost:8080/testfile.xml");
+ Source src = new StreamSource(new File("C:/Temp/myinputfile.xml"));
+ Source src = new StreamSource(new StringReader(myString)); // myString is a String
+ Source src = new StreamSource(new MyInputStream(something));
+ Source src = new StreamSource(new ByteArrayInputStream(myBuffer)); // myBuffer is a byte[] here
+ Source src = new DOMSource(myDocument); // myDocument is a Document or a Node
+
+
+
+
+ java.awt
that
+ intialise the Java AWT classes. This means that a daemon thread
+ is created by the JVM and on Unix it will need to connect to a
+ DISPLAY.
+ System.exit()
. These
+ issues should be fixed in the JDK 1.4.
+ Fop.getResults()
. This returns a FormattingResults
object
+ where you can look up the number of pages produced. It also gives you the
+ page-sequences that were produced along with their id attribute and their
+ numbers of pages. This is particularly useful if you render multiple
+ documents (each enclosed by a page-sequence) and have to know the number of
+ pages of each document.
+
+
+ out = new java.io.BufferedOutputStream(out);
+
+ Make sure you properly close the OutputStream when FOP is finished.
+ Templates
object and reuse it each time you do
+ the XSL transformation. (More information can be found
+ here.)
+ http://xml.apache.org/fop/extensions
to the root element:
+ fox:outline
element
+ which was used to create outlines in PDF files. The redesigned code makes use
+ of the new bookmark feature defined in the latest XSL 1.1 working draft.
+
+
+
+
+ Renderer
+ Base-14
+ AWT/OS
+ Custom
+ Custom Embedding
+
+
+ PDF
+ yes
+ no
+ yes
+ yes
+
+
+
+ PostScript
+ yes
+ no
+ yes
+ yes
+
+
+ TXT
+ yes (used for layout but not for output)
+ no
+ yes (used for layout but not for output)
+ no
+
+
+ AWT
+ if available from OS
+ yes
+ yes
+ n/a (display only)
+
+
+ Print
+ if available from OS
+ yes
+ yes
+ controlled by OS printer driver
+
+
+ RTF
+ n/a (font metrics not needed)
+ n/a
+ n/a
+ n/a
+
+
+ MIF
+ n/a (font metrics not needed)
+ n/a
+ n/a
+ n/a
+
+
+ SVG
+ if available from OS
+ yes
+ no
+ no
+
+
+ XML
+ yes
+ no
+ yes
+ n/a
+
+
+
+
+
+
+
+
+
+
+ Issue
+ WinAnsi
+ CID-keyed
+
+
+ Usable Character Set
+ Limited to WinAnsi character set, which is roughly equivalent to iso-8889-1.
+ Limited only by the characters in the font itself.
+
+
+ Character Encoding in the Output Document.
+ Correct.
+ Never correct. Search, index, and cut-and-paste operations in the output document
+will produce incorrect results.
+
+
+ Character Display
+ Correct.
+ Correct, but copy/paste won't work in Acrobat Reader. (FOP currently doesn't emit the /ToUnicode table which is necessary for copy/paste to work.)
+
+
+ Embedding the Font
+ Optional.
+ Mandatory. Not embedding the font produces invalid PDF documents.
+
+
+
+
+
+
+
+ Format
+ Type
+ FOP native support
+ Batik SVG
+ Batik codecs
+ Image I/O
+ JAI
+ JIMI
+
+
+ BMP (Microsoft Windows Bitmap)
+ bitmap
+ X
+
+
+
+
+
+
+
+ EPS (Encapsulated PostScript)
+ metafile (both bitmap and vector), probably most frequently used for vector drawings
+ (X)
+
+
+
+
+
+
+
+ GIF (Graphics Interchange Format)
+ bitmap
+ X
+
+
+ X
+ X
+ X
+
+
+ JPEG (Joint Photographic Experts Group)
+ bitmap
+ (X)
+
+
+
+
+
+
+
+ PNG (Portable Network Graphic)
+ bitmap
+
+
+ X
+
+
+
+
+
+ SVG (Scalable Vector Graphics)
+ vector (with embedded bitmaps)
+
+ X
+
+
+
+
+
+
+ TIFF (Tag Image Format File)
+ bitmap
+ (X)
+
+ X
+
+ X
+
+
+
+
+ -Djava.awt.headless=true
command line option.
+
+ fo:instream-foreign-object
or in a separate
+file referenced with fo:external-graphic
.
+
+
+
+
+
+
+
+ {fop-dir}/hyph/hyphenation.dtd
.languageCode_countryCode.xml
. The country code is
+ optional, and should be used only if needed. For example:
+
+
+ The language and country codes must match the XSL-FO input, which
+ follows ISO
+ 639 (languages) and ISO
+ 3166 (countries). NOTE: The ISO 639/ISO 3166 convention is that
+ language names are written in lower case, while country codes are written
+ in upper case. FOP does not check whether the language and country specified
+ in the FO source are actually from the current standard, but it relies
+ on it being two letter strings in a few places. So you can make up your
+ own codes for custom hyphenation patterns, but they should be two
+ letter strings too (patches for proper handling extensions are welcome)en_US.xml
would be the file name for American
+ English hyphenation patterns.it.xml
would be the file name for Italian
+ hyphenation patterns.
+
+ {fop-dir}/lib
directory, or
+ in a directory of your choice (and append the full path to the JAR to
+ the environment variable FOP_HYPHENATION_PATH
).
+
+ and run Ant with build target
+ {fop-dir}/hyph
, user.hyph.dir
to point to that directory (in
+ build-local.properties
),jar-hyphenation
. This will create a JAR containing the
+ compiled patterns in {fop-dir}/build
that will be added to the
+ classpath on the next run.
+ (When FOP is built from scratch, and there are pattern source file(s)
+ present in the directory pointed to by the
+ user.hyph.dir
variable, this JAR will automatically
+ be created from the supplied pattern(s)).
+
+
+
+ This element is unused and not even read. It should be considered a
+ documentation for parameters used during pattern generation.
+
+
+ Here are some examples from the English patterns file:
+
+
+ Note that the algorithm that uses this data searches for each of the word's substrings in the patterns, and chooses the highest value found for letter combination.
+ examples/embedding
+ directory in the FOP distribution
+ endDocument()
on the AreaTreeModel. This lets the Renderer know that the processing
+ is now finished.
+ setTransformerHandler()
on
+ XMLRenderer to give the XMLRenderer your own TransformerHandler instance in case you would like to
+ do custom serialization (to a W3C DOM, for example) and/or to directly modify the area tree using
+ XSLT. The AreaTreeParser on the other side allows you to retrieve a ContentHandler instance where
+ you can manually send SAX events to to start the parsing process (see getContentHandler()
).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -o
option. This
+ password is actually used as encryption key. Many tools for
+ PDF processing ask for this password to disregard any
+ restriction imposed on the PDF document.
+ -u
option, will
+ cause the PDF display software to ask the reader for this password in
+ order to view the contents of the document. If no user password was
+ supplied, viewing the content is not restricted.
+ -noprint
,
+ -nocopy
, -noedit
and
+ -noannotations
options, which disable printing, copying
+ text, editing in Adobe Acrobat and making annotations, respectively.
+
+
+
+
+ Option
+ Description
+ Values
+ Default
+
+
+ ownerPassword
+ The owner password
+ String
+
+
+
+ userPassword
+ The user password
+ String
+
+
+
+ allowPrint
+ Allows/disallows printing of the PDF
+ "TRUE" or "FALSE"
+ "TRUE"
+
+
+ allowCopyContent
+ Allows/disallows copy/paste of content
+ "TRUE" or "FALSE"
+ "TRUE"
+
+
+ allowEditContent
+ Allows/disallows editing of content
+ "TRUE" or "FALSE"
+ "TRUE"
+
+
+ allowEditAnnotations
+ Allows/disallows editing of annotations
+ "TRUE" or "FALSE"
+ "TRUE"
+
+
+
+
+
+
+ fop.sh
. If you have JDK 1.3 or earlier don't forget to
+ install the JCE as well.
+ java.security
file and add
+ security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider
,
+ preferably at the end of the block defining the other crypto
+ providers. For JDK 1.4 this is detailed on Sun's web site.
+
+
+
+
+
+
+
+
+
+
+ .gz
file that is the
+ distribution medium, then unarchiving the resulting .tar
file in a
+ directory/folder that is convenient on your system. Please consult your operating system
+ documentation or Zip application software documentation for instructions specific to your
+ site.
+ tar -xzf
instead.
+ /Library/Java/Home
. Caveat:
+ We suspect that, as Apple releases new Java environments and as FOP upgrades the minimum
+ Java requirements, the two will inevitably not match on some systems. Please see
+ Java on Mac OSX FAQ for information as
+ it becomes available.
+ java org.apache.xalan.xslt.Process -IN xmlfile -XSL file -OUT outfile
+
+
+
+
+
+ Source
instance used above is simply an
+ example. If you have to read the XML from a string, supply
+ a new StreamSource(new
+ StringReader(xmlstring))
. Constructing and reparsing
+ an XML string is generally less desirable than using a
+ SAXSource if you generate your XML. You can alternatively
+ supply a DOMSource as well. You may also use dynamically
+ generated XSL if you like.
+ Transformer
object, you can also use it to
+ explicitely set parameters for the transformation run.
+
+
+ org.apache.commons.io.output.ByteArrayOutputStream
+
+
+ .pdf
, like
+ http://myserver/servlet/stuff.pdf
. Yes, the servlet can
+ be configured to handle this. If the URL has to contain parameters,
+ try to have both the base URL as well as the last parameter end in
+ .pdf
, if necessary append a dummy parameter, like
+ http://myserver/servlet/stuff.pdf?par1=a&par2=b&d=.pdf
. The
+ effect may depend on IEx version.
+ Expires
header entry may help in
+ this case:
response.setDateHeader("Expires",
+ System.currentTimeMillis() + cacheExpiringDuration *
+ 1000);
Consult your server manual and the
+ relevant RFCs for further details on HTTP headers and
+ caching.
+
+
+ fo:table-cell
elements, the new code
+ will complain about that (unless relaxed validation is enabled) because the specification
+ demands at least one block-level element ((%block;)+
, see
+ XSL-FO 1.0, 6.7.10)
+ inside an fo:table-cell
element.
+
+
+ <fo:table-cell></fo:table-cell>
+ are not allowed by the specification. The same applies to empty static-content
+ and block-container
elements, for example.
+ external-graphic
)
+ or instream-foreign-object
+ objects. If images or SVGs are sized differently in your outputs with the new FOP version
+ check Bug 37136
+ as it contains some hints on what to do. The file
+
+ "examples/fo/basic/images.fo"
has
+ a number of good examples that show the new, more correct behaviour.
+ fox:outline
extension is not implemented in this version anymore.
+ It has been superseded by the new bookmark elements from XSL-FO 1.1.
+ fox:destination
extension is also not implemented in this version
+ although it may be added in the future. See also
+ Bug 37157.
+ W3C XSL-FO 1.0 Standard
XSL-FO Object Support Table (§6)
+ XSL-FO Object Support Table (§6)
- 0.20.5 (current stable)
+ 0.20.5 (previous)
- 0.92 beta
+ 0.93 (stable)
- Declarations and Pagination and Layout Formatting Objects (§6.4)
+ Declarations and Pagination and Layout Formatting Objects (§6.4)
@@ -226,7 +226,7 @@
Basic
- §6.4.2
+ §6.4.2
yes
@@ -246,7 +246,7 @@
Basic
- §6.4.3
+ §6.4.3
no
@@ -266,7 +266,7 @@
Extended
- §6.4.4
+ §6.4.4
no
@@ -286,7 +286,7 @@
Basic
- §6.4.5
+ §6.4.5
yes
@@ -306,7 +306,7 @@
Basic
- §6.4.6
+ §6.4.6
yes
@@ -326,7 +326,7 @@
Basic
- §6.4.7
+ §6.4.7
yes
@@ -346,7 +346,7 @@
Basic
- §6.4.8
+ §6.4.8
yes
@@ -366,7 +366,7 @@
Basic
- §6.4.9
+ §6.4.9
yes
@@ -386,7 +386,7 @@
Extended
- §6.4.10
+ §6.4.10
yes
@@ -406,7 +406,7 @@
Extended
- §6.4.11
+ §6.4.11
yes
@@ -426,7 +426,7 @@
Basic
- §6.4.12
+ §6.4.12
yes
@@ -437,7 +437,7 @@
@@ -451,7 +451,7 @@
Basic
- §6.4.13
+ §6.4.13
yes
@@ -470,7 +470,7 @@
Extended
- §6.4.14
+ §6.4.14
yes
@@ -490,7 +490,7 @@
Extended
- §6.4.15
+ §6.4.15
yes
@@ -510,7 +510,7 @@
Extended
- §6.4.16
+ §6.4.16
yes
@@ -530,7 +530,7 @@
Extended
- §6.4.17
+ §6.4.17
yes
@@ -550,7 +550,7 @@
Basic
- §6.4.18
+ §6.4.18
yes
@@ -570,7 +570,7 @@
Extended
- §6.4.19
+ §6.4.19
yes
@@ -590,7 +590,7 @@
Extended
- §6.4.20
+ §6.4.20
no
@@ -604,7 +604,7 @@
- Block Formatting Objects (§6.5)
+ Block Formatting Objects (§6.5)
@@ -615,7 +615,7 @@
Basic
- §6.5.2
+ §6.5.2
yes
@@ -635,7 +635,7 @@
Extended
- §6.5.3
+ §6.5.3
partial
@@ -652,14 +652,14 @@
[0.20.5] For absolute positioning, use 'position="absolute"' (as 'absolute-position="absolute"' is not implemented), and specify all four of "left", "top", "width" and "height"
- Inline Formatting Objects (§6.6)
+ Inline Formatting Objects (§6.6)
@@ -670,7 +670,7 @@
Extended
- §6.6.2
+ §6.6.2
no
@@ -690,7 +690,7 @@
Basic
- §6.6.3
+ §6.6.3
yes
@@ -710,7 +710,7 @@
Extended
- §6.6.4
+ §6.6.4
no
@@ -730,7 +730,7 @@
Basic
- §6.6.5
+ §6.6.5
yes
@@ -750,7 +750,7 @@
Extended
- §6.6.6
+ §6.6.6
yes
@@ -772,7 +772,7 @@
Basic
- §6.6.7
+ §6.6.7
yes
@@ -792,7 +792,7 @@
Extended
- §6.6.8
+ §6.6.8
no
@@ -812,7 +812,7 @@
Basic
- §6.6.9
+ §6.6.9
partial
@@ -832,7 +832,7 @@
Basic
- §6.6.10
+ §6.6.10
yes
@@ -852,7 +852,7 @@
Extended
- §6.6.11
+ §6.6.11
partial
@@ -866,14 +866,14 @@
[0.20.5] Only works for table of contents without any problems. The case where the page number doesn't fit on a line isn't handled, and any text on the same line and after the page-number might not appear exactly where you want it to.
- Table Formatting Objects (§6.7)
+ Table Formatting Objects (§6.7)
@@ -884,7 +884,7 @@
Basic
- §6.7.2
+ §6.7.2
no
@@ -904,7 +904,7 @@
Basic
- §6.7.3
+ §6.7.3
partial
@@ -915,7 +915,7 @@
@@ -928,7 +928,7 @@
Basic
- §6.7.4
+ §6.7.4
partial
@@ -952,7 +952,7 @@
Extended
- §6.7.5
+ §6.7.5
no
@@ -972,7 +972,7 @@
Basic
- §6.7.6
+ §6.7.6
yes
@@ -992,7 +992,7 @@
Extended
- §6.7.7
+ §6.7.7
yes
@@ -1012,7 +1012,7 @@
Basic
- §6.7.8
+ §6.7.8
yes
@@ -1032,7 +1032,7 @@
Basic
- §6.7.9
+ §6.7.9
yes
@@ -1052,7 +1052,7 @@
Basic
- §6.7.10
+ §6.7.10
partial
@@ -1070,7 +1070,7 @@
- List Formatting Objects (§6.8)
+ List Formatting Objects (§6.8)
@@ -1081,7 +1081,7 @@
Basic
- §6.8.2
+ §6.8.2
yes
@@ -1101,7 +1101,7 @@
Basic
- §6.8.3
+ §6.8.3
yes
@@ -1121,7 +1121,7 @@
Basic
- §6.8.4
+ §6.8.4
yes
@@ -1141,7 +1141,7 @@
Extended
- §6.8.5
+ §6.8.5
yes
@@ -1155,7 +1155,7 @@
- Link and Multi Formatting Objects (§6.9)
+ Link and Multi Formatting Objects (§6.9)
@@ -1166,7 +1166,7 @@
Extended
- §6.9.2
+ §6.9.2
yes
@@ -1190,7 +1190,7 @@
Extended
- §6.9.3
+ §6.9.3
no
@@ -1210,7 +1210,7 @@
Basic
- §6.9.4
+ §6.9.4
no
@@ -1230,7 +1230,7 @@
Extended
- §6.9.5
+ §6.9.5
no
@@ -1250,7 +1250,7 @@
Extended
- §6.9.6
+ §6.9.6
no
@@ -1270,7 +1270,7 @@
Extended
- §6.9.7
+ §6.9.7
no
@@ -1284,7 +1284,7 @@
- Formatting Objects for Bookmarks (§6.11 in XSL 1.1 WD)
+ Formatting Objects for Bookmarks (§6.11 in XSL 1.1 WD)
@@ -1355,7 +1355,7 @@
- Out-of-line Formatting Objects (§6.10)
+ Out-of-line Formatting Objects (§6.10)
@@ -1366,7 +1366,7 @@
Extended
@@ -1408,7 +1408,7 @@
Extended
- §6.10.2
+ §6.10.2
no
@@ -1386,7 +1386,7 @@
Extended
- §6.10.3
+ §6.10.3
yes
@@ -1396,7 +1396,7 @@
-
- §6.10.4
+ §6.10.4
yes
@@ -1422,7 +1422,7 @@
- Other Formatting Objects (§6.11)
+ Other Formatting Objects (§6.11)
@@ -1433,7 +1433,7 @@
Basic
@@ -1455,7 +1455,7 @@
Extended
- §6.11.2
+ §6.11.2
yes
@@ -1443,7 +1443,7 @@
-
- §6.11.3
+ §6.11.3
yes
@@ -1475,7 +1475,7 @@
Extended
- §6.11.4
+ §6.11.4
yes
@@ -1488,7 +1488,7 @@
- XSL-FO Property Support Table (§7)
+ XSL-FO Property Support Table (§7)
- 0.20.5 (current stable)
+ 0.20.5 (previous)
- 0.92 beta (unstable)
+ 0.93 (stable)
- Common Accessibility Properties (§7.4)
+ Common Accessibility Properties (§7.4)
@@ -1531,7 +1531,7 @@
Basic
- §7.4.1
+ §7.4.1
na
@@ -1551,7 +1551,7 @@
Basic
- §7.4.2
+ §7.4.2
na
@@ -1565,7 +1565,7 @@
- Common Absolute Position Properties (§7.5)
+ Common Absolute Position Properties (§7.5)
@@ -1576,7 +1576,7 @@
Complete
- §7.5.1
+ §7.5.1
no
@@ -1590,7 +1590,7 @@
[0.20.5] Use shorthand position="absolute" as a workaround.
@@ -1603,7 +1603,7 @@
Extended
- §7.5.2
+ §7.5.2
yes
@@ -1623,7 +1623,7 @@
Extended
- §7.5.3
+ §7.5.3
yes
@@ -1643,7 +1643,7 @@
Extended
- §7.5.4
+ §7.5.4
yes
@@ -1663,7 +1663,7 @@
Extended
- §7.5.5
+ §7.5.5
yes
@@ -1677,7 +1677,7 @@
- Common Aural Properties (§7.6)
+ Common Aural Properties (§7.6)
@@ -1688,7 +1688,7 @@
Basic
- §7.6.1
+ §7.6.1
na
@@ -1708,7 +1708,7 @@
Basic
- §7.6.2
+ §7.6.2
na
@@ -1728,7 +1728,7 @@
Basic
- §7.6.3
+ §7.6.3
na
@@ -1748,7 +1748,7 @@
Basic
- §7.6.4
+ §7.6.4
na
@@ -1768,7 +1768,7 @@
Basic
- §7.6.5
+ §7.6.5
na
@@ -1788,7 +1788,7 @@
Basic
- §7.6.6
+ §7.6.6
na
@@ -1808,7 +1808,7 @@
Basic
- §7.6.7
+ §7.6.7
na
@@ -1828,7 +1828,7 @@
Basic
- §7.6.8
+ §7.6.8
na
@@ -1848,7 +1848,7 @@
Basic
- §7.6.9
+ §7.6.9
na
@@ -1868,7 +1868,7 @@
Basic
- §7.6.10
+ §7.6.10
na
@@ -1888,7 +1888,7 @@
Basic
- §7.6.11
+ §7.6.11
na
@@ -1908,7 +1908,7 @@
Basic
- §7.6.12
+ §7.6.12
na
@@ -1928,7 +1928,7 @@
Basic
- §7.6.13
+ §7.6.13
na
@@ -1948,7 +1948,7 @@
Basic
- §7.6.14
+ §7.6.14
na
@@ -1968,7 +1968,7 @@
Basic
- §7.6.15
+ §7.6.15
na
@@ -1988,7 +1988,7 @@
Basic
- §7.6.16
+ §7.6.16
na
@@ -2008,7 +2008,7 @@
Basic
- §7.6.17
+ §7.6.17
na
@@ -2028,7 +2028,7 @@
Basic
- §7.6.18
+ §7.6.18
na
@@ -2042,7 +2042,7 @@
- Common Border, Padding, and Background Properties (§7.7)
+ Common Border, Padding, and Background Properties (§7.7)
@@ -2053,7 +2053,7 @@
Extended
- §7.7.1
+ §7.7.1
no
@@ -2073,7 +2073,7 @@
Basic
- §7.7.2
+ §7.7.2
yes
@@ -2084,7 +2084,7 @@
@@ -2097,7 +2097,7 @@
Extended
- §7.7.3
+ §7.7.3
yes
@@ -2108,7 +2108,7 @@
@@ -2121,7 +2121,7 @@
Extended
- §7.7.4
+ §7.7.4
no
@@ -2141,7 +2141,7 @@
Extended
- §7.7.5
+ §7.7.5
no
@@ -2161,7 +2161,7 @@
Extended
- §7.7.6
+ §7.7.6
no
@@ -2181,7 +2181,7 @@
Basic
- §7.7.7
+ §7.7.7
yes
@@ -2201,7 +2201,7 @@
Basic
- §7.7.8
+ §7.7.8
partial
@@ -2225,7 +2225,7 @@
Basic
- §7.7.9
+ §7.7.9
yes
@@ -2245,7 +2245,7 @@
Basic
- §7.7.10
+ §7.7.10
yes
@@ -2265,7 +2265,7 @@
Basic
- §7.7.11
+ §7.7.11
partial
@@ -2289,7 +2289,7 @@
Basic
- §7.7.12
+ §7.7.12
yes
@@ -2309,7 +2309,7 @@
Basic
- §7.7.13
+ §7.7.13
yes
@@ -2329,7 +2329,7 @@
Basic
- §7.7.14
+ §7.7.14
partial
@@ -2353,7 +2353,7 @@
Basic
- §7.7.15
+ §7.7.15
yes
@@ -2373,7 +2373,7 @@
Basic
- §7.7.16
+ §7.7.16
yes
@@ -2393,7 +2393,7 @@
Basic
- §7.7.17
+ §7.7.17
partial
@@ -2417,7 +2417,7 @@
Basic
- §7.7.18
+ §7.7.18
yes
@@ -2437,7 +2437,7 @@
Basic
- §7.7.19
+ §7.7.19
yes
@@ -2457,7 +2457,7 @@
Basic
- §7.7.20
+ §7.7.20
partial
@@ -2481,7 +2481,7 @@
Basic
- §7.7.21
+ §7.7.21
yes
@@ -2501,7 +2501,7 @@
Basic
- §7.7.22
+ §7.7.22
yes
@@ -2521,7 +2521,7 @@
Basic
- §7.7.23
+ §7.7.23
partial
@@ -2545,7 +2545,7 @@
Basic
- §7.7.24
+ §7.7.24
yes
@@ -2565,7 +2565,7 @@
Basic
- §7.7.25
+ §7.7.25
yes
@@ -2585,7 +2585,7 @@
Basic
- §7.7.26
+ §7.7.26
partial
@@ -2609,7 +2609,7 @@
Basic
- §7.7.27
+ §7.7.27
yes
@@ -2629,7 +2629,7 @@
Basic
- §7.7.28
+ §7.7.28
yes
@@ -2649,7 +2649,7 @@
Basic
- §7.7.29
+ §7.7.29
partial
@@ -2673,7 +2673,7 @@
Basic
- §7.7.30
+ §7.7.30
yes
@@ -2693,7 +2693,7 @@
Basic
- §7.7.31
+ §7.7.31
partial
@@ -2726,7 +2726,7 @@
Basic
- §7.7.32
+ §7.7.32
partial
@@ -2750,7 +2750,7 @@
Basic
- §7.7.33
+ §7.7.33
partial
@@ -2774,7 +2774,7 @@
Basic
- §7.7.34
+ §7.7.34
partial
@@ -2798,7 +2798,7 @@
Basic
- §7.7.35
+ §7.7.35
partial
@@ -2822,7 +2822,7 @@
Basic
- §7.7.36
+ §7.7.36
partial
@@ -2846,7 +2846,7 @@
Basic
- §7.7.37
+ §7.7.37
partial
@@ -2870,7 +2870,7 @@
Basic
- §7.7.38
+ §7.7.38
partial
@@ -2888,7 +2888,7 @@
- Common Font Properties (§7.8)
+ Common Font Properties (§7.8)
@@ -2899,7 +2899,7 @@
Basic
- §7.8.2
+ §7.8.2
partial
@@ -2913,7 +2913,7 @@
[0.20.5] font-family lists are not supported, use a single font-family name
@@ -2926,7 +2926,7 @@
Complete
- §7.8.3
+ §7.8.3
no
@@ -2946,7 +2946,7 @@
Basic
- §7.8.4
+ §7.8.4
partial
@@ -2970,7 +2970,7 @@
Extended
- §7.8.5
+ §7.8.5
no
@@ -2990,7 +2990,7 @@
Extended
- §7.8.6
+ §7.8.6
no
@@ -3010,7 +3010,7 @@
Basic
- §7.8.7
+ §7.8.7
partial
@@ -3034,7 +3034,7 @@
Basic
- §7.8.8
+ §7.8.8
yes
@@ -3054,7 +3054,7 @@
Basic
- §7.8.9
+ §7.8.9
partial
@@ -3068,14 +3068,14 @@
[0.20.5] "normal", "bolder" and "lighter" are not supported
- Common Hyphenation Properties (§7.9)
+ Common Hyphenation Properties (§7.9)
@@ -3086,7 +3086,7 @@
Extended
- §7.9.1
+ §7.9.1
yes
@@ -3106,7 +3106,7 @@
Extended
- §7.9.2
+ §7.9.2
yes
@@ -3126,7 +3126,7 @@
Extended
- §7.9.3
+ §7.9.3
no
@@ -3146,7 +3146,7 @@
Extended
- §7.9.4
+ §7.9.4
yes
@@ -3166,7 +3166,7 @@
Extended
- §7.9.5
+ §7.9.5
yes
@@ -3186,7 +3186,7 @@
Extended
- §7.9.6
+ §7.9.6
yes
@@ -3206,7 +3206,7 @@
Extended
- §7.9.7
+ §7.9.7
yes
@@ -3220,7 +3220,7 @@
- Common Margin Properties - Block (§7.10)
+ Common Margin Properties - Block (§7.10)
@@ -3231,7 +3231,7 @@
Basic
- §7.10.1
+ §7.10.1
partial
@@ -3255,7 +3255,7 @@
Basic
- §7.10.2
+ §7.10.2
partial
@@ -3279,7 +3279,7 @@
Basic
- §7.10.3
+ §7.10.3
partial
@@ -3303,7 +3303,7 @@
Basic
- §7.10.4
+ §7.10.4
partial
@@ -3327,7 +3327,7 @@
Basic
- §7.10.5
+ §7.10.5
partial
@@ -3341,7 +3341,7 @@
[0.20.5] space-before.optimum supported
@@ -3354,7 +3354,7 @@
Basic
- §7.10.6
+ §7.10.6
partial
@@ -3368,7 +3368,7 @@
[0.20.5] space-after.optimum supported
@@ -3381,7 +3381,7 @@
Basic
- §7.10.7
+ §7.10.7
yes
@@ -3401,7 +3401,7 @@
Basic
- §7.10.8
+ §7.10.8
yes
@@ -3415,7 +3415,7 @@
- Common Margin Properties - Inline (§7.11)
+ Common Margin Properties - Inline (§7.11)
@@ -3426,7 +3426,7 @@
Basic
- §7.11.1
+ §7.11.1
no
@@ -3446,7 +3446,7 @@
Basic
- §7.11.2
+ §7.11.2
no
@@ -3460,7 +3460,7 @@
- Common Relative Position Properties (§7.12)
+ Common Relative Position Properties (§7.12)
@@ -3471,7 +3471,7 @@
Extended
- §7.12.1
+ §7.12.1
no
@@ -3485,7 +3485,7 @@
- Area Alignment Properties (§7.13)
+ Area Alignment Properties (§7.13)
@@ -3496,7 +3496,7 @@
Basic
- §7.13.1
+ §7.13.1
no
@@ -3516,7 +3516,7 @@
Basic
- §7.13.2
+ §7.13.2
no
@@ -3536,7 +3536,7 @@
Basic
- §7.13.3
+ §7.13.3
partial
@@ -3560,7 +3560,7 @@
Extended
- §7.13.4
+ §7.13.4
partial
@@ -3577,7 +3577,7 @@
[0.20.5] For table-cell, the "height" attribute must be set for the parent table-row; setting the height of the table or the table-cell results in vertical centering having no effect.
@@ -3590,7 +3590,7 @@
Basic
- §7.13.5
+ §7.13.5
no
@@ -3610,7 +3610,7 @@
Extended
- §7.13.6
+ §7.13.6
no
@@ -3624,7 +3624,7 @@
- Area Dimension Properties (§7.14)
+ Area Dimension Properties (§7.14)
@@ -3635,7 +3635,7 @@
Basic
- §7.14.1
+ §7.14.1
no
@@ -3655,7 +3655,7 @@
Extended
- §7.14.2
+ §7.14.2
no
@@ -3675,7 +3675,7 @@
Extended
- §7.14.3
+ §7.14.3
no
@@ -3695,7 +3695,7 @@
Basic
- §7.14.4
+ §7.14.4
yes
@@ -3715,7 +3715,7 @@
Basic
- §7.14.5
+ §7.14.5
no
@@ -3735,7 +3735,7 @@
Complete
- §7.14.6
+ §7.14.6
no
@@ -3755,7 +3755,7 @@
Complete
- §7.14.7
+ §7.14.7
no
@@ -3775,7 +3775,7 @@
Complete
- §7.14.8
+ §7.14.8
no
@@ -3795,7 +3795,7 @@
Complete
- §7.14.9
+ §7.14.9
no
@@ -3815,7 +3815,7 @@
Extended
- §7.14.10
+ §7.14.10
no
@@ -3835,7 +3835,7 @@
Extended
- §7.14.11
+ §7.14.11
no
@@ -3855,7 +3855,7 @@
Basic
- §7.14.12
+ §7.14.12
yes
@@ -3869,7 +3869,7 @@
- Block and Line-related Properties (§7.15)
+ Block and Line-related Properties (§7.15)
@@ -3880,7 +3880,7 @@
Extended
- §7.15.1
+ §7.15.1
no
@@ -3900,7 +3900,7 @@
Extended
- §7.15.2
+ §7.15.2
no
@@ -3920,7 +3920,7 @@
Extended
- §7.15.3
+ §7.15.3
no
@@ -3940,7 +3940,7 @@
Basic
- §7.15.4
+ §7.15.4
yes
@@ -3960,7 +3960,7 @@
Extended
- §7.15.5
+ §7.15.5
no
@@ -3980,7 +3980,7 @@
Basic
- §7.15.6
+ §7.15.6
no
@@ -3991,7 +3991,7 @@
@@ -4004,7 +4004,7 @@
Extended
- §7.15.7
+ §7.15.7
no
@@ -4024,7 +4024,7 @@
Extended
- §7.15.8
+ §7.15.8
no
@@ -4035,7 +4035,7 @@
@@ -4049,7 +4049,7 @@
Basic
- §7.15.9
+ §7.15.9
partial
@@ -4073,7 +4073,7 @@
Extended
- §7.15.10
+ §7.15.10
partial
@@ -4097,7 +4097,7 @@
Basic
- §7.15.11
+ §7.15.11
yes
@@ -4117,7 +4117,7 @@
Extended
- §7.15.12
+ §7.15.12
yes
@@ -4137,7 +4137,7 @@
Basic
- §7.15.13
+ §7.15.13
yes
@@ -4148,14 +4148,14 @@
- Character Properties (§7.16)
+ Character Properties (§7.16)
@@ -4166,7 +4166,7 @@
Basic
- §7.16.1
+ §7.16.1
yes
@@ -4186,7 +4186,7 @@
Extended
- §7.16.2
+ §7.16.2
yes
@@ -4206,7 +4206,7 @@
Extended
- §7.16.3
+ §7.16.3
no
@@ -4226,7 +4226,7 @@
Extended
- §7.16.4
+ §7.16.4
yes
@@ -4246,7 +4246,7 @@
Extended
- §7.16.5
+ §7.16.5
no
@@ -4266,7 +4266,7 @@
Extended
- §7.16.6
+ §7.16.6
no
@@ -4286,7 +4286,7 @@
Extended
- §7.16.7
+ §7.16.7
no
@@ -4306,7 +4306,7 @@
Extended
- §7.16.8
+ §7.16.8
no
@@ -4320,7 +4320,7 @@
- Color-related Properties (§7.17)
+ Color-related Properties (§7.17)
@@ -4331,7 +4331,7 @@
Basic
- §7.17.1
+ §7.17.1
yes
@@ -4351,7 +4351,7 @@
Extended
- §7.17.2
+ §7.17.2
no
@@ -4371,7 +4371,7 @@
Extended
- §7.17.3
+ §7.17.3
no
@@ -4385,7 +4385,7 @@
- Float-related Properties (§7.18)
+ Float-related Properties (§7.18)
@@ -4396,7 +4396,7 @@
Extended
- §7.18.1
+ §7.18.1
no
@@ -4416,7 +4416,7 @@
Extended
- §7.18.2
+ §7.18.2
no
@@ -4436,7 +4436,7 @@
Extended
- §7.18.3
+ §7.18.3
no
@@ -4450,7 +4450,7 @@
- Keeps and Breaks Properties (§7.19)
+ Keeps and Breaks Properties (§7.19)
@@ -4461,7 +4461,7 @@
Basic
- §7.19.1
+ §7.19.1
yes
@@ -4481,7 +4481,7 @@
Basic
- §7.19.2
+ §7.19.2
yes
@@ -4501,7 +4501,7 @@
Extended
- §7.19.3
+ §7.19.3
partial
@@ -4515,10 +4515,10 @@
[0.20.5] works only in table rows
@@ -4531,7 +4531,7 @@
Basic
- §7.19.4
+ §7.19.4
partial
@@ -4545,10 +4545,10 @@
[0.20.5] works only in table rows
@@ -4561,7 +4561,7 @@
Basic
- §7.19.5
+ §7.19.5
partial
@@ -4575,10 +4575,10 @@
[0.20.5] works only in table rows
@@ -4591,7 +4591,7 @@
Basic
- §7.19.6
+ §7.19.6
no
@@ -4611,7 +4611,7 @@
Basic
- §7.19.7
+ §7.19.7
no
@@ -4625,7 +4625,7 @@
- Layout-related Properties (§7.20)
+ Layout-related Properties (§7.20)
@@ -4636,7 +4636,7 @@
Extended
- §7.20.1
+ §7.20.1
no
@@ -4656,7 +4656,7 @@
Basic
- §7.20.2
+ §7.20.2
no
@@ -4676,7 +4676,7 @@
Extended
- §7.20.3
+ §7.20.3
no
@@ -4703,7 +4703,7 @@
Extended
- §7.20.4
+ §7.20.4
yes
@@ -4717,7 +4717,7 @@
- Leader and Rule Properties (§7.21)
+ Leader and Rule Properties (§7.21)
@@ -4728,7 +4728,7 @@
Extended
- §7.21.1
+ §7.21.1
partial
@@ -4742,7 +4742,7 @@
[0.20.5] not value "page"
@@ -4755,7 +4755,7 @@
Basic
- §7.21.2
+ §7.21.2
partial
@@ -4769,7 +4769,7 @@
[0.20.5] not value "use-content"
@@ -4782,7 +4782,7 @@
Extended
- §7.21.3
+ §7.21.3
yes
@@ -4802,7 +4802,7 @@
Basic
- §7.21.4
+ §7.21.4
partial
@@ -4826,7 +4826,7 @@
Basic
- §7.21.5
+ §7.21.5
yes
@@ -4846,7 +4846,7 @@
Basic
- §7.21.6
+ §7.21.6
yes
@@ -4860,7 +4860,7 @@
- Properties for Dynamic Effects Formatting Objects (§7.22)
+ Properties for Dynamic Effects Formatting Objects (§7.22)
@@ -4871,7 +4871,7 @@
Extended
- §7.22.1
+ §7.22.1
no
@@ -4891,7 +4891,7 @@
Extended
- §7.22.2
+ §7.22.2
no
@@ -4911,7 +4911,7 @@
Extended
- §7.22.3
+ §7.22.3
no
@@ -4931,7 +4931,7 @@
Extended
- §7.22.4
+ §7.22.4
no
@@ -4951,7 +4951,7 @@
Extended
- §7.22.5
+ §7.22.5
no
@@ -4971,7 +4971,7 @@
Basic
- §7.22.6
+ §7.22.6
yes
@@ -4991,7 +4991,7 @@
Extended
- §7.22.7
+ §7.22.7
no
@@ -5011,7 +5011,7 @@
Extended
- §7.22.8
+ §7.22.8
yes
@@ -5031,7 +5031,7 @@
Extended
- §7.22.9
+ §7.22.9
no
@@ -5051,7 +5051,7 @@
Extended
- §7.22.10
+ §7.22.10
no
@@ -5071,7 +5071,7 @@
Extended
- §7.22.11
+ §7.22.11
no
@@ -5091,7 +5091,7 @@
Extended
- §7.22.12
+ §7.22.12
no
@@ -5111,7 +5111,7 @@
Extended
- §7.22.13
+ §7.22.13
no
@@ -5131,7 +5131,7 @@
Extended
- §7.22.14
+ §7.22.14
no
@@ -5145,7 +5145,7 @@
- Properties for Markers (§7.23)
+ Properties for Markers (§7.23)
@@ -5156,7 +5156,7 @@
Extended
- §7.23.1
+ §7.23.1
no
@@ -5176,7 +5176,7 @@
Extended
- §7.23.2
+ §7.23.2
no
@@ -5196,7 +5196,7 @@
Extended
- §7.23.3
+ §7.23.3
no
@@ -5216,7 +5216,7 @@
Extended
- §7.23.4
+ §7.23.4
no
@@ -5230,7 +5230,7 @@
- Properties for Number to String Conversion (§7.24)
+ Properties for Number to String Conversion (§7.24)
@@ -5241,7 +5241,7 @@
Basic
- §7.24.1
+ §7.24.1
no
@@ -5261,7 +5261,7 @@
Extended
- §7.24.2
+ §7.24.2
no
@@ -5281,7 +5281,7 @@
Extended
- §7.24.3
+ §7.24.3
no
@@ -5301,7 +5301,7 @@
Basic
- §7.24.4
+ §7.24.4
no
@@ -5315,7 +5315,7 @@
- Pagination and Layout Properties (§7.25)
+ Pagination and Layout Properties (§7.25)
@@ -5326,7 +5326,7 @@
Extended
- §7.25.1
+ §7.25.1
yes
@@ -5346,7 +5346,7 @@
Extended
- §7.25.2
+ §7.25.2
yes
@@ -5366,7 +5366,7 @@
Extended
- §7.25.3
+ §7.25.3
yes
@@ -5386,7 +5386,7 @@
Extended
- §7.25.4
+ §7.25.4
yes
@@ -5406,7 +5406,7 @@
Basic
- §7.25.5
+ §7.25.5
yes
@@ -5426,7 +5426,7 @@
Extended
- §7.25.6
+ §7.25.6
no
@@ -5446,7 +5446,7 @@
Basic
- §7.25.7
+ §7.25.7
yes
@@ -5466,7 +5466,7 @@
Basic
- §7.25.8
+ §7.25.8
yes
@@ -5486,7 +5486,7 @@
Basic
- §7.25.9
+ §7.25.9
yes
@@ -5506,7 +5506,7 @@
Extended
- §7.25.10
+ §7.25.10
yes
@@ -5526,7 +5526,7 @@
Extended
- §7.25.11
+ §7.25.11
no
@@ -5546,7 +5546,7 @@
Extended
- §7.25.12
+ §7.25.12
yes
@@ -5566,7 +5566,7 @@
Basic
- §7.25.13
+ §7.25.13
yes
@@ -5586,7 +5586,7 @@
Extended
- §7.25.14
+ §7.25.14
partial
@@ -5610,7 +5610,7 @@
Basic
- §7.25.15
+ §7.25.15
yes
@@ -5630,7 +5630,7 @@
Extended
- §7.25.16
+ §7.25.16
no
@@ -5650,7 +5650,7 @@
Basic
- §7.25.17
+ §7.25.17
yes
@@ -5664,7 +5664,7 @@
- Table Properties (§7.26)
+ Table Properties (§7.26)
@@ -5675,7 +5675,7 @@
Basic
- §7.26.1
+ §7.26.1
no
@@ -5695,7 +5695,7 @@
Basic
- §7.26.2
+ §7.26.2
no
@@ -5715,7 +5715,7 @@
Extended
- §7.26.3
+ §7.26.3
partial
@@ -5739,7 +5739,7 @@
Basic
- §7.26.4
+ §7.26.4
no
@@ -5759,7 +5759,7 @@
Extended
- §7.26.5
+ §7.26.5
no
@@ -5779,7 +5779,7 @@
Basic
- §7.26.6
+ §7.26.6
no
@@ -5799,7 +5799,7 @@
Complete
- §7.26.7
+ §7.26.7
no
@@ -5819,7 +5819,7 @@
Basic
- §7.26.8
+ §7.26.8
no
@@ -5839,7 +5839,7 @@
Basic
- §7.26.9
+ §7.26.9
partial
@@ -5863,7 +5863,7 @@
Extended
- §7.26.10
+ §7.26.10
no
@@ -5883,7 +5883,7 @@
Extended
- §7.26.11
+ §7.26.11
no
@@ -5903,7 +5903,7 @@
Basic
- §7.26.12
+ §7.26.12
no
@@ -5923,7 +5923,7 @@
Basic
- §7.26.13
+ §7.26.13
yes
@@ -5943,7 +5943,7 @@
Basic
- §7.26.14
+ §7.26.14
yes
@@ -5963,7 +5963,7 @@
Extended
- §7.26.15
+ §7.26.15
no
@@ -5983,7 +5983,7 @@
Extended
- §7.26.16
+ §7.26.16
no
@@ -6003,7 +6003,7 @@
Extended
- §7.26.17
+ §7.26.17
yes
@@ -6023,7 +6023,7 @@
Extended
- §7.26.18
+ §7.26.18
yes
@@ -6037,7 +6037,7 @@
- Writing-mode-related Properties (§7.27)
+ Writing-mode-related Properties (§7.27)
@@ -6048,7 +6048,7 @@
Basic
- §7.27.1
+ §7.27.1
no
@@ -6068,7 +6068,7 @@
Extended
- §7.27.2
+ §7.27.2
no
@@ -6088,7 +6088,7 @@
Extended
- §7.27.3
+ §7.27.3
no
@@ -6108,7 +6108,7 @@
Extended
- §7.27.4
+ §7.27.4
no
@@ -6128,7 +6128,7 @@
Extended
- §7.27.5
+ §7.27.5
no
@@ -6148,7 +6148,7 @@
Extended
- §7.27.6
+ §7.27.6
no
@@ -6168,7 +6168,7 @@
Basic
- §7.27.7
+ §7.27.7
no
@@ -6182,7 +6182,7 @@
- Miscellaneous Properties (§7.28)
+ Miscellaneous Properties (§7.28)
@@ -6193,7 +6193,7 @@
Extended
@@ -6235,7 +6235,7 @@
Basic
- §7.28.1
+ §7.28.1
no
@@ -6213,7 +6213,7 @@
Basic
- §7.28.2
+ §7.28.2
yes
@@ -6223,7 +6223,7 @@
-
- §7.28.3
+ §7.28.3
yes
@@ -6255,7 +6255,7 @@
Basic
- §7.28.4
+ §7.28.4
yes
@@ -6275,7 +6275,7 @@
Extended
- §7.28.5
+ §7.28.5
yes
@@ -6295,7 +6295,7 @@
Extended
- §7.28.6
+ §7.28.6
no
@@ -6315,7 +6315,7 @@
Basic
- §7.28.7
+ §7.28.7
yes
@@ -6335,7 +6335,7 @@
Extended
- §7.28.8
+ §7.28.8
no
@@ -6355,7 +6355,7 @@
Extended
- §7.28.9
+ §7.28.9
no
@@ -6369,7 +6369,7 @@
- Shorthand Properties (§7.29)
+ Shorthand Properties (§7.29)
@@ -6380,7 +6380,7 @@
Complete
-
- §7.29.1
+ §7.29.1
no
@@ -6400,7 +6400,7 @@
Complete
- §7.29.2
+ §7.29.2
no
@@ -6420,7 +6420,7 @@
Complete
- §7.29.3
+ §7.29.3
no
@@ -6440,7 +6440,7 @@
Complete
- §7.29.4
+ §7.29.4
yes
@@ -6460,7 +6460,7 @@
Complete
- §7.29.5
+ §7.29.5
partial
@@ -6484,7 +6484,7 @@
Complete
- §7.29.6
+ §7.29.6
yes
@@ -6504,7 +6504,7 @@
Complete
- §7.29.7
+ §7.29.7
yes
@@ -6524,7 +6524,7 @@
Complete
- §7.29.8
+ §7.29.8
partial
@@ -6548,7 +6548,7 @@
Complete
- §7.29.9
+ §7.29.9
no
@@ -6568,7 +6568,7 @@
Complete
- §7.29.10
+ §7.29.10
yes
@@ -6588,7 +6588,7 @@
Complete
- §7.29.11
+ §7.29.11
yes
@@ -6608,7 +6608,7 @@
Complete
- §7.29.12
+ §7.29.12
na
@@ -6628,7 +6628,7 @@
Complete
- §7.29.13
+ §7.29.13
no
@@ -6639,7 +6639,7 @@
@@ -6652,7 +6652,7 @@
Complete
- §7.29.14
+ §7.29.14
partial
@@ -6676,7 +6676,7 @@
Complete
- §7.29.15
+ §7.29.15
partial
@@ -6709,7 +6709,7 @@
Complete
- §7.29.16
+ §7.29.16
no
@@ -6729,7 +6729,7 @@
Complete
- §7.29.17
+ §7.29.17
no
@@ -6749,7 +6749,7 @@
Complete
- §7.29.18
+ §7.29.18
no
@@ -6769,7 +6769,7 @@
Complete
- §7.29.19
+ §7.29.19
na
@@ -6789,7 +6789,7 @@
Complete
- §7.29.20
+ §7.29.20
partial
@@ -6813,7 +6813,7 @@
Complete
- §7.29.21
+ §7.29.21
no
@@ -6833,7 +6833,7 @@
Complete
- §7.29.22
+ §7.29.22
partial
@@ -6847,7 +6847,7 @@
[0.20.5] Only works as a shorthand for baseline-shift property.
@@ -6860,7 +6860,7 @@
Complete
- §7.29.23
+ §7.29.23
no
@@ -6880,7 +6880,7 @@
Complete
- §7.29.24
+ §7.29.24
no
@@ -6893,7 +6893,7 @@
XSL-FO Core Function Library Support Table (§5.10)
+ XSL-FO Core Function Library Support Table (§5.10)
- 0.20.5 (current stable)
+ 0.20.5 (previous)
- 0.92 beta (unstable)
+ 0.93 (stable)
- Number Functions (§5.10.1)
+ Number Functions (§5.10.1)
@@ -6936,7 +6936,7 @@
Basic
- §5.10.1
+ §5.10.1
yes
@@ -6956,7 +6956,7 @@
Basic
- §5.10.1
+ §5.10.1
yes
@@ -6976,7 +6976,7 @@
Basic
- §5.10.1
+ §5.10.1
yes
@@ -6996,7 +6996,7 @@
Basic
- §5.10.1
+ §5.10.1
yes
@@ -7016,7 +7016,7 @@
Basic
- §5.10.1
+ §5.10.1
yes
@@ -7036,7 +7036,7 @@
Basic
- §5.10.1
+ §5.10.1
yes
@@ -7050,7 +7050,7 @@
- Color Functions (§5.10.2)
+ Color Functions (§5.10.2)
@@ -7061,7 +7061,7 @@
Basic
- §5.10.2
+ §5.10.2
yes
@@ -7081,7 +7081,7 @@
Basic
- §5.10.2
+ §5.10.2
no
@@ -7101,7 +7101,7 @@
Basic
- §5.10.2
+ §5.10.2
no
@@ -7115,7 +7115,7 @@
- Font Functions (§5.10.3)
+ Font Functions (§5.10.3)
@@ -7126,7 +7126,7 @@
Basic
- §5.10.3
+ §5.10.3
no
@@ -7140,7 +7140,7 @@
- Property Value Functions (§5.10.4)
+ Property Value Functions (§5.10.4)
@@ -7151,7 +7151,7 @@
Basic
- §5.10.4
+ §5.10.4
yes
@@ -7171,7 +7171,7 @@
Basic
- §5.10.4
+ §5.10.4
yes
@@ -7191,7 +7191,7 @@
Basic
- §5.10.4
+ §5.10.4
yes
@@ -7211,7 +7211,7 @@
Basic
- §5.10.4
+ §5.10.4
yes
@@ -7231,7 +7231,7 @@
Basic
- §5.10.4
+ §5.10.4
yes
@@ -7251,7 +7251,7 @@
Basic
- §5.10.4
+ §5.10.4
no
@@ -7271,7 +7271,7 @@
Basic
- §5.10.4
+ §5.10.4
yes
@@ -7291,7 +7291,7 @@
Basic
- §5.10.4
+ §5.10.4
no
diff --git a/src/documentation/content/xdocs/download.xml b/src/documentation/content/xdocs/download.xml
index 6c9647a69..199587417 100644
--- a/src/documentation/content/xdocs/download.xml
+++ b/src/documentation/content/xdocs/download.xml
@@ -116,16 +116,16 @@
Repository URL
-
-
http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_92/
+
+ http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_93/
diff --git a/src/documentation/content/xdocs/examples.xml b/src/documentation/content/xdocs/examples.xml
index 8b40246d9..c8d4a5dde 100644
--- a/src/documentation/content/xdocs/examples.xml
+++ b/src/documentation/content/xdocs/examples.xml
@@ -17,7 +17,7 @@
-->
+ "http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/schema/dtd/document-v12.dtd?view=co">
Web view
-
-
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/fop-0_92/
+
+ http://svn.apache.org/viewvc/xmlgraphics/fop/branches/fop-0_93/
Try also setting the fontBaseDir + href="0.93/configuration.html#general-elements">font-base configuration.
@@ -388,7 +389,7 @@
The force-page-count
+ href="http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#force-page-count">force-page-count
property controls how a FO processor pads page sequences in
order to get certain page counts or last page numbers. The default is
"auto
". With this setting, if the next page sequence
@@ -469,7 +470,7 @@ Check the following:
Other possibilities:
See FOP Graphics Formats for a +
See FOP Graphics Formats for a list of supported graphics formats and related issues.
See Graphics Resolution.
+See Graphics Resolution.
Make sure you have set the language and/or country attributes for an appropriate XSL-FO element (fo:page-sequence, fo:block or fo:character):
+Make sure you have set the language and optionally the country attributes for an appropriate XSL-FO element (fo:page-sequence, fo:block or fo:character):
-See Hyphenation Support for details and instructions on using hyphenation with FOP.
+See Hyphenation Support for details and instructions on using hyphenation with FOP.
Explicitly enable hyphenation for an appropriate XSL-FO element (fo:block, fo:character):
- See Using FOP in a Servlet. + See Using FOP in a Servlet.
- See Using FOP in a Servlet with XSLT Transformation. + See Using FOP in a Servlet with XSLT Transformation.
- See Using FOP in a Servlet with XSLT Transformation. + See Using FOP in a Servlet with XSLT Transformation.
- See Setting the Configuration Programmatically. + See Setting the Configuration Programmatically.
- See Using a Configuration File in an Embedded App. + See Using a Configuration File in an Embedded App.
- See Servlet Engines. + See Servlet Engines.
- See Multithreading FOP. + See Multithreading FOP.
See Placing SVG Text into PDF.
+See Placing SVG Text into PDF.
See FOP: Graphics (Batik).
+See FOP: Graphics (Batik).
See SVG Scaling.
+See SVG Scaling.
- See the Fonts page for information + See the Fonts page for information about embedding fonts.
@@ -851,7 +852,7 @@ Can I control this? the desired character. Furthermore the font must be available on the machine where the PDF is viewed or it must have been embedded in the PDF file. See embedding fonts. + href="0.93/fonts.html">embedding fonts.
For most symbols, it is better to select the symbol font
@@ -869,7 +870,7 @@ Can I control this?
See PDF Post-processing. See PDF Post-processing.
- See PDF Encryption.
- See also PDF Post-processing.
+ See PDF Encryption.
+ See also PDF Post-processing.
See PDF Post-processing. See PDF Post-processing.
See PDF Watermarks.
+See PDF Watermarks.
This is a problem of Internet Explorer requesting the content several - times. Please see the notes on Internet Explorer + times. Please see the notes on Internet Explorer for more information.
- FOP also maintains an Unofficial FOP Schema in the FOP CVS Repository. + FOP also maintains an Unofficial FOP Schema in the FOP CVS Repository. This document can be used either to validate against the FO standard, or against the actual FOP implementation. See the notes near the beginning of the document for instructions on how to use it.
diff --git a/src/documentation/content/xdocs/index.xml b/src/documentation/content/xdocs/index.xml index 6edc8580e..72ff065f7 100644 --- a/src/documentation/content/xdocs/index.xml +++ b/src/documentation/content/xdocs/index.xml @@ -36,12 +36,12 @@- The latest stable version of FOP (0.20.5) is a partial implementation of the + The previous version of FOP (0.20.5) is a partial implementation of the XSL-FO Version 1.0 W3C Recommendation.
- The latest version of FOP (0.92 beta) is the second preview release + The latest stable version of FOP (0.93) is the first stable release after a large redesign effort and implements a larger subset than 0.20.5 of the XSL-FO Version 1.0 W3C Recommendation as well as some parts of the XSL-FO Version 1.1 Working Draft. diff --git a/src/documentation/content/xdocs/knownissues.xml b/src/documentation/content/xdocs/knownissues.xml index dc04d9262..caf96ceaa 100644 --- a/src/documentation/content/xdocs/knownissues.xml +++ b/src/documentation/content/xdocs/knownissues.xml @@ -35,7 +35,6 @@ For additional information on known issues in Apache FOP, please have a look at the following pages, too:
@@ -64,6 +63,11 @@This section lists other known issues.
+