From 4436971c877e163e05b906e574d76eb444870bbd Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Wed, 7 Jul 2010 15:04:01 +0000 Subject: [PATCH] Changes to the documentation, partly needed for the new release, partly updates to outdated information git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-1_0@961399 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/.htaccess | 51 +- src/documentation/content/doap.rdf | 15 +- .../content/xdocs/0.94/extensions.xml | 121 ---- .../content/xdocs/0.94/fonts.xml | 322 ---------- .../content/xdocs/0.94/graphics.xml | 401 ------------ .../content/xdocs/0.94/intermediate.xml | 146 ----- .../content/xdocs/1.0/accessibility.xml | 167 +++++ .../content/xdocs/{0.94 => 1.0}/anttask.xml | 40 ++ .../content/xdocs/{0.94 => 1.0}/compiling.xml | 6 +- .../xdocs/{0.94 => 1.0}/configuration.xml | 142 ++++- .../content/xdocs/{0.94 => 1.0}/embedding.xml | 257 ++++---- .../content/xdocs/1.0/events.xml | 449 +++++++++++++ .../content/xdocs/1.0/extensions.xml | 340 ++++++++++ src/documentation/content/xdocs/1.0/fonts.xml | 564 +++++++++++++++++ .../fotree/disabled-testcases.xml | 0 .../content/xdocs/1.0/graphics.xml | 590 ++++++++++++++++++ .../xdocs/{0.94 => 1.0}/hyphenation.xml | 0 .../content/xdocs/{0.94 => 1.0}/index.xml | 23 +- .../content/xdocs/1.0/intermediate.xml | 331 ++++++++++ .../xdocs/{0.94 => 1.0}/known-issues.xml | 9 +- .../{0.94 => 1.0}/knownissues_overview.xml | 6 +- .../layoutengine/disabled-testcases.xml | 118 +--- .../content/xdocs/1.0/metadata.xml | 243 ++++++++ .../content/xdocs/{0.94 => 1.0}/output.xml | 537 ++++++++++++++-- .../content/xdocs/{0.94 => 1.0}/pdfa.xml | 23 +- .../xdocs/{0.94 => 1.0}/pdfencryption.xml | 6 +- .../content/xdocs/{0.94 => 1.0}/pdfx.xml | 4 +- .../content/xdocs/{0.94 => 1.0}/running.xml | 240 +++---- .../content/xdocs/{0.94 => 1.0}/servlets.xml | 2 +- .../content/xdocs/{0.94 => 1.0}/upgrading.xml | 30 +- .../content/xdocs/dev/release.xml | 35 +- src/documentation/content/xdocs/examples.xml | 2 +- src/documentation/content/xdocs/faq.xml | 101 ++- src/documentation/content/xdocs/fo.xml | 2 +- src/documentation/content/xdocs/maillist.xml | 2 +- src/documentation/content/xdocs/news-data.xml | 12 +- .../content/xdocs/quickstartguide.xml | 18 +- src/documentation/content/xdocs/relnotes.xml | 551 ---------------- src/documentation/content/xdocs/resources.xml | 39 +- src/documentation/content/xdocs/site.xml | 4 +- src/documentation/content/xdocs/status.xml | 199 +----- src/documentation/content/xdocs/tabs.xml | 2 +- .../content/xdocs/trunk/fonts.xml | 2 +- .../content/xdocs/trunk/graphics.xml | 12 +- src/documentation/skinconf.xml | 2 + 45 files changed, 3836 insertions(+), 2330 deletions(-) delete mode 100644 src/documentation/content/xdocs/0.94/extensions.xml delete mode 100644 src/documentation/content/xdocs/0.94/fonts.xml delete mode 100644 src/documentation/content/xdocs/0.94/graphics.xml delete mode 100644 src/documentation/content/xdocs/0.94/intermediate.xml create mode 100644 src/documentation/content/xdocs/1.0/accessibility.xml rename src/documentation/content/xdocs/{0.94 => 1.0}/anttask.xml (83%) rename src/documentation/content/xdocs/{0.94 => 1.0}/compiling.xml (97%) rename src/documentation/content/xdocs/{0.94 => 1.0}/configuration.xml (71%) rename src/documentation/content/xdocs/{0.94 => 1.0}/embedding.xml (87%) create mode 100644 src/documentation/content/xdocs/1.0/events.xml create mode 100644 src/documentation/content/xdocs/1.0/extensions.xml create mode 100644 src/documentation/content/xdocs/1.0/fonts.xml rename src/documentation/content/xdocs/{0.94 => 1.0}/fotree/disabled-testcases.xml (100%) create mode 100644 src/documentation/content/xdocs/1.0/graphics.xml rename src/documentation/content/xdocs/{0.94 => 1.0}/hyphenation.xml (100%) rename src/documentation/content/xdocs/{0.94 => 1.0}/index.xml (72%) create mode 100644 src/documentation/content/xdocs/1.0/intermediate.xml rename src/documentation/content/xdocs/{0.94 => 1.0}/known-issues.xml (92%) rename src/documentation/content/xdocs/{0.94 => 1.0}/knownissues_overview.xml (89%) rename src/documentation/content/xdocs/{0.94 => 1.0}/layoutengine/disabled-testcases.xml (65%) create mode 100644 src/documentation/content/xdocs/1.0/metadata.xml rename src/documentation/content/xdocs/{0.94 => 1.0}/output.xml (58%) rename src/documentation/content/xdocs/{0.94 => 1.0}/pdfa.xml (87%) rename src/documentation/content/xdocs/{0.94 => 1.0}/pdfencryption.xml (97%) rename src/documentation/content/xdocs/{0.94 => 1.0}/pdfx.xml (97%) rename src/documentation/content/xdocs/{0.94 => 1.0}/running.xml (71%) rename src/documentation/content/xdocs/{0.94 => 1.0}/servlets.xml (99%) rename src/documentation/content/xdocs/{0.94 => 1.0}/upgrading.xml (82%) delete mode 100644 src/documentation/content/xdocs/relnotes.xml diff --git a/src/documentation/content/.htaccess b/src/documentation/content/.htaccess index 5203ea63e..b020b2422 100644 --- a/src/documentation/content/.htaccess +++ b/src/documentation/content/.htaccess @@ -1,38 +1,39 @@ # redirect moved files -RedirectMatch Permanent ^/fop/anttask(.*) http://xmlgraphics.apache.org/fop/0.95/anttask$1 -RedirectMatch Permanent ^/fop/compiling(.*) http://xmlgraphics.apache.org/fop/0.95/compiling$1 -RedirectMatch Permanent ^/fop/configuration(.*) http://xmlgraphics.apache.org/fop/0.95/configuration$1 -RedirectMatch Permanent ^/fop/embedding(.*) http://xmlgraphics.apache.org/fop/0.95/embedding$1 -RedirectMatch Permanent ^/fop/extensions(.*) http://xmlgraphics.apache.org/fop/0.95/extensions$1 -RedirectMatch Permanent ^/fop/fonts(.*) http://xmlgraphics.apache.org/fop/0.95/fonts$1 -RedirectMatch Permanent ^/fop/graphics(.*) http://xmlgraphics.apache.org/fop/0.95/graphics$1 -RedirectMatch Permanent ^/fop/hyphenation(.*) http://xmlgraphics.apache.org/fop/0.95/hyphenation$1 -RedirectMatch Permanent ^/fop/intermediate(.*) http://xmlgraphics.apache.org/fop/0.95/intermediate$1 -RedirectMatch Permanent ^/fop/output(.*) http://xmlgraphics.apache.org/fop/0.95/output$1 -RedirectMatch Permanent ^/fop/pdfa(.*) http://xmlgraphics.apache.org/fop/0.95/pdfa$1 -RedirectMatch Permanent ^/fop/pdfencryption(.*) http://xmlgraphics.apache.org/fop/0.95/pdfencryption$1 -RedirectMatch Permanent ^/fop/pdfx(.*) http://xmlgraphics.apache.org/fop/0.95/pdfx$1 -RedirectMatch Permanent ^/fop/running(.*) http://xmlgraphics.apache.org/fop/0.95/running$1 -RedirectMatch Permanent ^/fop/servlets(.*) http://xmlgraphics.apache.org/fop/0.95/servlets$1 -RedirectMatch Permanent ^/fop/upgrading(.*) http://xmlgraphics.apache.org/fop/0.95/upgrading$1 +RedirectMatch Permanent ^/fop/anttask(.*) http://xmlgraphics.apache.org/fop/1.0/anttask$1 +RedirectMatch Permanent ^/fop/compiling(.*) http://xmlgraphics.apache.org/fop/1.0/compiling$1 +RedirectMatch Permanent ^/fop/configuration(.*) http://xmlgraphics.apache.org/fop/1.0/configuration$1 +RedirectMatch Permanent ^/fop/embedding(.*) http://xmlgraphics.apache.org/fop/1.0/embedding$1 +RedirectMatch Permanent ^/fop/extensions(.*) http://xmlgraphics.apache.org/fop/1.0/extensions$1 +RedirectMatch Permanent ^/fop/fonts(.*) http://xmlgraphics.apache.org/fop/1.0/fonts$1 +RedirectMatch Permanent ^/fop/graphics(.*) http://xmlgraphics.apache.org/fop/1.0/graphics$1 +RedirectMatch Permanent ^/fop/hyphenation(.*) http://xmlgraphics.apache.org/fop/1.0/hyphenation$1 +RedirectMatch Permanent ^/fop/intermediate(.*) http://xmlgraphics.apache.org/fop/1.0/intermediate$1 +RedirectMatch Permanent ^/fop/output(.*) http://xmlgraphics.apache.org/fop/1.0/output$1 +RedirectMatch Permanent ^/fop/pdfa(.*) http://xmlgraphics.apache.org/fop/1.0/pdfa$1 +RedirectMatch Permanent ^/fop/pdfencryption(.*) http://xmlgraphics.apache.org/fop/1.0/pdfencryption$1 +RedirectMatch Permanent ^/fop/pdfx(.*) http://xmlgraphics.apache.org/fop/1.0/pdfx$1 +RedirectMatch Permanent ^/fop/running(.*) http://xmlgraphics.apache.org/fop/1.0/running$1 +RedirectMatch Permanent ^/fop/servlets(.*) http://xmlgraphics.apache.org/fop/1.0/servlets$1 +RedirectMatch Permanent ^/fop/upgrading(.*) http://xmlgraphics.apache.org/fop/1.0/upgrading$1 # redirect to versioned documentation # Current stable release -Redirect Temp /fop/stable http://xmlgraphics.apache.org/fop/0.95 +Redirect Temp /fop/stable http://xmlgraphics.apache.org/fop/1.0 # Current unstable release (or trunk if no beta is the latest release) Redirect Temp /fop/unstable http://xmlgraphics.apache.org/fop/trunk # Latest release -Redirect Temp /fop/current http://xmlgraphics.apache.org/fop/0.95 -Redirect Temp /fop/latest http://xmlgraphics.apache.org/fop/0.95 +Redirect Temp /fop/current http://xmlgraphics.apache.org/fop/1.0 +Redirect Temp /fop/latest http://xmlgraphics.apache.org/fop/1.0 # Previous stable release -Redirect Temp /fop/previous http://xmlgraphics.apache.org/fop/0.94 +Redirect Temp /fop/previous http://xmlgraphics.apache.org/fop/0.95 # Old releases -Redirect Temp /fop/maintenance http://xmlgraphics.apache.org/fop/0.94 -Redirect Temp /fop/0.90alpha1 http://xmlgraphics.apache.org/fop/0.94 -Redirect Temp /fop/0.91beta http://xmlgraphics.apache.org/fop/0.94 -Redirect Temp /fop/0.92beta http://xmlgraphics.apache.org/fop/0.94 -Redirect Temp /fop/0.93 http://xmlgraphics.apache.org/fop/0.94 +Redirect Temp /fop/maintenance http://xmlgraphics.apache.org/fop/0.95 +Redirect Temp /fop/0.90alpha1 http://xmlgraphics.apache.org/fop/0.95 +Redirect Temp /fop/0.91beta http://xmlgraphics.apache.org/fop/0.95 +Redirect Temp /fop/0.92beta http://xmlgraphics.apache.org/fop/0.95 +Redirect Temp /fop/0.93 http://xmlgraphics.apache.org/fop/0.95 +Redirect Temp /fop/0.94 http://xmlgraphics.apache.org/fop/0.95 diff --git a/src/documentation/content/doap.rdf b/src/documentation/content/doap.rdf index 734e8339b..5a4aac934 100644 --- a/src/documentation/content/doap.rdf +++ b/src/documentation/content/doap.rdf @@ -77,22 +77,15 @@ Previous stable release - 2007-08-23 - 0.94 - - - - - Previous development release - 2008-03-26 - 0.95beta + 2008-08-05 + 0.95 Latest stable release - 2008-08-05 - 0.95 + 2010-07-31 + 1.0 diff --git a/src/documentation/content/xdocs/0.94/extensions.xml b/src/documentation/content/xdocs/0.94/extensions.xml deleted file mode 100644 index 04d44ef6f..000000000 --- a/src/documentation/content/xdocs/0.94/extensions.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - -
- Standard FOP Extensions - $Revision$ -
- -

- 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. -

- All extensions require the correct use of an appropriate namespace in your input document. -
- SVG -

- Please see the SVG documentation for more details. -

-
-
- FO Extensions -
- Namespace -

- By convention, FO extensions in FOP use the "fox" namespace prefix. - To use any of the FO extensions, add a namespace entry for - http://xmlgraphics.apache.org/fop/extensions to the root element: -

- ]]> -
-
- PDF Bookmarks -

- In previous versions of Apache FOP there was a 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. -

-
-
- Anchors or Named Destinations -

This extension element hasn't been reimplemented for the redesigned code, yet.

- -
-
- Table Continuation Label -

This extension element hasn't been reimplemented for the redesigned code, yet.

- -
-
- fox:orphan-content-limit and fox:widow-content-limit -

- 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. -

-
-
- -
- diff --git a/src/documentation/content/xdocs/0.94/fonts.xml b/src/documentation/content/xdocs/0.94/fonts.xml deleted file mode 100644 index 1f1c66b31..000000000 --- a/src/documentation/content/xdocs/0.94/fonts.xml +++ /dev/null @@ -1,322 +0,0 @@ - - - - - -
- Apache FOP: Fonts - $Revision$ - - - - - -
- -
- Summary - The FOP Font subsystem is currently undergoing a significant change. - The details provided here especially related to the generation of FOP Font - Metrics files and the FOP Font configuration are likely to change substantially - in the future. - -

The following table summarizes the font capabilities of the various FOP renderers:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RendererBase-14AWT/OSCustomCustom Embedding
PDFyesnoyesyes
PostScriptyesnoyesyes
TXTyes (used for layout but not for output)noyes (used for layout but not for output)no
AWTif available from OSyesyesn/a (display only)
Printif available from OSyesyescontrolled by OS printer driver
RTFn/a (font metrics not needed)n/an/an/a
MIFn/a (font metrics not needed)n/an/an/a
SVGif available from OSyesnono
XMLyesnoyesn/a
-
-
- Base-14 Fonts -

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.

-
-
- AWT/Operating System Fonts -

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.

-
-
- Custom Fonts -

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:

- -
- Type 1 Font Metrics -

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):

- java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar - org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file -

Windows (on JDK 1.3.x):

- java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar;lib\xml-apis.jar; - lib\xercesImpl.jar;lib\xalan.jar;lib\serializer.jar - org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file -

Unix (on JDK 1.4 and later):

- java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar - org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file -

Unix (on JDK 1.3.1):

- java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar:lib/xml-apis.jar: - lib/xercesImpl.jar:lib/xalan.jar:lib/serializer.jar - org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file -

PFMReader [options]:

-
    -
  • -fn <fontname> By default, FOP uses the fontname from the -.pfm file when embedding the font. Use the "-fn" option to override this name with one you have -chosen. This may be useful in some cases to ensure that applications using the output document -(Acrobat Reader for example) use the embedded font instead of a local font with the same -name.
  • -
- The classpath in the above example has been simplified for readability. -You will have to adjust the classpath to the names of the actual JAR files in the lib directory. -xml-apis.jar, xercesImpl.jar, xalan.jar and serializer.jar are not necessary for JDK version 1.4 or later. - The tool will construct some values (FontBBox, StemV and ItalicAngle) based on assumptions and calculations which are only an approximation to the real values. -FontBBox and Italic Angle can be found in the human-readable part of the PFB file or in the AFM file. -The PFMReader tool does not yet interpret PFB or AFM files, so if you want to be correct, you may have to adjust the values in the XML file manually. -The constructed values however appear to have no visible influence. -
-
- TrueType Font Metrics -

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:

- java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar - org.apache.fop.fonts.apps.TTFReader [options] - C:\myfonts\cmr10.ttf ttfcm.xml -

TTFReader [options]:

-
    -
  • -d <DEBUG | INFO > Sets the debug level (default is -INFO).
  • -
  • -fn <fontname> Same as for PFMReader.
  • -
  • -ttcname <fontname> If you're reading data from a -TrueType Collection (.ttc file) you must specify which font from the collection you will read -metrics from. -If you read from a .ttc file without this option, the fontnames will be listed for you.
  • -
  • -enc ansi Creates a WinAnsi-encoded font metrics file. -Without this option, a CID-keyed font metrics file is created. -The table below summarizes the differences between these two encoding options as currently -used within FOP. -Please note that this information only applies to TrueType fonts and TrueType collections:
  • -
- - - - - - - - - - - - - - - - -
IssueWinAnsiCID-keyed
Usable Character SetLimited to WinAnsi character set, which is roughly equivalent to iso-8889-1.Limited only by the characters in the font itself.
Embedding the FontOptional.Mandatory. Not embedding the font produces invalid PDF documents.
- - You may experience failures with certain TrueType fonts, especially if they don't contain - the so-called Unicode "cmap" table. TTFReader can currently not deal with font like this. - -
-
- TrueType Collections Font Metrics -

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:

- java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar - org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho" - msmincho.ttc msminch.xml -
-
- Register Fonts with FOP -

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:

- - - - - - - - C:\MyFonts1 - - - C:\MyFonts2 - - - -]]> - - Review the documentation for FOP Configuration for - instructions on making the FOP configuration available to FOP when it runs. Otherwise, - FOP has no way of finding your custom font information. - -
    -
  • - URLs are used to access the font metric and font files. - Relative URLs are resolved relative to the font-base property (or base) if available. - See FOP: Configuration for more information. -
  • -
  • - If relative URLs are specified, they are evaluated relative to the value of the - "font-base" setting. If there is no "font-base" setting, the fonts are evaluated - relative to the base directory. -
  • -
  • Either an "embed-url" or a "metrics-url" must be specified for font tag configurations.
  • -
  • The font "kerning" attribute is optional.
  • -
  • If embedding is off, the output will position the text correctly (from the metrics file), but it will not be displayed or printed correctly unless the viewer has the applicable font available to their local system.
  • -
  • When setting the "embed-url" attribute for Type 1 fonts, be sure to specify the PFB (actual font data), not PFM (font metrics) file that you used to generate the XML font metrics file.
  • -
  • The fonts "directory" tag can be used to register fonts contained within a single or list of directory paths. The "recursive" attribute can be specified to recursively add fonts from all sub directories.
  • -
  • Fonts registered with "font" tag configurations override fonts found by means of "directory" tag definitions.
  • -
  • Fonts found as a result of a "directory" tag configuration override fonts found as a result of the "auto-detect" tag being specified.
  • -
  • The fonts "auto-detect" tag can be used to automatically register fonts that are found to be installed on the native operating system. -
      -
    • On Unix platforms the autodetect feature looks in java user.home + "/.fonts", "/usr/local/fonts", "/usr/share/fonts" and "/usr/X11R6/lib/X11/fonts" for fonts it is able to use.
    • -
    • On Mac platforms the autodetect feature looks in java user.home + "/Library/Fonts/, "/Library/Fonts/", "/System/Library/Fonts/" and "/Network/Library/Fonts/" for fonts it is able to use.
    • -
    • On Windows platforms the autodetect feature attempts to determine the Windows fonts directory (usually C:\WINDOWS\FONTS) and also the existence of a PSFONTS directory for fonts it is able to use.
    • -
    -
  • -
- -
-
- Embedding - The PostScript renderer does not yet support TrueType fonts, but can embed Type 1 fonts. - The font is simply embedded into the PDF file, it is not converted. -

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.

- - Omitting the embed-url attribute for CID-encoded TrueType fonts will currently produce invalid - PDF files! If you create the XML font metric file using the "-enc ansi" option, you can omit - the embed-url attribute for TrueType fonts but you're restricted to the WinAnsi character set. - -

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.

-
-
- Explicitly embedding the base 14 fonts -

- 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:

- - - Symbol - - SymbolEncoding - 673 - 766 - [..]]]> -
-
- -
diff --git a/src/documentation/content/xdocs/0.94/graphics.xml b/src/documentation/content/xdocs/0.94/graphics.xml deleted file mode 100644 index 164069733..000000000 --- a/src/documentation/content/xdocs/0.94/graphics.xml +++ /dev/null @@ -1,401 +0,0 @@ - - - - - -
- Apache FOP: Graphics Formats - $Revision$ -
- -
- Overview of Graphics Support -

- 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. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FormatTypeFOP native supportBatik SVGBatik codecsImage I/OJAIJIMI
BMP (Microsoft Windows Bitmap)bitmapX
EPS (Encapsulated PostScript)metafile (both bitmap and vector), probably most frequently used for vector drawings(X)
GIF (Graphics Interchange Format)bitmapXXXX
JPEG (Joint Photographic Experts Group)bitmap(X)X
PNG (Portable Network Graphic)bitmapXX
SVG (Scalable Vector Graphics)vector (with embedded bitmaps)X
TIFF (Tag Image Format File)bitmap(X)XXX
EMF (Windows Enhanced Metafile)vector (with embedded bitmaps)(X)
- "(X)" means restricted support. Please see the details below. -
-
- Graphics Packages -
- FOP Native -

- FOP has native ability to handle some graphic file formats. -

-
-
- "Internal" codecs -

- Apache XML Graphics Commons contains codecs for PNG and TIFF access. FOP can use these. -

-
-
- Image I/O (JDK 1.4 or higher) -

- 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. -

-
-
- JIMI -

- 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. -

-
-
- JAI (Java Advanced Imaging API) -

- 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. -

-
-
- Apache Batik -

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. -

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:

-
    -
  • If you are using JDK 1.4, start it with the -Djava.awt.headless=true command line option.
  • -
  • Install an X server which provides an in-memory framebuffer without actually using a screen device or any display hardware. One example is Xvfb.
  • -
  • Install a toolkit which emulates AWT without the need for an underlying X server. One example is the PJA toolkit, which is free and comes with detailed installation instructions.
  • -
-
-
-
- BMP -

FOP native support for BMP images is limited to the RGB color-space.

-
-
- EPS -

FOP provides support for two output targets:

-
    -
  • PostScript (full support).
  • -
  • - PDF (partial support). Due to the lack of a built-in PostScript interpreter, FOP - can only embed the EPS file into the PDF. Acrobat Reader will not currently display - the EPS (it doesn't have a PostScript interpreter, either) but it will be shown - correctly when you print the PDF on a PostScript-capable printer. PostScript devices - (including GhostScript) will render the EPS correctly. -
  • -
- - Please note that the EPS embedding feature has been deprecated in the - PDF specification version 1.4. You should not use this feature anymore, especially - since newer PDF tools don't support embedded EPS files anymore. - -

- 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. -

-
-
- JPEG -

- 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. -

-
-
- PNG -

- If using JAI for PNG support, only RGB and RGBA color-spaces are supported for - FOP rendering. -

-

- Transparency is supported but not guaranteed to work with every output format. -

-
-
- SVG -
- Introduction -

FOP uses Apache Batik for SVG support. -This format can be handled as an fo:instream-foreign-object or in a separate -file referenced with fo:external-graphic.

- -Batik's SVG Rasterizer utility may also be used to convert standalone SVG -documents into PDF. For more information please see the -SVG Rasterizer documentation -on the Batik site. - -
-
- Placing SVG Graphics into PDF -

-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. The same applies to PostScript output. -For other output formats the SVG graphic will be converted to a bitmap -image. -

-

-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 these raster images can - be controlled through the "target resolution" setting in the - configuration.

-

-Currently transparency is limited in PDF so many svg images that -contain effects or graphics with transparent areas may not be displayed -correctly. -

-
-
- Placing SVG Text into PDF and PostScript -

If possible, Batik will use normal PDF or PostScript 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 output files large and when it is viewed the -viewer may not normally draw those fine curves very well (In Adobe Acrobat, turning on -"Smooth Line Art" in the preferences will fix this). -If the text is inserted into the output file using the inbuilt text commands -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.

-
-
- Scaling -

- 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. -

-

- If you use pixels to specify the size of an SVG graphic the "source resolution" setting - in the configuration will be used to determine the - size of a pixel. The use of pixels to specify sizes is discouraged as they may - be interpreted differently in different environments. -

-
-
- Known Problems -
    -
  • -Soft mask transparency is combined with white so that it looks better -on pdf 1.3 viewers but this causes the soft mask to be slightly lighter -or darker on pdf 1.4 viewers. -
  • -
  • -There is some problem with a gradient inside a pattern causing a PDF -error when viewed in acrobat 5. -
  • -
  • -Text is not always handled correctly, it may select the wrong font -especially if characters have multiple fonts in the font list. -
  • -
  • -More PDF text handling could be implemented. -It could draw the string using the attributed character iterator -to handle tspans and other simple changes of text. -
  • -
  • -JPEG images are not inserted directly into the pdf document. -This area has not been implemented yet since the appropriate -method in batik is static. -
  • -
  • -Uniform transparency for images and other svg elements that are converted -into a raster graphic are not drawn properly in PDF. The image is opaque. -
  • -
-
-
-
- TIFF -

- 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): -

-
    -
  • single channel images (i.e., bi-level and grayscale only)
  • -
  • uncompressed images, or images using CCITT T.4, CCITT T.6, or JPEG compression
  • -
  • images using white-is-zero encoding in the TIFF PhotometricInterpretation tag
  • -
- - Native support in this case means that the images can be embedded into the output format - without decoding it. - -

JAI: Supports RGB and RGBA only for FOP rendering.

-
-
- EMF -

Windows Enhanced Metafiles (EMF) are only supported in RTF output.

-
-
- Graphics Resolution -

- Some bitmapped image file formats store a dots-per-inch (dpi) or other resolution - values. FOP tries to use this resolution information whenever possible to determine - the image's intrinsic size. This size is used during the layout process when it is not - superceeded by an explicit size on fo:external-graphic (content-width and content-height - properties). -

-

- Please note that not all images contain resolution information. If it's not available - 72 dpi is assumed (the default resolution of PDF and PostScript). -

-

- Bitmap images are generally embedded into the output format at their original resolution - (as is). No resampling of the image is performed. Explicit resampling is on our wishlist, - but hasn't been implemented, yet. Bitmaps included in SVG graphics may be resampled to - the resolution specified in the "target resolution" setting in the - configuration if SVG filters are applied. This can be - used as a work-around to resample images in FO documents. -

-
-
- Image caching -

- FOP caches images between runs. There is one cache per FopFactory instance. The URI is - used as a key to identify images which means that when a particular URI 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 like in earlier versions of FOP has become unnecessary. If you - still experience OutOfMemoryErrors, please notify us. -

-
- -
diff --git a/src/documentation/content/xdocs/0.94/intermediate.xml b/src/documentation/content/xdocs/0.94/intermediate.xml deleted file mode 100644 index 4744185aa..000000000 --- a/src/documentation/content/xdocs/0.94/intermediate.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - - -
- Intermediate Format - $Revision$ -
- - - Please note that the intermediate format is an advanced feature and can be ignored by most - users of Apache FOP. - -
- Introduction -

- 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. -

-
-
- Usage of the Intermediate Format -

- 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 - examples/embedding - directory in the FOP distribution -

-

- 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 - endDocument() on the AreaTreeModel. This lets the Renderer know that the processing - is now finished. -

-

- 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. -

-
- Concatenating Documents -

- 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. -

-
-
- Modifying Documents -

- 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. -

-
-
- Advanced Use -

- 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 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()). -

-
-
- -
diff --git a/src/documentation/content/xdocs/1.0/accessibility.xml b/src/documentation/content/xdocs/1.0/accessibility.xml new file mode 100644 index 000000000..f3c66e06a --- /dev/null +++ b/src/documentation/content/xdocs/1.0/accessibility.xml @@ -0,0 +1,167 @@ + + + + + +
+ Accessibility +
+ +
+ Overview +

+ This page describes the + accessibility + features of Apache FOP. + Section 508 defines accessibility in the context + of electronic documents for the USA but other countries have similar requirements. +

+

+ Accessibility features are available only for the PDF output format and there are some + implementation limitations. Also, certain actions must be undertaken by the content creator + to ensure that FOP can create a truly accessible document. +

+
+
+ Enabling accessibility +

There are 3 ways to enable accessibility:

+
    +
  1. + Command line: The command line option -a turns on accessibility: + fop -a -fo mydocument.fo -pdf mydocument.pdf +
  2. +
  3. + Embedding: userAgent.setAccessibility(true); +
  4. +
  5. + Optional setting in fop.xconf file: +
    +          <fop version="1.0">
    +              <accessibility>true</accessibility>
    +              ...
    +          </fop>
    +          
    +
  6. +
+

+ When accessibility is enabled, additional information relating to the logical structure of + the document is added to the PDF. That information allows the PDF viewer (or a + text-to-speech application) to retrieve the natural reading order of the document. +

+ The processing of the logical structure is memory-hungry. You may need to adjust the + Java heap size in order to process larger files. +
+
+ Changes to your XSL-FO input files +

+ Apache FOP cannot automatically generate accessible PDFs. Some of the work can only be + performed by the content provider. Following are some changes that may be necessary to + your XSL-FO content in order to generate really accessible documents: +

+
    +
  • Table cells must have a table row as their parent.
  • +
  • + Images must have an alternate text: use the fox:alt-text extension attribute + (in the fox namespace) on + fo:external-graphic and fo:instream-foreign-object to specify a + short text describing the image. +
  • +
  • + Ensure that the order of fo:block-container elements in a page corresponds to + the reading order. +
  • +
  • + Specify the natural language of the document using the language and country properties + (or via the xml:lang shorthand property). +
  • +
+
+
+ Customized Tagging +

The PDF Reference defines a set of standard Structure Types to + tag content. For example, ‘P’ is used for identifying paragraphs, ‘H1’ to ‘H6’ for headers, + ‘L’ for lists, ‘Div’ for block-level groups of elements, etc. This standard set is aimed at + improving interoperability between applications producing or consuming PDF.

+

FOP provides a default mapping of Formatting Objects to elements from that standard set. + For example, fo:page-sequence is mapped to ‘Part’, fo:block is + mapped to ‘P’, fo:list-block to ‘L’, etc.

+

You may want to customize that mapping to improve the accuracy of the tagging or deal with + particular FO constructs. For example, you may want to make use of the ‘H1’ to ‘H6’ tags to + make the hierarchical structure of the document appear in the PDF. This is achieved by using + the role XSL-FO property:

+ ... +<fo:block role="H1" font-weight="bold">I. A Level 1 Heading</fo:block> +<fo:block>This is the first paragraph of the first section...</fo:block> +... +

If a non-standard structure type is specified, FOP will issue a warning and fall back to + the default tag associated to the Formatting Object.

+
+
+ Testing +

+ Accessible PDFs can be tested, for example, using Adobe Acrobat Professional. Its + Accessibility Check feature creates a report indicating any deficiencies with a PDF + document. Alternatively, you can just let a screen reader read the document aloud. +

+
+
+ Limitations +

+ Accessibility support in Apache FOP is relatively new, so there are certain + limitations. Please help us identify and close any gaps. +

+
    +
  • + The natural language can currently only be specified at the page-sequence level. The + document language is derived from the language of the first page-sequence. It is + currently not possible to override the language inside the content below the + page-sequence level. +
  • +
  • + It's currently not possible to specify the expanded form of an abbreviation or acronym. +
  • +
  • + SVG graphics (or images in general) are treated as a single figure. Text contained in + SVGs is not accessible. It's only possible to work with fox:alt-text. +
  • +
  • + The side regions (region-before, region-after etc.) are currently not specially + identified. Screen readers may read their content at page changes. +
  • +
+
+ + +
diff --git a/src/documentation/content/xdocs/0.94/anttask.xml b/src/documentation/content/xdocs/1.0/anttask.xml similarity index 83% rename from src/documentation/content/xdocs/0.94/anttask.xml rename to src/documentation/content/xdocs/1.0/anttask.xml index 44550c3d7..a543a5623 100644 --- a/src/documentation/content/xdocs/0.94/anttask.xml +++ b/src/documentation/content/xdocs/1.0/anttask.xml @@ -68,6 +68,16 @@ XSL-FO file to be rendered Yes, if no fileset nested element is used + + xmlfile + XML input file + Yes, if no fofile is specified + + + xsltfile + XSLT input file + Yes, if no fofile is specified + outfile Output filename @@ -148,6 +158,11 @@ (true) or not (false). Currently doesn't work in FOP Trunk!!! No, default is true + + throwexceptions + Controls whether or not an exception is thrown if an error occurs during rendering. + Default is true +

@@ -189,6 +204,31 @@ + + ]]> +

+ The following example transforms and converts a single XML and XSLT file to an AFP document: +

+ + + + ]]> +

+ This example transforms and converts all XML files within an entire directory to PostScript: +

+ + + + + + ]]> diff --git a/src/documentation/content/xdocs/0.94/compiling.xml b/src/documentation/content/xdocs/1.0/compiling.xml similarity index 97% rename from src/documentation/content/xdocs/0.94/compiling.xml rename to src/documentation/content/xdocs/1.0/compiling.xml index c6c17a3c0..98a6dfb6d 100644 --- a/src/documentation/content/xdocs/0.94/compiling.xml +++ b/src/documentation/content/xdocs/1.0/compiling.xml @@ -41,7 +41,7 @@
JDK

- Building FOP requires a minimum Java Development Kit (JDK/SDK) of 1.3 + Building FOP requires a minimum Java Development Kit (JDK/SDK) of 1.4 (A Java Runtime Environment is not sufficient).

@@ -59,14 +59,14 @@

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.3 or above, which normally + your local JDK root directory. This is true even if you use JDK 1.4 or above, which normally does not need this setting.

Apache Ant

- Apache Ant must be installed in order to + Apache Ant (Version 1.7 or later) 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.

diff --git a/src/documentation/content/xdocs/0.94/configuration.xml b/src/documentation/content/xdocs/1.0/configuration.xml similarity index 71% rename from src/documentation/content/xdocs/0.94/configuration.xml rename to src/documentation/content/xdocs/1.0/configuration.xml index 656c3b706..eaa788990 100644 --- a/src/documentation/content/xdocs/0.94/configuration.xml +++ b/src/documentation/content/xdocs/1.0/configuration.xml @@ -151,6 +151,18 @@ default-page-settings element to specify the two values.
+ + + + + + @@ -206,6 +218,42 @@ ]]> +
+ Image Loading Customization +

+ Apache FOP uses the image loading framework from + Apache XML Graphics Commons to load + images using various plug-ins. Every image loader plug-in has a hard-coded usage penalty + that influences which solution is chosen if there are multiple possibilities to load an image. + Sometimes, though, these penalties need to be tweaked and this can be done in the FOP + configuration. An example: +

+ + [..] + + + + + ]]> +

+ The first penalty element increases the penalty for the raw CCITT loader. This practically + forces the decoding of CCITT compressed TIFF images except if there are no TIFF codecs + available. +

+

+ The second penalty element sets an "infinite" penalty for the TIFF loader using the internal + TIFF codec. This practically disables that plug-in as it will never be chosen as a possible + solution. +

+

+ Negative penalties are possible to promote a plug-in but a negative penalty sum will be + treated as zero penalty in most cases. For more details on the image loading framework, + please consult the documentation there. +

+
Renderer configuration

@@ -277,7 +325,44 @@ C:\FOP\Color\EuropeISOCoatedFOGRA27.icc ]]> +

+ Some people don't have high requirements on color fidelity but instead want the smallest + PDF file sizes possible. In this case it's possible to disable the default sRGB color space + which XSL-FO requires. This will cause RGB colors to be generated as device-specific RGB. + Please note that this option is unavailable (and will cause an error) if you enable + PDF/A or PDF/X functionality or if you specify an output profile. This setting will make the + PDF about 4KB smaller. To disable the sRGB color space add the following setting: +

+ + true + + ]]> + +

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.

+ + + testuserpass + testownerpass + + + + + ]]> +
Special Settings for the PostScript Renderer @@ -331,19 +416,42 @@ to "bitmap" which causes all text to be rendered as bitmaps.

- -
- Apache FOP Font Config -

- Apache FOP has special Font configuration considerations, which are explained - in detail on the Fonts page. -

+
+ Special Settings for the AFP Renderer +

+

+

+ Additionally, there are certain settings that control how the renderer handles various elements. +

+ + + 240 + + + resources.afp +]]> +

+ The default value for the images "mode" setting is "b+w" (black and white). When the images "mode" setting is "b+w" a "bits-per-pixel" setting can be provided to aid the grayscale conversion process. With this setting all images referenced in your source document are converted to an IOCA FS45 grayscale bitmap image form. + When the setting is "color" all images are converted to an IOCA FS45 color bitmap image form. When "native" setting is "true", all images encountered (TIFF, GIF, JPEG and Encapsulated Postscript etc.) will be embedded directly in the datastream in their native form using a MO:DCA Object Container. +

+

+ The default value for the "renderer-resolution" is 240 dpi. +

+ +

+ By default if there is no configuration definition for "resource-group-file", external resources will be placed in a file called resources.afp. +

+
-
- When it does not work +
+ When it does not work -

FOP searches the configuration file for the information it +

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 @@ -351,14 +459,14 @@ 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:

+

Check the following possibilities:

-
    -
  • The format of the configuration file has changed +
      +
    • The format of the configuration file has changed considerably between FOP 0.20.5 and FOP 1.0 and its beta versions. Did you convert your file to the new format?
    • -
    • The FOP distribution contains a schema for configuration +
    • The FOP distribution contains a schema for configuration files, at src/foschema/fop-configuration.xsd. Did you validate your configuration file against it? Add the following schema location to the schema element: @@ -373,13 +481,13 @@ 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.
    • -
    • Run FOP in debug mode (command line option +
    • Run FOP in debug mode (command line option -d). This makes FOP report which configuration information it finds. Check if FOP finds what you expect.
    • -
    +
-
+
diff --git a/src/documentation/content/xdocs/0.94/embedding.xml b/src/documentation/content/xdocs/1.0/embedding.xml similarity index 87% rename from src/documentation/content/xdocs/0.94/embedding.xml rename to src/documentation/content/xdocs/1.0/embedding.xml index 3e3c964f8..3289e68c7 100644 --- a/src/documentation/content/xdocs/0.94/embedding.xml +++ b/src/documentation/content/xdocs/1.0/embedding.xml @@ -29,7 +29,7 @@
Overview

- Review Running FOP for important information that applies + Review Running FOP for important information that applies to embedded applications as well as command-line use, such as options and performance.

@@ -54,7 +54,7 @@

Basic Usage Pattern

- Apache FOP relies heavily on JAXP. It uses SAX events exclusively to receive the XSL-FO + 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...

@@ -82,14 +82,14 @@ try { // Step 4: Setup JAXP using identity transformer TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(); // identity transformer - - // Step 5: Setup input and output for XSLT transformation + + // Step 5: Setup input and output for XSLT transformation // Setup input stream Source src = new StreamSource(new File("C:/Temp/myfile.fo")); // Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); - + // Step 6: Start XSLT transformation and FOP processing transformer.transform(src, res); @@ -102,13 +102,13 @@ try {

  • - Step 1: You create a new FopFactory instance. The FopFactory instance holds + Step 1: You create a new FopFactory instance. The FopFactory instance holds references to configuration information and cached data. It's important to reuse this instance if you plan to render multiple documents during a JVM's lifetime.
  • Step 2: You set up an OutputStream that the generated document - will be written to. It's a good idea to buffer the OutputStream as demonstrated + will be written to. It's a good idea to buffer the OutputStream as demonstrated to improve performance.
  • @@ -119,26 +119,26 @@ try { OutputStream you've setup up in step 2.
  • - Step 4 We recommend that you use JAXP Transformers even - if you don't do XSLT transformations to generate the XSL-FO file. This way - you can always use the same basic pattern. The example here sets up an - "identity transformer" which just passes the input (Source) unchanged to the - output (Result). You don't have to work with a SAXParser if you don't do any + Step 4 We recommend that you use JAXP Transformers even + if you don't do XSLT transformations to generate the XSL-FO file. This way + you can always use the same basic pattern. The example here sets up an + "identity transformer" which just passes the input (Source) unchanged to the + output (Result). You don't have to work with a SAXParser if you don't do any XSLT transformations.
  • - Step 5: Here you set up the input and output for the XSLT - transformation. The Source object is set up to load the "myfile.fo" file. - The Result is set up so the output of the XSLT transformation is sent to FOP. - The FO file is sent to FOP in the form of SAX events which is the most efficient - way. Please always avoid saving intermediate results to a file or a memory buffer + Step 5: Here you set up the input and output for the XSLT + transformation. The Source object is set up to load the "myfile.fo" file. + The Result is set up so the output of the XSLT transformation is sent to FOP. + The FO file is sent to FOP in the form of SAX events which is the most efficient + way. Please always avoid saving intermediate results to a file or a memory buffer because that affects performance negatively.
  • - Step 6: Finally, we start the XSLT transformation by starting - the JAXP Transformer. As soon as the JAXP Transformer starts to send its output - to FOP, FOP itself starts its processing in the background. When the - transform() method returns FOP will also have finished converting + Step 6: Finally, we start the XSLT transformation by starting + the JAXP Transformer. As soon as the JAXP Transformer starts to send its output + to FOP, FOP itself starts its processing in the background. When the + transform() method returns FOP will also have finished converting the FO file to a PDF file and you can close the OutputStream. It's a good idea to enclose the whole conversion in a try..finally statement. If @@ -148,16 +148,16 @@ try {

- If you're not totally familiar with JAXP Transformers, please have a look at the + 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 + 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 + 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"). @@ -166,40 +166,50 @@ try { Logging

Logging is now a little different than it was in FOP 0.20.5. We've switched from - Avalon Logging to Jakarta Commons Logging. + 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" + 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.

- - We know this may be an issue in multi-threaded server environments if you'd like to - know what's going on in every single FOP processing run. We're planning to add an - additional feedback facility to FOP which can be used to obtain all sorts of specific - feedback (validation messages, layout problems etc.). "Static logging" is mainly - interesting for a developer working on FOP and for advanced users who are debugging - FOP. We don't consider the logging output to be useful to normal FOP users. Please - have some patience until we can add this feature or jump in and help us build it. We've - set up a Wiki page - which documents what we're going to build. -

- By default, Jakarta Commons Logging uses + 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 + documentation for Jakarta Commons Logging on how to configure alternative backends.

+

+ As a result of the above we differentiate between two kinds of "logging": +

+ +

+ The use of "feedback" instead of "logging" is intentional. Most people were using + log output as a means to get feedback from events within FOP. Therefore, FOP now + includes an event package which can be used to receive feedback from + the layout engine and other components within FOP per rendering run. + This feedback is not just some + text but event objects with parameters so these events can be interpreted by code. + Of course, there is a facility to turn these events into normal human-readable + messages. For details, please read on on the Events page. + This leaves normal logging to be mostly a thing used by the FOP developers + although anyone can surely activate certain logging categories but the feedback + from the loggers won't be separated by processing runs. If this is required, + the Events subsystem is the right approach. +

- +
Processing XSL-FO

- Once the Fop instance is set up, call getDefaultHandler() to obtain a SAX - DefaultHandler instance to which you can send the SAX events making up the XSL-FO + Once the Fop instance is set up, call 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 @@ -210,15 +220,15 @@ try {

Processing XSL-FO generated from XML+XSLT

- 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 + 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:

@@ -227,14 +237,14 @@ try {
Input Sources

- The input XSL-FO document is always received by FOP as a SAX stream (see the + 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. + 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. + to set up the right Source instance as input for the JAXP transformation. A few examples:

    @@ -263,8 +273,8 @@ try {

    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 + set variables in the stylesheet. Interface documentation and some cookbook + solutions to these situations are provided in Xalan Basic Usage Patterns.

@@ -278,7 +288,7 @@ try { Customizing the FopFactory

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 + 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.

@@ -289,34 +299,34 @@ try {

The font base URL to use when resolving relative URLs for fonts. Example:

- fopFactory.setFontBaseURL("file:///C:/Temp/fonts"); + fopFactory.getFontManager().setFontBaseURL("file:///C:/Temp/fonts");
  • - The hyphenation base URL to use when resolving relative URLs for + The hyphenation base URL to use when resolving relative URLs for hyphenation patterns. Example:

    fopFactory.setHyphenBaseURL("file:///C:/Temp/hyph");
  • - Disable strict validation. When disabled FOP is less strict about the rules + Disable strict validation. When disabled FOP is less strict about the rules established by the XSL-FO specification. Example:

    fopFactory.setStrictValidation(false);
  • - 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 + 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:

    fopFactory.setBreakIndentInheritanceOnReferenceAreaBoundary(true);
  • - Set the source resolution for the document. This is used internally to determine the pixel + 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:

    fopFactory.setSourceResolution(96); // =96dpi (dots/pixels per Inch) @@ -324,7 +334,7 @@ try {
  • 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 + 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:

    fopFactory.addElementMapping(myElementMapping); // myElementMapping is a org.apache.fop.fo.ElementMapping @@ -332,13 +342,13 @@ try {
  • 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 + custom URI resolution functionality to FOP. For example, you can use Apache XML Commons Resolver to make use of XCatalogs. Example:

    fopFactory.setURIResolver(myResolver); // myResolver is a javax.xml.transform.URIResolver Both the FopFactory and the FOUserAgent have a method to set a URIResolver. The URIResolver on the FopFactory - is primarily used to resolve URIs on factory-level (hyphenation patterns, for example) and it is always used + is primarily used to resolve URIs on factory-level (hyphenation patterns, for example) and it is always used if no other URIResolver (for example on the FOUserAgent) resolved the URI first.
  • @@ -347,9 +357,9 @@ try {
    Customizing the User Agent

    - The user agent is the entity that allows you to interact with a single rendering run, i.e. the processing of a single + 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 + of FOUserAgent using the appropriate factory method on FopFactory and pass that to the factory method that will create a new Fop instance:

  • - 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 + 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:

    userAgent.setTargetResolution(300); // =300dpi (dots/pixels per Inch)
  • - Set your own Renderer instance. If you want to supply your own renderer or + 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:

    @@ -423,8 +433,8 @@ try {
  • - 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, + 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:

    userAgent.setFOEventHandlerOverride(myFOEventHandler); // myFOEventHandler is an org.apache.fop.fo.FOEventHandler @@ -432,7 +442,7 @@ try {
  • 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 + custom URI resolution functionality to FOP. For example, you can use Apache XML Commons Resolver to make use of XCatalogs. Example:

    userAgent.setURIResolver(myResolver); // myResolver is a javax.xml.transform.URIResolver @@ -452,7 +462,7 @@ try {
    Using a Configuration File

    - Instead of setting the parameters manually in code as shown above you can also set + Instead of setting the parameters manually in code as shown above you can also set many values from an XML configuration file:

    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 + 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.

    @@ -505,12 +515,12 @@ fopFactory.setUserConfig(new File("C:/Temp/mycfg.xml"));]]>
    Getting information on the rendering process

    - To get the number of pages that were rendered by FOP you can call - 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 + To get the number of pages that were rendered by FOP you can call + 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.

    @@ -522,19 +532,19 @@ fopFactory.setUserConfig(new File("C:/Temp/mycfg.xml"));]]>

    • - Whenever possible, try to use SAX to couple the individual components involved + Whenever possible, try to use SAX to couple the individual components involved (parser, XSL transformer, SQL datasource etc.).
    • - Depending on the target OutputStream (in case of a FileOutputStream, but not - for a ByteArrayOutputStream, for example) it may improve performance considerably - if you buffer the OutputStream using a BufferedOutputStream: + Depending on the target OutputStream (in case of a FileOutputStream, but not + for a ByteArrayOutputStream, for example) it may improve performance considerably + if you buffer the OutputStream using a BufferedOutputStream: out = new java.io.BufferedOutputStream(out);
      Make sure you properly close the OutputStream when FOP is finished.
    • - Cache the stylesheet. If you use the same stylesheet multiple times + Cache the stylesheet. If you use the same stylesheet multiple times you can set up a JAXP Templates object and reuse it each time you do the XSL transformation. (More information can be found here.) @@ -547,6 +557,9 @@ fopFactory.setUserConfig(new File("C:/Temp/mycfg.xml"));]]> Fine-tune your stylesheet to make the XSLT process more efficient and to create XSL-FO that can be processed by FOP more efficiently. Less is more: Try to make use of property inheritance where possible.
    • +
    • + You may also wish to consider trying to reduce memory usage. +
  • @@ -557,7 +570,7 @@ fopFactory.setUserConfig(new File("C:/Temp/mycfg.xml"));]]> If you encounter any suspicious behaviour, please notify us.

    - There is also a known issue with fonts being jumbled between threads when using + 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.

    @@ -565,7 +578,7 @@ fopFactory.setUserConfig(new File("C:/Temp/mycfg.xml"));]]>
    Examples

    - The directory "{fop-dir}/examples/embedding" contains several working examples. + The directory "{fop-dir}/examples/embedding" contains several working examples.

    ExampleFO2PDF.java @@ -579,104 +592,104 @@ file to PDF using FOP.
    ExampleXML2FO.java -

    This +

    This example -has nothing to do with FOP. It is there to show you how an XML +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 +transformation. Make sure you've got a JAXP-compliant XSLT processor in your classpath (ex. Xalan).

    ExampleXML2PDF.java -

    This +

    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 +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 +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.

    ExampleObj2XML.java -

    This +

    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 +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 +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 +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 +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. +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).

    ExampleObj2PDF.java -

    This +

    This example -combines the previous and the third to demonstrate +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 +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.

    ExampleDOM2PDF.java -

    This +

    This example -has FOP use a DOMSource instead of a StreamSource in order to +has FOP use a DOMSource instead of a StreamSource in order to use a DOM tree as input for an XSL transformation.

    ExampleSVG2PDF.java (PDF Transcoder example) -

    This +

    This example -shows the usage of the PDF Transcoder, a sub-application within FOP. +shows the usage of the PDF Transcoder, a sub-application within FOP. It is used to generate a PDF document from an SVG file.

    Final notes

    -These examples should give you an idea of what's possible. It should be easy +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 diff --git a/src/documentation/content/xdocs/1.0/events.xml b/src/documentation/content/xdocs/1.0/events.xml new file mode 100644 index 000000000..017775f03 --- /dev/null +++ b/src/documentation/content/xdocs/1.0/events.xml @@ -0,0 +1,449 @@ + + + + + +

    + Events/Processing Feedback + $Revision$ +
    + +
    + Introduction +

    + In versions until 0.20.5, FOP used + Avalon-style Logging where + it was possible to supply a logger per processing run. During the redesign + the logging infrastructure was switched over to + Commons Logging which is (like Log4J or + java.util.logging) a "static" logging framework (the logger is accessed through static + variables). This made it very difficult in a multi-threaded system to retrieve information + for a single processing run. +

    +

    + With FOP's event subsystem, we'd like to close this gap again and even go further. The + first point is to realize that we have two kinds of "logging". Firstly, we have the logging + infrastructure for the (FOP) developer who needs to be able to enable finer log messages + for certain parts of FOP to track down a certain problem. Secondly, we have the user who + would like to be informed about missing images, overflowing lines or substituted fonts. + These messages (or events) are targeted at less technical people and may ideally be + localized (translated). Furthermore, tool and solution builders would like to integrate + FOP into their own solutions. For example, an FO editor should be able to point the user + to the right place where a particular problem occurred while developing a document template. + Finally, some integrators would like to abort processing if a resource (an image or a font) + has not been found, while others would simply continue. The event system allows to + react on these events. +

    +

    + On this page, we won't discuss logging as such. We will show how the event subsystem can + be used for various tasks. We'll first look at the event subsystem from the consumer side. + Finally, the production of events inside FOP will be discussed (this is mostly interesting + for FOP developers only). +

    +
    +
    + The consumer side +

    + The event subsystem is located in the org.apache.fop.events package and its + base is the Event class. An instance is created for each event and is sent + to a set of EventListener instances by the EventBroadcaster. + An Event contains: +

    +
      +
    • an event ID,
    • +
    • a source object (which generated the event),
    • +
    • a severity level (Info, Warning, Error and Fatal Error) and
    • +
    • a map of named parameters.
    • +
    +

    + The EventFormatter class can be used to translate the events into + human-readable, localized messages. +

    +

    + A full example of what is shown here can be found in the + examples/embedding/java/embedding/events directory in the FOP distribution. + The example can also be accessed + via the web. +

    +
    + Writing an EventListener +

    + The following code sample shows a very simple EventListener. It basically just sends + all events to System.out (stdout) or System.err (stderr) depending on the event severity. +

    + +

    + You can see that for every event the method processEvent of the + EventListener will be called. Inside this method you can do whatever + processing you would like including throwing a RuntimeException, if you want + to abort the current processing run. +

    +

    + The code above also shows how you can turn an event into a human-readable, localized + message that can be presented to a user. The EventFormatter class does + this for you. It provides additional methods if you'd like to explicitly specify + the locale. +

    +

    + It is possible to gather all events for a whole processing run so they can be + evaluated afterwards. However, care should be taken about memory consumption since + the events provide references to objects inside FOP which may themselves have + references to other objects. So holding on to these objects may mean that whole + object trees cannot be released! +

    +
    +
    + Adding an EventListener +

    + To register the event listener with FOP, get the EventBroadcaster which + is associated with the user agent (FOUserAgent) and add it there: +

    + +

    + Please note that this is done separately for each processing run, i.e. for each + new user agent. +

    +
    +
    + An additional listener example +

    + Here's an additional example of an event listener: +

    +

    + By default, FOP continues processing even if an image wasn't found. If you have + more strict requirements and want FOP to stop if an image is not available, you can + do something like the following in the simplest case: +

    + +

    + Increasing the event severity to FATAL will signal the event broadcaster to throw + an exception and stop further processing. In the above case, all resource-related + events will cause FOP to stop processing. +

    +

    + You can also customize the exception to throw (you can may throw a RuntimeException + or subclass yourself) and/or which event to respond to: +

    + +

    + This throws a RuntimeException with the FileNotFoundException + as the cause. Further processing effectively stops in FOP. You can catch the exception + in your code and react as you see necessary. +

    +
    +
    +
    + The producer side (for FOP developers) +

    + This section is primarily for FOP and FOP plug-in developers. It describes how to use + the event subsystem for producing events. +

    + + The event package has been designed in order to be theoretically useful for use cases + outside FOP. If you think this is interesting independently from FOP, please talk to + us. + +
    + Producing and sending an event +

    + The basics are very simple. Just instantiate an Event object and fill + it with the necessary parameters. Then pass it to the EventBroadcaster + which distributes the events to the interested listeneners. Here's a code example: +

    + +

    + The Event.paramsBuilder() is a + fluent interface + to help with the build-up of the parameters. You could just as well instantiate a + Map (Map<String, Object>) and fill it with values. +

    +
    +
    + The EventProducer interface +

    + To simplify event production, the event subsystem provides the EventProducer + interface. You can create interfaces which extend EventProducer. These + interfaces will contain one method per event to be generated. By contract, each event + method must have as its first parameter a parameter named "source" (Type Object) which + indicates the object that generated the event. After that come an arbitrary number of + parameters of any type as needed by the event. +

    +

    + The event producer interface does not need to have any implementation. The implementation + is produced at runtime by a dynamic proxy created by DefaultEventBroadcaster. + The dynamic proxy creates Event instances for each method call against + the event producer interface. Each parameter (except "source") is added to the event's + parameter map. +

    +

    + To simplify the code needed to get an instance of the event producer interface it is + suggested to create a public inner provider class inside the interface. +

    +

    + Here's an example of such an event producer interface: +

    + +

    + To produce the same event as in the first example above, you'd use the following code: +

    + +
    +
    + The event model +

    + Inside an invocation handler for a dynamic proxy, there's no information about + the names of each parameter. The JVM doesn't provide it. The only thing you know is + the interface and method name. In order to properly fill the Event's + parameter map we need to know the parameter names. These are retrieved from an + event object model. This is found in the org.apache.fop.events.model + package. The data for the object model is retrieved from an XML representation of the + event model that is loaded as a resource. The XML representation is generated using an + Ant task at build time (ant resourcegen). The Ant task (found in + src/codegen/java/org/apache/fop/tools/EventProducerCollectorTask.java) + scans FOP's sources for descendants of the EventProducer interface and + uses QDox to parse these interfaces. +

    +

    + The event model XML files are generated during build by the Ant task mentioned above when + running the "resourcegen" task. So just run "ant resourcegen" if you receive + a MissingResourceException at runtime indicating that + "event-model.xml" is missing. +

    +

    + Primarily, the QDox-based collector task records the parameters' names and types. + Furthermore, it extracts additional attributes embedded as Javadoc comments from + the methods. At the moment, the only such attribute is "@event.severity" which indicates + the default event severity (which can be changed by event listeners). The example event + producer above shows the Javadocs for an event method. +

    +

    + There's one more information that is extracted from the event producer information for + the event model: an optional primary exception. The first exception in the "throws" + declaration of an event method is noted. It is used to throw an exception from + the invocation handler if the event has an event severity of "FATAL" when all + listeners have been called (listeners can update the event severity). Please note + that an implementation of + org.apache.fop.events.EventExceptionManager$ExceptionFactory has to be + registered for the EventExceptionManager to be able to construct the + exception from an event. +

    +

    + For a given application, there can be multiple event models active at the same time. + In FOP, each renderer is considered to be a plug-in and provides its own specific + event model. The individual event models are provided through an + EventModelFactory. This interface is implemented for each event model + and registered through the service provider mechanism + (see the plug-ins section for details). +

    +
    +
    + Event severity +

    + Four different levels of severity for events has been defined: +

    +
      +
    1. INFO: informational only
    2. +
    3. WARN: a Warning
    4. +
    5. ERROR: an error condition from which FOP can recover. FOP will continue processing.
    6. +
    7. FATAL: a fatal error which causes an exception in the end and FOP will stop processing.
    8. +
    +

    + Event listeners can choose to ignore certain events based on their event severity. + Please note that you may recieve an event "twice" in a specific case: if there is + a fatal error an event is generated and sent to the listeners. After that an exception + is thrown with the same information and processing stops. If the fatal event is + shown to the user and the following exception is equally presented to the user it + may appear that the event is duplicated. Of course, the same information is just + published through two different channels. +

    +
    +
    + Plug-ins to the event subsystem +

    + The event subsystem is extensible. There are a number of extension points: +

    +
      +
    • + org.apache.fop.events.model.EventModelFactory: Provides + an event model to the event subsystem. +
    • +
    • + org.apache.fop.events.EventExceptionManager$ExceptionFactory: + Creates exceptions for events, i.e. turns an event into a specific exception. +
    • +
    +

    + The names in bold above are used as filenames for the service provider files that + are placed in the META-INF/services directory. That way, they are + automatically detected. This is a mechanism defined by the + JAR file specification. +

    +
    +
    + Localization (L10n) +

    + One goal of the event subsystem was to have localized (translated) event messages. + The EventFormatter class can be used to convert an event to a + human-readable message. Each EventProducer can provide its own XML-based + translation file. If there is none, a central translation file is used, called + "EventFormatter.xml" (found in the same directory as the EventFormatter + class). +

    +

    + The XML format used by the EventFormatter is the same as + Apache Cocoon's catalog format. Here's an example: +

    + + + + [ (See position {loc})| (See {#gatherContextInfo})| (No context info available)] + + + RTF output requires that all table-columns for a table are defined. Output will be incorrect.{{locator}} + + + Ignored deferred event for {node} ({start,if,start,end}).{{locator}} + + +]]> +

    + The example (extracted from the RTF handler's event producer) has message templates for + two event methods. The class used to do variable replacement in the templates is + org.apache.fop.util.text.AdvancedMessageFormat which is more powerful + than the MessageFormat classes provided by the Java class library + (java.util.text package). +

    +

    + "locator" is a template that is reused by the other message templates + by referencing it through "{{locator}}". This is some kind of include command. +

    +

    + Normal event parameters are accessed by name inside single curly braces, for example: + "{node}". For objects, this format just uses the toString() method to turn + the object into a string, unless there is an ObjectFormatter registered + for that type (there's an example for org.xml.sax.Locator). +

    +

    + The single curly braces pattern supports additional features. For example, it is possible + to do this: "{start,if,start,end}". "if" here is a special field modifier that evaluates + "start" as a boolean and if that is true returns the text right after the second comma + ("start"). Otherwise it returns the text after the third comma ("end"). The "equals" + modifier is similar to "if" but it takes as an additional (comma-separated) parameter + right after the "equals" modifier, a string that is compared to the value of the variable. + An example: {severity,equals,EventSeverity:FATAL,,some text} (this adds "some text" if + the severity is not FATAL). +

    +

    + Additional such modifiers can be added by implementing the + AdvancedMessageFormat$Part and AdvancedMessageFormat$PartFactory + interfaces. +

    +

    + Square braces can be used to specify optional template sections. The whole section will + be omitted if any of the variables used within are unavailable. Pipe (|) characters can + be used to specify alternative sub-templates (see "locator" above for an example). +

    +

    + Developers can also register a function (in the above example: + {#gatherContextInfo}) + to do more complex information rendering. These functions are implementations of the + AdvancedMessageFormat$Function interface. Please take care that this is + done in a locale-independent way as there is no locale information available, yet. +

    +
    +
    + + diff --git a/src/documentation/content/xdocs/1.0/extensions.xml b/src/documentation/content/xdocs/1.0/extensions.xml new file mode 100644 index 000000000..107f6c5b3 --- /dev/null +++ b/src/documentation/content/xdocs/1.0/extensions.xml @@ -0,0 +1,340 @@ + + + + + +
    + Standard FOP Extensions + $Revision$ +
    + +

    + 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. +

    + All extensions require the correct use of an appropriate namespace in your input document. +
    + SVG +

    + Please see the SVG documentation for more details. +

    +
    +
    + FO Extensions +
    + Namespace +

    + By convention, FO extensions in FOP use the "fox" namespace prefix. + To use any of the FO extensions, add a namespace entry for + http://xmlgraphics.apache.org/fop/extensions to the root element: +

    + ]]> +
    +
    + PDF Bookmarks +

    + In previous versions of Apache FOP there was a 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. +

    +
    +
    + Anchors or Named Destinations +

    Use the fox:destination element to define "named destinations" inside a PDF document. +These are useful as fragment identifiers, e.g. "http://server/document.pdf#anchor-name". +fox:destination elements can be placed almost anywhere in the fo document, including a child of +root, a block-level element, or an inline-level element. +For the destination to actually work, it must correspond to an "id" attribute on some fo element +within the document. In other words, the "id" attribute actually creates the "view" within the +PDF document. The fox:destination simply gives that view an independent name. +

    + +... +Table of Contents]]> + It is possible that in some future release of FOP, all elements with +"id" attributes will generate named-destinations, which will eliminate the need for +fox:destination. +
    +
    + Table Continuation Label +

    This extension element hasn't been reimplemented for the redesigned code, yet.

    + +
    +
    + fox:orphan-content-limit and fox:widow-content-limit +

    + 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. +

    +
    +
    + fox:external-document + + This feature is incomplete. Support for multi-page documents will be added shortly. + At the moment, only single-page images will work. And this will not work with RTF output. + +

    + This is a proprietary extension element which allows to add whole images as pages to + an FO document. For example, if you have a scanned document or a fax as multi-page TIFF + file, you can append or insert this document using the fox:external-document + element. Each page of the external document will create one full page in the target + format. +

    +

    + The fox:external-document element is structurally a peer to + fo:page-sequence, so wherever you can put an fo:page-sequence + you could also place a fox:external-document. + Therefore, the specified contents for fo:root change to: +

    +

    + + (layout-master-set, declarations?, bookmark-tree?, (page-sequence|page-sequence-wrapper|fox:external-document|fox:destination)+) + +

    +
    + Specification +

    + The fox:external-document extension formatting object is used to specify + how to create a (sub-)sequence of pages within a document. The content of these pages + comes from the individual subimages/pages of an image or paged document (for example: + multi-page TIFF in the form of faxes or scanned documents, or PDF files). The + formatting object creates the necessary areas to display one image per page. +

    +

    + In terms of page numbers, the behaviour is the same as for + fo:page-sequence. The placement of the image inside the page is similar + to that of fo:external-graphic or fo:instream-foreign-object, + i.e. the viewport (and therefore the page size) is defined by either the intrinsic + size of the image or by the size properties that apply to this formatting object. +

    +

    Content: EMPTY

    +

    The following properties apply to this formatting object:

    +
      +
    • (Common Accessibility Properties) (not implemented, yet)
    • +
    • (Common Aural Properties) (not implemented, yet)
    • +
    • block-progression-dimension
    • +
    • content-height
    • +
    • content-type
    • +
    • content-width
    • +
    • display-align
    • +
    • height
    • +
    • id
    • +
    • inline-progression-dimension
    • +
    • overflow
    • +
    • pages: <page-set> (see below) (not implemented, yet)
    • +
    • reference-orientation
    • +
    • scaling
    • +
    • scaling-method
    • +
    • src
    • +
    • text-align
    • +
    • width
    • +
    +

    + Datatype "page-set": Value: auto | <integer-range>, + Default: "auto" which means all pages/subimages of the document. + <integer-range> allows values such as "7" or "1-3" +

    + + fox:external-document is not suitable for concatenating FO documents. + For this, XInclude is recommended. + +
    +
    +
    + Free-form Transformation for fo:block-container +

    + For fo:block-container elements whose absolute-position set to + "absolute" or "fixed" you can use the extension attribute fox:transform + to apply a free-form transformation to the whole block-container. The content of the + fox:transform attribute is the same as for + SVG's transform attribute. + The transformation specified here is performed in addition to other implicit + transformations of the block-container (resulting from top, left and other properties) + and after them. +

    +

    + Examples: fox:transform="rotate(45)" would rotate the block-container + by 45 degrees clock-wise around its upper-left corner. + fox:transform="translate(10000,0)" would move the block-container to the + right by 10 points (=10000 millipoints, FOP uses millipoints internally!). +

    + + This extension attribute doesn't work for all output formats! It's currently only + supported for PDF, PS and Java2D-based renderers. + +
    +
    + Color functions +

    + XSL-FO supports specifying color using the rgb(), rgb-icc() and system-color() functions. + Apache FOP provides additional color functions for special use cases. Please note that + using these functions compromises the interoperability of an FO document. +

    +
    + cmyk() +

    color cmyk(numeric, numeric, numeric, numeric)

    +

    + This function will construct a color in device-specific CMYK color space. The numbers + must be between 0.0 and 1.0. For output formats that don't support device-specific + color space the CMYK value is converted to an sRGB value. +

    +
    +
    + #CMYK pseudo-profile +

    color rgb-icc(numeric, numeric, numeric, #CMYK, numeric, numeric, numeric, numeric)

    +

    + The rgb-icc function will respond to a pseudo-profile called "#CMYK" + which indicates a device-specific CMYK color space. The "#CMYK" profile is implicitely + available and doesn't have to be (and cannot be) defined through an + fo:color-profile element. It is provided for compatibility with certain + commercial XSL-FO implementations. Please note that this is not part of the official + specification but rather a convention. The following two color specifications are + equivalent: +

    +
      +
    • cmyk(0%,0%,20%,40%)
    • +
    • rgb-icc(153, 153, 102, #CMYK, 0, 0, 0.2, 0.4)
    • +
    +
    +
    +
    + Prepress Support + +

    + This section defines a number of extensions related to + prepress support. + fox:scale defines a general scale factor for the generated pages. + fox:bleed defines the + bleed area for a page. + fox:crop-offset defines the outer edges of the area in which crop marks, + registration marks, color bars and page information are placed. + For details, please read on below. +

    + + Those extensions have been implemented in the PDF and Java2D renderers only. + + +
    + fox:scale +

    Value: <number>{1,2}

    +

    Initial: 1

    +

    Applies to: fo:simple-page-master

    +

    + This property specifies a scale factor along resp. the x and y axes. If only one number + is provided it is used for both the x and y scales. A scale factor smaller than 1 + shrinks the page. A scale factor greater than 1 enlarges the page. +

    +
    +
    + fox:bleed +

    + Value: <length>{1,4} +

    +

    + Initial: 0pt +

    +

    Applies to: fo:simple-page-master

    +

    + If there is only one value, it applies to all sides. If there are two values, the top and bottom + bleed widths are set to the first value and the right and left bleed widths are set to the second. + If there are three values, the top is set to the first value, the left and right are set to the second, + and the bottom is set to the third. If there are four values, they apply to the top, right, bottom, and + left, respectively. + (Corresponds to the definition of + padding). +

    +

    + This extension indirectly defines the BleedBox and is calculated by expanding the TrimBox by + the bleed widths. The lengths must be non-negative. +

    +
    +
    + fox:crop-offset +

    + Value: <length>{1,4} +

    +

    + Initial: bleed (see below) +

    +

    Applies to: fo:simple-page-master

    +

    + Same behaviour as with fox:bleed. The initial value is set to the same values as the + fox:bleed property. +

    +

    + This extension indirectly defines the MediaBox and is calculated by expanding + the TrimBox by the crop offsets. The lengths must be non-negative. +

    +
    +
    + fox:crop-box +

    + Value: [trim-box | bleed-box | media-box] +

    +

    + Initial: media-box +

    +

    Applies to: fo:simple-page-master

    +

    + The crop box controls how Acrobat displays the page (CropBox in PDF) or how the Java2DRenderer sizes + the output media. The PDF specification defines that the CropBox defaults to the MediaBox. This extension + follows that definition. To simplify usage and cover most use cases, the three supported enumeration + values "trim-box", "bleed-box" and "media-box" set the CropBox to one of those three other boxes. +

    +

    + If requested in the future, we could offer to specify the CropBox in absolute coordinates rather + than just by referencing another box. +

    +
    +
    +
    + +
    + diff --git a/src/documentation/content/xdocs/1.0/fonts.xml b/src/documentation/content/xdocs/1.0/fonts.xml new file mode 100644 index 000000000..dcd03e548 --- /dev/null +++ b/src/documentation/content/xdocs/1.0/fonts.xml @@ -0,0 +1,564 @@ + + + + + +
    + Apache FOP: Fonts + $Revision$ + + + + + + +
    + +
    + Summary +

    The following table summarizes the font capabilities of the various FOP renderers:

    +
    Parameters specified as nested elements
    "height" 11 inches, "width" 8.26 inches
    prefer-rendererboolean (true, false) + By default, FOP prefers the newer output implementations based on the + IFDocumentHandler interface. If no such implementation can be found for + a given MIME type, it looks for an implementation of the Renderer interface. + If necessary, you can invert the lookup order to prefer the Renderer variant over the + IFDocumentHandler variant by setting this value to true. + false
    use-cache boolean (true, false)
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RendererBase-14AWT/OSCustomCustom Embedding
    PDFyesnoyesyes
    PostScriptyesnoyesyes
    PCLyes (modified)yes (painted as bitmaps)yes (painted as bitmaps)no
    AFPnonoyesyes
    Java2D/AWT/Bitmapif available from OSyesyesn/a (display only)
    Printif available from OSyesyescontrolled by OS printer driver
    RTFn/a (font metrics not needed)n/an/an/a
    TXTyes (used for layout but not for output)noyes (used for layout but not for output)no
    XMLyesnoyesn/a
    + +

    + Base-14 Fonts +

    + The Adobe PostScript and PDF Specification specify a set of 14 fonts that must be + available to every PostScript interpreter and PDF reader: + Helvetica (normal, bold, italic, bold italic), + Times (normal, bold, italic, bold italic), + Courier (normal, bold, italic, bold italic), + Symbol and ZapfDingbats. +

    +

    + The following font family names are hard-coded into FOP for the Base-14 font set: +

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Base-14 fontfont families
    HelveticaHelvetica, sans-serif, SansSerif
    TimesTimes, Times Roman, Times-Roman, serif, any
    CourierCourier, monospace, Monospaced
    SymbolSymbol
    ZapfDingbatsZapfDingbats
    +

    + Please note that recent versions of Adobe Acrobat Reader replace + "Helvetica" with "Arial" and "Times" with "Times New Roman" internally. + GhostScript replaces "Helvetica" with "Nimbus Sans L" and "Times" with + "Nimbus Roman No9 L". Other document viewers may do similar font + substitutions. If you need to make sure that there are no such + substitutions, you need to specify an explicit font and embed it in + the target document. +

    +
    +
    + Missing Fonts +

    + When FOP does not have a specific font at its disposal (because it's + not installed in the operating system or set up in FOP's configuration), + the font is replaced with "any". "any" is internally mapped to the + Base-14 font "Times" (see above). +

    +
    +
    + Missing Glyphs +

    + Every font contains a particular set of + glyphs. If no glyph can be found for + a given character, FOP will issue a warning and use the glpyh for "#" (if available) + instead. Before it does that, it consults a (currently hard-coded) registry of + glyph substitution groups (see Glyphs.java in Apache XML Graphics Commons). + This registry can supply alternative glyphs in some cases (like using space when a no-break + space is requested). But there's no guarantee that the result will be as expected (for + example, in the case of hyphens and similar glyphs). A better way is to use a font that + has all the necessary glyphs. This glyph substitution is only a last resort. +

    +
    +
    + Java2D/AWT/Operating System Fonts +

    + The Java2D family of renderers (Java2D, AWT, Print, TIFF, PNG), use the + Java AWT subsystem for font metric information. Through operating system + registration, the AWT subsystem knows what fonts are available on the system, + and the font metrics for each one. +

    +

    + When working with one of these output formats and you're missing a font, just + install it in your operating system and they should be available for these + renderers. Please note that this is not true for other output formats such as + PDF or PostScript. +

    +
    +
    + Custom Fonts +

    + Support for custom fonts is highly output format dependent (see above table). + This section shows how to add Type 1 and TrueType fonts to the PDF, PostScript and + Java2D-based renderers. Other renderers (like AFP) support other font formats. Details + in this case can be found on the page about output formats. +

    +

    + In earlier FOP versions, it was always necessary to create an XML font metrics file + if you wanted to add a custom font. This unconvenient step has been removed and in + addition to that, FOP supports auto-registration of fonts, i.e. FOP can find fonts + installed in your operating system or can scan user-specified directories for fonts. + Font registration via XML font metrics file is still supported and may still be necessary + for some very special cases as fallback variant while we stabilize font auto-detection. +

    +

    + Basic information about fonts can be found at: +

    + +
    +
    + Basic font configuration +

    + If you want FOP to use custom fonts, you need to tell it where to find them. This + is done in the configuration file and once per renderer (because each output format + is a little different). In the basic form, you can either tell FOP to find your + operating system fonts or you can specify directories that it will search for + support fonts. These fonts will then automatically be registered. +

    + + + + + C:\MyFonts1 + + + C:\MyFonts2 + + + + + +]]> + + Review the documentation for FOP Configuration + for instructions on making the FOP configuration available to FOP when it runs. + Otherwise, FOP has no way of finding your custom font information. It is currently + not possible to easily configure fonts from Java code. + +
    +
    + Advanced font configuration +

    + The instructions found above should be sufficient for most users. Below are some + additional instructions in case the basic font configuration doesn't lead to + the desired results. +

    +
    + Type 1 Font Metrics +

    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:

    + java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar + org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file +

    Unix:

    + java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar + org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file +

    PFMReader [options]:

    +
      +
    • -fn <fontname> By default, FOP uses the fontname from the + .pfm file when embedding the font. Use the "-fn" option to override this name with one you have + chosen. This may be useful in some cases to ensure that applications using the output document + (Acrobat Reader for example) use the embedded font instead of a local font with the same + name.
    • +
    + The classpath in the above example has been simplified for readability. + You will have to adjust the classpath to the names of the actual JAR files in the lib directory. + xml-apis.jar, xercesImpl.jar, xalan.jar and serializer.jar are not necessary for JDK version 1.4 or later. + The tool will construct some values (FontBBox, StemV and ItalicAngle) based on assumptions and calculations which are only an approximation to the real values. + FontBBox and Italic Angle can be found in the human-readable part of the PFB file or in the AFM file. + The PFMReader tool does not yet interpret PFB or AFM files, so if you want to be correct, you may have to adjust the values in the XML file manually. + The constructed values however appear to have no visible influence. +
    +
    + TrueType Font Metrics +

    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:

    + java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar + org.apache.fop.fonts.apps.TTFReader [options] + C:\myfonts\cmr10.ttf ttfcm.xml +

    TTFReader [options]:

    +
      +
    • -d <DEBUG | INFO > Sets the debug level (default is + INFO).
    • +
    • -fn <fontname> Same as for PFMReader.
    • +
    • -ttcname <fontname> If you're reading data from a + TrueType Collection (.ttc file) you must specify which font from the collection you will read + metrics from. + If you read from a .ttc file without this option, the fontnames will be listed for you.
    • +
    • -enc ansi Creates a WinAnsi-encoded font metrics file. + Without this option, a CID-keyed font metrics file is created. + The table below summarizes the differences between these two encoding options as currently + used within FOP. + Please note that this information only applies to TrueType fonts and TrueType collections:
    • +
    + + + + + + + + + + + + + + + + +
    IssueWinAnsiCID-keyed
    Usable Character SetLimited to WinAnsi character set, which is roughly equivalent to iso-8889-1.Limited only by the characters in the font itself.
    Embedding the FontOptional.Mandatory. Not embedding the font produces invalid PDF documents.
    + + You may experience failures with certain TrueType fonts, especially if they don't contain + the so-called Unicode "cmap" table. TTFReader can currently not deal with font like this. + +
    +
    + TrueType Collections +

    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:

    + java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar + org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho" + msmincho.ttc msminch.xml +

    + Alternatively, the individual sub-fonts of a TrueType Collections can be selected + using the "sub-font" attribute on the "font" element. That means that generating + an XML font metrics file for TrueType collections is not necessary anymore. Example: +

    + + +]]> +
    +
    + Register Fonts with FOP +

    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:

    + + + + + + + + + + C:\MyFonts1 + + + C:\MyFonts2 + + + + + +]]> +
      +
    • + URLs are used to access the font metric and font files. + Relative URLs are resolved relative to the font-base property (or base) if available. + See FOP: Configuration for more information. +
    • +
    • The "metrics-url" attribute is generally not necessary except if you run into problems with certain fonts.
    • +
    • Either an "embed-url" or a "metrics-url" must be specified for font tag configurations.
    • +
    • The font "kerning" attribute is optional. Default is "true".
    • +
    • If embedding is off (i.e. embed-url is not set), the output will position the text correctly (from the metrics file), but it will not be displayed or printed correctly unless the viewer has the applicable font available to their local system.
    • +
    • When setting the "embed-url" attribute for Type 1 fonts, be sure to specify the PFB (actual font data), not PFM (font metrics) file that you used to generate the XML font metrics file.
    • +
    • The attribute "encoding-mode" is optional an may have the following values: +
        +
      • auto: default font encoding mode ("cid" for Truetype, "single-byte" for Type 1)
      • +
      • single-byte: use single-byte encodings in the target format (if applicable)
      • +
      • cid: encode as CID-keyed font (currently only supported for PDF output with TrueType fonts)
      • +
      +
    • +
    • The fonts "directory" tag can be used to register fonts contained within a single or list of directory paths. The "recursive" attribute can be specified to recursively add fonts from all sub directories.
    • +
    • The fonts "auto-detect" tag can be used to automatically register fonts that are found to be installed on the native operating system.
    • +
    • Fonts registered with "font" tag configurations override fonts found by means of "directory" tag definitions.
    • +
    • Fonts found as a result of a "directory" tag configuration override fonts found as a result of the "auto-detect" tag being specified.
    • +
    • + If relative URLs are specified, they are evaluated relative to the value of the + "font-base" setting. If there is no "font-base" setting, the fonts are evaluated + relative to the base directory. +
    • +
    + +
    +
    + Auto-Detect and auto-embed feature +

    When the "auto-detect" flag is set in the configuration, FOP will automatically search for fonts in the default paths for your operating system.

    +

    FOP will also auto-detect fonts which are available in the classpath, if they are described as "application/x-font" in the MANIFEST.MF file. For example, if your .jar file contains font/myfont.ttf:

    + Manifest-Version: 1.0 + + Name: font/myfont.ttf + Content-Type: application/x-font +

    This feature allows you to create JAR files containing fonts. The JAR files can be added to fop by providem them in the classpath, e.g. copying them into the lib/ directory.

    +
    +
    + Embedding +

    + By default, all fonts are embedded if an output format supports font embedding. In some + cases, however, it is preferred that some fonts are only referenced. When working + with referenced fonts it is important to be in control of the target environment where + the produced document is consumed, i.e. the necessary fonts have to be installed there. +

    +

    + There are two different ways how you can specify that a font should be referenced: +

    +
      +
    1. + When using the old-style "font" element to configure a single font, font referencing + is 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. +
    2. +
    3. + For automatically configured fonts there's a different mechanism to specify which + fonts should be referenced rather than embedded. This is done in the "referenced-fonts" + element in the configuration. Here's an example: +
    4. +
    + + + + + + + +]]> +

    + At the moment, you can only match fonts against their font-family. It is possible to use + regular expressions as is shown in the second example above ("DejaVu.*"). The syntax for + the regular expressions used here are the one used by the + java.util.regex package. + So, in the above snippet "Helvetica" and all variants of the "DejaVu" font family are + referenced. If you want to reference all fonts, just specify font-family=".*". +

    +

    + The referenced-fonts element can be placed either inside the general + fonts element (right under the root) or in the fonts element + under the renderer configuration. In the first case, matches apply to all renderers. + In the second case, matches only apply to the renderer where the element was specified. + Both cases can be used at the same time. +

    +

    + Various notes related to embedded fonts: +

    +
      +
    • The PostScript renderer does not yet support TrueType fonts, but can embed Type 1 fonts.
    • +
    • The font is simply embedded into the PDF file, it is not converted.
    • +
    • 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. + That's the default, but if you specify encoding-mode="single-byte" (see above), the + complete font is embedded.
    • +
    +
    +
    + Substitution +

    When a <substitutions/> section is defined in the configuration, FOP will re-map any font-family references found in your FO input to a given substitution font.

    +
      +
    • If a <substitution/> is declared, it is mandatory that both a <from/> and <to/> child element is declared with a font-family attribute.
    • +
    • Both font-weight and font-style are optional attributes, if they are provided then a value of 'normal' is assumed.
    • +
    +

    For example you could make all FO font-family references to 'Arial' with weights between 700 and 900 reference the normal 'Arial Black' font.

    + + + + + + + + + + + + + +]]> +
    + +
    +
    + Font Selection Strategies +

    + There are two font selection strategies: character-by-character or auto. The default is auto.

    +

    Auto selected the first font from the list which is able to display the most characters in a given word. This means (assume font A has characters for abclmn, font B for lnmxyz, fontlist is A,B):

    +
      +
    • aaa lll xxx would be displayed in fonts A A B
    • +
    • aaaxx would be displayed in font A
    • +
    • aaaxxx would be displayed in font A
    • +
    • aaaxxxx would be displayed in font B
    • +
    +

    Character-by-Character is NOT yet supported!

    +
    +
    + Font List Command-Line Tool +

    + FOP contains a small command-line tool that lets you generate a list of all configured + fonts. Its class name is: org.apache.fop.tools.fontlist.FontListMain. + Run it with the "-?" parameter to get help for the various options. +

    +
    + + diff --git a/src/documentation/content/xdocs/0.94/fotree/disabled-testcases.xml b/src/documentation/content/xdocs/1.0/fotree/disabled-testcases.xml similarity index 100% rename from src/documentation/content/xdocs/0.94/fotree/disabled-testcases.xml rename to src/documentation/content/xdocs/1.0/fotree/disabled-testcases.xml diff --git a/src/documentation/content/xdocs/1.0/graphics.xml b/src/documentation/content/xdocs/1.0/graphics.xml new file mode 100644 index 000000000..270d6b49b --- /dev/null +++ b/src/documentation/content/xdocs/1.0/graphics.xml @@ -0,0 +1,590 @@ + + + + + +
    + Apache FOP: Graphics Formats + $Revision$ +
    + +
    + Introduction +

    + Some noteworthy features of the image handling subsystem are: +

    +
      +
    • + The image libraries Jimi and JAI are not supported. Instead, Apache FOP uses the + Image I/O API that was introduced with Java 1.4 for all bitmap codecs. +
    • +
    • + Some bitmap images are not converted to a standardized 24 bit RGB image but are + instead handled in their native format. +
    • +
    • + A plug-in mechanism offers a possibility to add support for new formats without changing + the FOP's source code. +
    • +
    +

    + The actual image loading framework + does not reside in Apache FOP, but in + XML Graphics Commons. +

    +
    +
    + Overview of Graphics Support +

    + 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 Through" columns + for more details. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FormatTypeSupport Through
    Apache FOP (native)Apache BatikImage I/O
    BMP (Microsoft Windows Bitmap)bitmapX [1]
    EMF (Windows Enhanced Metafile)vector (with embedded bitmaps)(X)
    EPS (Encapsulated PostScript)metafile (both bitmap and vector), most frequently used for vector drawings(X)
    GIF (Graphics Interchange Format)bitmapX
    JPEG (Joint Photographic Experts Group)bitmap(X)X
    PNG (Portable Network Graphic)bitmapX
    SVG (Scalable Vector Graphics)vector (with embedded bitmaps)X
    TIFF (Tag Image Format File)bitmap(X)X [1]
    WMF (Windows Metafile)vector (with embedded bitmaps)(X)
    +

    + Legend: +

    +
      +
    • "(X)" means restricted support. Please see the details below.
    • +
    • + [1]: Requires the presence of JAI Image I/O Tools + (or an equivalent Image I/O compatible codec) in the classpath. JAI Image I/O Tools also + adds support for JPEG 2000, WBMP, RAW and PNM. Other Image I/O codecs may provide + support for additional formats. +
    • +
    + + JAI Image I/O Tools is not the same as the + JAI library! The + former simply exposes JAI's codecs using the Image I/O API but does not include all + the image manipulation functionality. + +
    + Map of supported image formats by output format +

    + Not all image formats are supported for all output formats! For example, while you can + use EPS (Encapsulated PostScript) files when you generate PostScript output, this format + will not be supported by any other output format. Here's an overview of which image + formats are supported by which output format: +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Image FormatPDFPostScriptJava2D, PNG, TIFF, AWTPCLAFPRTF
    BMP (Microsoft Windows Bitmap)XXXXXX
    EMF (Windows Enhanced Metafile)X [1]
    EPS (Encapsulated PostScript)X [1]
    GIF (Graphics Interchange Format)XXXXXX
    JPEG (Joint Photographic Experts Group)X [1]X [1]XXX [1]X
    PNG (Portable Network Graphic)XXXXXX
    SVG (Scalable Vector Graphics)XXXXXX
    TIFF (Tag Image Format File)X [2]X [2]XXX [2]X
    WMF (Windows Metafile)XXXXXX
    +

    + Legend: +

    +
      +
    • + [1]: Supported without the need to decode the image. +
    • +
    • + [2]: Supported without the need to decode the image, but only for certain subtypes. +
    • +
    +
    +
    +
    + Graphics Packages +
    + XML Graphics Commons Native +

    + XML Graphics Commons supports a number + of graphic file formats natively as basic functionality: all bitmap formats for which + there are Image I/O codecs available (JPEG, PNG, GIF, TIFF, etc.), EPS and EMF. +

    +
    +
    + FOP Native +

    + FOP has no native image plug-ins for the image loading framework of its own but currently + hosts the Batik-dependent SVG and WMF plug-ins until they can be moved to + Apache Batik. +

    +
    +
    + Apache Batik +

    + Apache Batik will later receive the + SVG and WMF plug-ins for the image loading framework that are currently hosted inside + FOP. +

    +

    + Current FOP distributions include a distribution of the + Apache Batik. + 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. +

    + 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:

    +
      +
    • + Start Java with the -Djava.awt.headless=true command line option. +
    • +
    • + Install an X server which provides an in-memory framebuffer without actually using a + screen device or any display hardware. One example is Xvfb. +
    • +
    • + Install a toolkit which emulates AWT without the need for an underlying X server. One + example is the PJA toolkit, which is free + and comes with detailed installation instructions. +
    • +
    +
    +
    + Image I/O +

    + The image loading framework in XML Graphics Commons + 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. +

    +
    +
    +
    + Details on image formats +
    + BMP +

    + BMP images are supported through an Image I/O codec. There may be limitations of the + codec which are outside the control of Apache FOP. +

    +
    +
    + EMF +

    + Windows Enhanced Metafiles (EMF) are only supported in RTF output where they are + embedded without decoding. +

    +
    +
    + EPS +

    Apache FOP allows to use EPS files when generating PostScript output only.

    +

    + Other output targets can't be supported at the moment because + FOP lacks a PostScript interpreter. Furthermore, FOP is currently not able + to parse the preview bitmaps sometimes contained in EPS files. +

    +
    +
    + GIF +

    + GIF images are supported through an Image I/O codec. Transparency is supported but + not guaranteed to work with every output format. +

    +
    +
    + JPEG +

    + FOP native support (i.e. the handling of undecoded images) 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. However, for other output formats, the + JPEG images have to be decompressed. Tests have shown that there are some limitation + in some Image I/O codecs concerning images in the CMYK color space. Work-arounds are + in place but may not always work as expected. +

    +
    +
    + PNG +

    + PNG images are supported through an Image I/O codec. Transparency is supported but + not guaranteed to work with every output format. +

    +
    +
    + SVG +
    + Introduction +

    FOP uses Apache Batik for SVG support. + This format can be handled as an fo:instream-foreign-object or in a separate + file referenced with fo:external-graphic.

    + + Batik's SVG Rasterizer utility may also be used to convert standalone SVG + documents into PDF. For more information please see the + SVG Rasterizer documentation + on the Batik site. + +
    +
    + Placing SVG Graphics into PDF +

    + 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. The same applies to PostScript output. + For other output formats the SVG graphic may be converted to a bitmap + image. +

    +

    + 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 these raster images can + be controlled through the "target resolution" setting in the + configuration.

    +

    + Currently transparency is limited in PDF so some SVG images that + contain effects or graphics with transparent areas may not be displayed + correctly. +

    +
    +
    + Placing SVG Text into PDF and PostScript +

    If possible, Batik will use normal PDF or PostScript 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 / text.png + shows how various types and effects with text are handled. + Note that SVG font support is not yet implemented. Furthermore, text handling in + PostScript output is inferior to PDF output - more text will be painted as shapes in + PS than in PDF. +

    +

    + When there's no support to paint text using native text operations, + 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 output files large and when it is viewed the + viewer may not normally draw those fine curves very well (In Adobe Acrobat, turning on + "Smooth Line Art" in the preferences will fix this). Copy/paste functionality + will not be supported in this case. + If the text is inserted into the output file using the inbuilt text commands + 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. +

    +
    +
    + Font selection notes +

    + Apache Batik uses the AWT/Java2D subsystem as font source while FOP has its own font + subsystem. Great care has been taken that font selection does the best possible choices. + But it must be noted when creating PDF or PostScript that a font used in SVG graphics + needs to be registered with the operating system as well as in FOP's configuration. + By using FOP's font auto-detection, you simply have to install the font in the operating + system and not care about anything else. This is less of an issue if you create + formats like TIFFs, PNGs or PCL because in these cases SVG graphics are usually rendered + to bitmaps which means that on both sides (Batik and FOP), AWT/Java2D is used as the + single font source. +

    +

    + Whenever an SVG is converted into a PDF or PostScript file, the font that has been used + inside Batik has to be mapped to a font used by the actual output format. Features like + font substitution in FOP may need to be taken into account but can also be an advantage + when working around font mapping issues. Like for XSL-FO content, you'll get a warning + if a particular font could not be found and had to be substituted, or if a particular + glyph is missing in a font. +

    +
    +
    + Scaling +

    + 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. Additional scaling options are available + through XSL-FO means. +

    +

    + If you use pixels to specify the size of an SVG graphic the "source resolution" setting + in the configuration will be used to determine the + size of a pixel. The use of pixels to specify sizes is discouraged as they may + be interpreted differently in different environments. +

    +
    +
    + Known Problems +
      +
    • + Soft mask transparency is combined with white so that it looks better + on PDF 1.3 viewers but this causes the soft mask to be slightly lighter + or darker on PDF 1.4 viewers. +
    • +
    • + There is some problem with a gradient inside a pattern which may cause a PDF + error when viewed in Acrobat 5. +
    • +
    • + Text is not always handled correctly, it may select the wrong font + especially if characters have multiple fonts in the font list. +
    • +
    • + Uniform transparency for images and other SVG elements that are converted + into a raster graphic are not drawn properly in PDF. The image is opaque. +
    • +
    +
    +
    +
    + TIFF +

    + FOP can embed TIFF images without decompression into PDF, PostScript and AFP if they + have either CCITT T.4, CCITT T.6, or JPEG compression. Otherwise, a TIFF-capable + Image I/O codec is necessary for decoding the image. +

    +

    + There may be some limitation concerning images in the CMYK color space. +

    +
    +
    + WMF +

    + Windows Metafiles (WMF) are supported through classes in + Apache Batik. At the moment, support + for this format is experimental and may not always work as expected. +

    +
    +
    +
    + Graphics Resolution +

    + Some bitmapped image file formats store a dots-per-inch (dpi) or other resolution + values. FOP tries to use this resolution information whenever possible to determine + the image's intrinsic size. This size is used during the layout process when it is not + superseded by an explicit size on fo:external-graphic (content-width and content-height + properties). +

    +

    + Please note that not all images contain resolution information. If it's not available + the source resolution set on the FopFactory (or through the user configuration XML) is used. + The default here is 72 dpi. +

    +

    + Bitmap images are generally embedded into the output format at their original resolution + (as is). No resampling of the image is performed. Explicit resampling is on our wishlist, + but hasn't been implemented, yet. Bitmaps included in SVG graphics may be resampled to + the resolution specified in the "target resolution" setting in the + configuration if SVG filters are applied. This can be + used as a work-around to resample images in FO documents. +

    +
    +
    + Page selection for multi-page formats +

    + Some image formats such as TIFF support multiple pages/sub-images per file. You can + select a particular page using a special URI fragment in the form: + <uri>#page=<nr> + (for example: http://localhost/images/myimage.tiff#page=3) +

    +
    +
    + Image caching +

    + FOP caches images between runs. There is one cache per FopFactory instance. The URI is + used as a key to identify images which means that when a particular URI 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 URI you need to use a constantly + changing dummy parameter on the URI to avoid caching. +

    +

    + The image cache has been improved considerably in the redesigned code. Therefore, + resetting the image cache should be a thing of the past. If you + still experience OutOfMemoryErrors, please notify us. +

    +

    + If all else fails, the image cache can be cleared like this: + fopFactory.getImageManager().getCache().clearCache(); +

    +
    + +
    diff --git a/src/documentation/content/xdocs/0.94/hyphenation.xml b/src/documentation/content/xdocs/1.0/hyphenation.xml similarity index 100% rename from src/documentation/content/xdocs/0.94/hyphenation.xml rename to src/documentation/content/xdocs/1.0/hyphenation.xml diff --git a/src/documentation/content/xdocs/0.94/index.xml b/src/documentation/content/xdocs/1.0/index.xml similarity index 72% rename from src/documentation/content/xdocs/0.94/index.xml rename to src/documentation/content/xdocs/1.0/index.xml index 9bf46ccf5..c152701ad 100644 --- a/src/documentation/content/xdocs/0.94/index.xml +++ b/src/documentation/content/xdocs/1.0/index.xml @@ -19,21 +19,24 @@
    - Apache FOP Version 0.94 + Apache FOP Trunk (Development code) $Revision$
    Introduction

    - The Apache FOP team is proud to present to you this production quality release. - 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. + FOP Trunk is the name for the current + development code as found in the Subversion repository. This + section of the FOP web site provides the documentation for + this version.

    - This fifth release contains many bug fix release and new features compared - to 0.93. To see what has changed since the last release, please visit the - Changes Page and the Release Notes. + The Apache FOP team is proud to present to you this production quality codebase. 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.

    @@ -43,11 +46,5 @@ information contained on the Upgrading page!

    -
    - Download -

    - To download this version, please visit the download page. -

    -
    diff --git a/src/documentation/content/xdocs/1.0/intermediate.xml b/src/documentation/content/xdocs/1.0/intermediate.xml new file mode 100644 index 000000000..148e99360 --- /dev/null +++ b/src/documentation/content/xdocs/1.0/intermediate.xml @@ -0,0 +1,331 @@ + + + + + +
    + Intermediate Format + $Revision$ +
    + + + Please note that the intermediate formats described here are + advanced features and can be ignored by most users of Apache FOP. + +
    + Introduction +

    + Apache FOP now provides two different so-called intermediate formats. The first one + (let's call it the area tree XML format) is basically a 1:1 XML representation of FOP's + area tree as generated by the layout engine. The area tree is conceptually defined in the + XSL-FO specification in chapter 1.1.2. + Even though the area tree is mentioned in the XSL-FO specification, this part is not + standardized. Therefore, the area tree XML format is a FOP-proprietary XML file format. + The area tree XML can be generated through the area tree XML Renderer (the XMLRenderer). +

    +

    + The second intermediate format (which we shall name exactly like this: the intermediate + format) + is a recent addition which tries to meet a slightly different set of goals. It is highly + optimized for speed. +

    +

    + 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. +

    +
    +
    + Which Intermediate Format to choose? +

    + Both formats have their use cases, so the choice you will make will depend on your + particular situation. Here is a list of strengths and use cases for both formats: +

    +
    + Area Tree XML (AT XML) +
      +
    • 1:1 representation of FOP's area tree in XML.
    • +
    • Contains more structure information than the new intermediate format.
    • +
    • Used in FOP's layout engine test suite for regression testing.
    • +
    +
    +
    + Intermediate Format (IF) +
      +
    • Highly optimized for speed.
    • +
    • Smaller XML files.
    • +
    • Easier to post-process.
    • +
    • XML Schema is available.
    • +
    • + Recommended for use cases where documents are formatted concurrently and later + concatenated to a single print job. +
    • +
    +
    +

    + More technical information about the two formats can be found on the + FOP Wiki. +

    +
    +
    + Architectural Overview +
    +
    +
    + Usage of the Area Tree XML format (AT XML) +

    + As already mentioned, the area tree XML format 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 format, you need to create the area tree XML 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 area tree XML 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 area tree XML + format file is the first step. +

    +

    + The second step is to reparse the file using the AreaTreeParser which is + found in the org.apache.fop.area package. The pages retrieved from the area tree XML 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 area tree XML + processing in the + examples/embedding + directory in the FOP distribution. +

    +

    + The basic pattern to parse the area tree XML format looks like this: +

    + +

    + This example simply reads an area tree 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 + endDocument() on the AreaTreeModel. This lets the Renderer know that the processing + is now finished. +

    +

    + The area tree XML 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. +

    +
    + Concatenating Documents +

    + 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 area tree 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. +

    +
    +
    + Modifying Documents +

    + One of the most important use cases for this format is obviously modifying the area + tree XML before finally rendering it to the target format. You can easily use XSLT to process + the AT XML file according to your needs. Please note, that we will currently not formally describe + the area tree XML 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 area tree XML format is sensitive to changes in whitespace. If you're not careful, + the modified file may not render correctly. + +
    +
    + Advanced Use +

    + The generation of the area tree format as well as it parsing process has been designed to allow + for maximum flexibility and optimization. Please note that you can call 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()). +

    +
    +
    +
    + Usage of the Intermediate Format (IF) +

    + The Intermediate Format (IF) is generated by the IFSerializer + (MIME type: application/X-fop-intermediate-format). + 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. +

    +

    + The IFSerializer is an implementation of the IFDocumentHandler and + IFPainter interfaces. The IFRenderer class is responsible + for converting FOP's area tree into calls against these two interfaces. +

    +
      +
    • + IFDocumentHandler: This interface is used on the document-level and defines the + overall structure of the Intermediate Format. +
    • +
    • + IFPainter: This interface is used to generate graphical page content like text, images + and borders. +
    • +
    +

    + As with the AT XML, there is an important detail to consider: The various output + implementations don't all use the same font sources. To be able + to create the right IF for the ultimate output file, you need to create the IF file using + the right font setup. This is achieved by telling the IFRenderer (responsible for + converting the area tree into calls to the IFDocumentHandler and IFPainter interfaces) + to mimic another renderer. This is done by calling the IFSerializer's + mimicDocumentHandler() method with an instance of the ultimate target document handler + as the single parameter. This has a consequence: An IF file rendered with the + Java2DDocumentHandler may not look as expected when it was actually generated for the PDF + implementation. For implementations 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 file using the IFParser which is + found in the org.apache.fop.render.intermediate package. The IFParser simply takes an + IFDocumentHandler instance against which it generates the appropriate calls. The IFParser + is implemented as a SAX ContentHandler so you're free to choose the method for + post-processing the IF file(s). You can use XSLT or write SAX- or DOM-based code to + manipulate the contents. You can find examples for the Intermediate Format + processing in the + examples/embedding + directory in the FOP distribution. +

    +

    + The basic pattern to parse the intermediate format looks like this: +

    + +

    + This example simply reads an intermediate file and renders it to a PDF file. Here + IFParser.parse() is used, but you can also just get a SAX ContentHandler by using the + IFParser.getContentHandler() method. +

    +
    + Concatenating Documents +

    + This initial example is obviously not very useful. It would be faster to create the PDF file + directly (without the intermediate step). As the + ExampleConcat.java + example shows you can easily parse multiple intermediate files in a row and use the + IFConcatenator class to concatenate page sequences from multiple source files to a single + output file. This particular example does the concatenation on the level of the + IFDocumentHandler interface. You could also do this in XSLT or using SAX on the XML level. + Whatever suits your process best. +

    +
    +
    + Modifying Documents +

    + One of the most important use cases for this format is obviously modifying the + intermediate format before finally rendering it to the target format. You can easily use + XSLT to process the IF file according to your needs. +

    +

    + There is an XML Schema (located under + src/documentation/intermediate-format-ng) + that helps you verify that your modified content is correct. +

    +

    + For certain output formats there's a caveat: Formats like AFP and PCL do not support + arbitrary transformations on the IF's "viewport" and "g" elements. Possible are + only rotations in 90 degree steps and translations. +

    +
    +
    + Advanced Use +

    + The generation of the intermediate format as well as it parsing process has been + designed to allow for maximum flexibility and optimization. So rather than just passing + in a StreamResult to IFSerializer's setResult() method, you can also use a SAXResult + or a DOMResult. And as you've already seen , the IFParser on the other side allows you + to retrieve a ContentHandler instance where you can manually send SAX events to + start the parsing process (see getContentHandler()). +

    +
    +
    + +
    diff --git a/src/documentation/content/xdocs/0.94/known-issues.xml b/src/documentation/content/xdocs/1.0/known-issues.xml similarity index 92% rename from src/documentation/content/xdocs/0.94/known-issues.xml rename to src/documentation/content/xdocs/1.0/known-issues.xml index 27ae55494..2ef4b7102 100644 --- a/src/documentation/content/xdocs/0.94/known-issues.xml +++ b/src/documentation/content/xdocs/1.0/known-issues.xml @@ -21,8 +21,9 @@ MIF and SVG output support have not been restored, yet. - Java2D/AWT support has been improved, but some problems remain, - for example with block-containers. + RTF output is inferior to other output formats supported by FOP. + For details, please see the "Output Targets" page of the release + you're using. Auto table layout is not implemented, yet. @@ -80,10 +81,6 @@ Not all FO elements can be referenced by their "id", most notably: table-body, table-header, table-footer and table-row. - - The backgrounds of table-body, table-header, table-footer and - table-column are not painted, yet. - Border and padding conditionality are not supported on table-cells, yet. diff --git a/src/documentation/content/xdocs/0.94/knownissues_overview.xml b/src/documentation/content/xdocs/1.0/knownissues_overview.xml similarity index 89% rename from src/documentation/content/xdocs/0.94/knownissues_overview.xml rename to src/documentation/content/xdocs/1.0/knownissues_overview.xml index 5720424b7..3f96a9b5c 100644 --- a/src/documentation/content/xdocs/0.94/knownissues_overview.xml +++ b/src/documentation/content/xdocs/1.0/knownissues_overview.xml @@ -49,7 +49,7 @@ This section lists disabled test cases in the test suite for the FO tree tests, at the time of the release.

    - +
    Layout Engine @@ -57,12 +57,12 @@ This section lists disabled test cases in the test suite for the layout engine tests, at the time of the release.

    - +
    Other known issues

    This section lists other known issues.

    - +
    diff --git a/src/documentation/content/xdocs/0.94/layoutengine/disabled-testcases.xml b/src/documentation/content/xdocs/1.0/layoutengine/disabled-testcases.xml similarity index 65% rename from src/documentation/content/xdocs/0.94/layoutengine/disabled-testcases.xml rename to src/documentation/content/xdocs/1.0/layoutengine/disabled-testcases.xml index d81c0dc27..1fb4f2926 100644 --- a/src/documentation/content/xdocs/0.94/layoutengine/disabled-testcases.xml +++ b/src/documentation/content/xdocs/1.0/layoutengine/disabled-testcases.xml @@ -26,13 +26,6 @@ is not sized correctly if it wraps an image that is higher than the nominal line. - - Bugzilla #36391: reference-orientation - block-container_reference-orientation_bug36391.xml - There's a problem involving nested block-containers - and reference-orientation 180/-180. - http://issues.apache.org/bugzilla/show_bug.cgi?id=36391 - Auto-height block-containers produce fences block-container_space-before_space-after_3.xml @@ -48,8 +41,8 @@ Hyphenation with preserved linefeeds block_hyphenation_linefeed_preserve.xml - When hyphenation is enabled and linefeeds are preserved linefeeds - are painted as '#' and the text is output multiple times. + When hyphenation is enabled and linefeeds are preserved, + the text is output multiple times. linefeed-treatment @@ -104,29 +97,6 @@ Space resolution does not work between footnote regions. - - Footnotes swallowed in lists - footnote_in_list.xml - Element lists for lists are created by combining the - element lists from list-item-label and list-item-body. The - footnotes contained in the KnuthBlockBoxes are not propagated to - the combined element list. - http://issues.apache.org/bugzilla/show_bug.cgi?id=37579 - - - Footnotes swallowed in tables - footnote_in_table.xml - Element lists for tables are created by combining the - element lists from the individual table-cells. The footnotes - contained in the KnuthBlockBoxes are not propagated to the combined - element list. - http://issues.apache.org/bugzilla/show_bug.cgi?id=37579 - - - keeps on inlines NYI - inline_keep-together.xml - Keeps are not implemented in inline-level elements, yet. - NPE for table inside an inline inline_block_nested_3.xml @@ -176,18 +146,6 @@ line. http://www.nabble.com/leaders-with-leader-pattern%3D%22use-content%22-t546244.html - - keep-with-previous doesn't work in lists - list-block_keep-with-previous.xml - Keep-with-previous doesn't work inside tables and - lists, yet. - - - keep-with-previous doesn't work in lists - list-item_block_keep-with-previous.xml - Keep-with-previous doesn't work inside tables and - lists, yet. - Page breaking doesn't deal with IPD changes page-breaking_4.xml @@ -212,11 +170,6 @@ Background-images on page-number-citations are not placed correctly. - - page-number-citation-last: FOs spanning multiple pages are not properly handled. - page-number-citation-last_basic.xml - Resolution of forward references does not wait until an FO is fully finished when an FO spans multiple pages. - IDs are not working on all FO elements page-number-citation_complex_1.xml @@ -244,54 +197,6 @@ region-body_column-count_bug36356.xml Column balancing doesn't work as expected. - - No background-images on table-body - table-body_background-image.xml - The backgrounds of table-body, table-header, - table-footer and table-column are not painted, yet. - - - Collapsing Border Model NYI - table_border-collapse_collapse_1.xml - Border-collapse="collapse" is not yet - implemented. - - - Collapsing Border Model NYI - table_border-collapse_collapse_2.xml - Border-collapse="collapse" is not yet - implemented. - - - Problems with border and padding on tables - table_border_padding.xml - The element list seems to not be fully correct, yet, causing - the layout to look odd. - - - keep-with-previous doesn't work inside tables - table-cell_block_keep-with-previous.xml - Keep-with-previous doesn't work inside tables and - lists, yet. - - - Border and padding conditionality is NYI on table-cells - table-cell_border_padding_conditionality.xml - Border and padding conditionality are not supported - on table-cells, yet. - - - No background-images on table-header - table-header_background-image.xml - The backgrounds of table-body, table-header, - table-footer and table-column are not painted, yet. - - - keep-with-previous doesn't work on table-rows - table-row_keep-with-previous.xml - Keep-with-previous doesn't work inside tables and - lists, yet. - table-cell empty area with marker.xml table-cell_empty_area_with_marker.xml @@ -305,23 +210,16 @@ is probably not expressing the indended outcome according to the spec. The test case should be revisited. - - fo:wrapper around block-level content (with id) - wrapper_block_id.xml - "id" attributes on fo:wrapper around block-level content don't get - added to the area tree. - - - Bugzilla #40230: invalid extra page break - block_break-after_bug40230.xml - Currently an extra page is created even if there is nothing - after a block with break-after="page" - http://issues.apache.org/bugzilla/show_bug.cgi?id=40230 - Soft hyphen with normal hyphenation enabled block_shy_linebreaking_hyph.xml A soft hyphen should be a preferred as break compared to a normal hyphenation point but is not. + + Page-keep not respected in multi-column layout + keep_within-page_multi-column_overflow.xml + The block should cause overflow in the + last column on the page, rather than be broken. + diff --git a/src/documentation/content/xdocs/1.0/metadata.xml b/src/documentation/content/xdocs/1.0/metadata.xml new file mode 100644 index 000000000..8c273fff5 --- /dev/null +++ b/src/documentation/content/xdocs/1.0/metadata.xml @@ -0,0 +1,243 @@ + + + + + +
    + Metadata +
    + +
    + Overview +

    + Document metadata is an important tool for categorizing and finding documents. + Various formats support different kinds of metadata representation and to + different levels. One of the more popular and flexible means of representing + document or object metadata is + XMP (eXtensible Metadata Platform, specified by Adobe). + PDF 1.4 introduced the use of XMP. The XMP specification lists recommendation for + embedding XMP metdata in other document and image formats. Given its flexibility it makes + sense to make use this approach in the XSL-FO context. Unfortunately, unlike SVG which + also refers to XMP, XSL-FO doesn't recommend a preferred way of specifying document and + object metadata. Therefore, there's no portable way to represent metadata in XSL-FO + documents. Each implementation does it differently. +

    +
    +
    + Embedding XMP in an XSL-FO document +

    + As noted above, there's no officially recommended way to embed metadata in XSL-FO. + Apache FOP supports embedding XMP in XSL-FO. Currently, only support for document-level + metadata is implemented. Object-level metadata will be implemented when there's + interest. +

    +

    + Document-level metadata can be specified in the fo:declarations element. + XMP specification recommends to use x:xmpmeta, rdf:RDF, and + rdf:Description elements as shown in example below. Both + x:xmpmeta and rdf:RDF elements are recognized as the top-level + element introducing an XMP fragment (as per the XMP specification). +

    +
    + Example + + + + + + + Document title + Document author + Document subject + + + + Tool used to make the PDF + + + + + + + fo:declarations must be declared after + fo:layout-master-set and before the first page-sequence. + +
    +
    +
    + Implementation in Apache FOP +

    + Currently, XMP support is only available for PDF output. +

    +

    + Originally, you could set some metadata information through FOP's FOUserAgent by + using its set*() methods (like setTitle(String) or setAuthor(String). These values are + directly used to set value in the PDF Info object. Since PDF 1.4, adding metadata as an + XMP document to a PDF is possible. That means that there are now two mechanisms in PDF + that hold metadata. +

    +

    + Apache FOP now synchronizes the Info and the Metadata object in PDF, i.e. when you + set the title and the author through the FOUserAgent, the two values will end up in + the (old) Info object and in the new Metadata object as XMP content. If instead of + FOUserAgent, you embed XMP metadata in the XSL-FO document (as shown above), the + XMP metadata will be used as-is in the PDF Metadata object and some values from the + XMP metadata will be copied to the Info object to maintain backwards-compatibility + for PDF readers that don't support XMP metadata. +

    +

    + The mapping between the Info and the Metadata object used by Apache FOP comes from + the PDF/A-1 specification. + For convenience, here's the mapping table: +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Document information dictionaryXMP
    EntryPDF typePropertyXMP typeCategory
    Titletext stringdc:titleTextExternal
    Authortext stringdc:creatorseq TextExternal
    Subjecttext stringdc:description["x-default"]TextExternal
    Keywordstext stringpdf:KeywordsTextExternal
    Creatortext stringxmp:CreatorToolTextExternal
    Producertext stringpdf:ProducerTextInternal
    CreationDatedatexmp:CreationDateDateInternal
    ModDatedatexmp:ModifyDateDateInternal
    + + "Internal" in the Category column means that the user should not set this value. + It is set by the application. + + + The "Subject" used to be mapped to dc:subject in the initial publication of + PDF/A-1 (ISO 19005-1). In the + Technical Corrigendum 1 + this was changed to map to dc:description["x-default"]. + +
    + Namespaces +

    + Metadata is made of property sets where each property set uses a different namespace URI. +

    +

    + The following is a listing of namespaces that Apache FOP recognizes and acts upon, + mostly to synchronize the XMP metadata with the PDF Info dictionary: +

    + + + + + + + + + + + + + + + + + + + + + +
    Set/SchemaNamespace PrefixNamespace URI
    Dublin Coredchttp://purl.org/dc/elements/1.1/
    XMP Basicxmphttp://ns.adobe.com/xap/1.0/
    Adobe PDF Schemapdfhttp://ns.adobe.com/pdf/1.3/
    +

    + Please refer to the XMP Specification + for information on other metadata namespaces. +

    +

    + Property sets (Namespaces) not listed here are simply passed through to the final + document (if supported). That is useful if you want to specify a custom metadata + schema. +

    +
    +
    + + +
    diff --git a/src/documentation/content/xdocs/0.94/output.xml b/src/documentation/content/xdocs/1.0/output.xml similarity index 58% rename from src/documentation/content/xdocs/0.94/output.xml rename to src/documentation/content/xdocs/1.0/output.xml index 998a5e1ce..7a91992ca 100644 --- a/src/documentation/content/xdocs/0.94/output.xml +++ b/src/documentation/content/xdocs/1.0/output.xml @@ -48,6 +48,35 @@ 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.

    +

    + Theoretically, there's some potential to make the output of the PDF/PS renderers match + the output of the Java2D-based renderers. If FOP used the font metrics from its own + font subsystem but still used Java2D for text painting in the Java2D-based renderers, + this could probably be achieved. However, this approach hasn't been implemented, yet. +

    +

    + With a work-around, it is possible to match the PDF/PS output in a Java2D-based + renderer pretty closely. The clue is to use the + intermediate format. The trick is to layout the + document using FOP's own font subsystem but then render the document using Java2D. + Here are the necessary steps (using the command-line): +

    +
      +
    1. + Produce an IF file: fop -fo myfile.fo -at application/pdf myfile.at.xml
      + Specifying "application/pdf" for the "-at" parameter causes FOP to use FOP's own + font subsystem (which is used by the PDF renderer). Note that no PDF file is created + in this step. +
    2. +
    3. Render to a PDF file: fop -atin myfile.at.xml -pdf myfile.pdf
    4. +
    5. Render to a Java2D-based renderer: +
        +
      • fop -atin myfile.at.xml -print
      • +
      • fop -atin myfile.at.xml -awt
      • +
      • fop -atin myfile.at.xml -tiff myfile.tiff
      • +
      +
    6. +
    Output to a Printer or Other Device @@ -105,7 +134,7 @@ out = proc.getOutputStream();]]>
    Post-processing

    - FOP does not currently support several desirable PDF features: XMP metadata and watermarks. + FOP does not currently support several desirable PDF features: watermarks and signatures. One workaround is to use Adobe Acrobat (the full version, not the Reader) to process the file manually or with scripting that it supports.

    @@ -212,6 +241,8 @@ out = proc.getOutputStream();]]> false 3 false + false + true ]]>

    The default value for the "auto-rotate-landscape" setting is "false". Setting it @@ -230,6 +261,20 @@ out = proc.getOutputStream();]]> reduce file size but can potentially increase the memory needed in the interpreter to process.

    +

    + The default value for the "safe-set-page-device" setting is "false". Setting it + to "true" will cause the renderer to invoke a postscript macro which guards against + the possibility of invalid/unsupported postscript key/values being issued to the + implementing postscript page device. +

    +

    + The default value for the "dsc-compliant" setting is "true". Setting it + to "false" will break DSC compliance by minimizing the number of setpagedevice + calls in the postscript document output. This feature may be useful when unwanted + blank pages are experienced in your postscript output. This problem is caused by + the particular postscript implementation issuing unwanted postscript subsystem + initgraphics/erasepage calls on each setpagedevice call. +

    Limitations @@ -313,6 +358,7 @@ out = proc.getOutputStream();]]> quality bitmap + false ]]>

    The default value for the "rendering" setting is "speed" which causes borders @@ -327,6 +373,12 @@ out = proc.getOutputStream();]]> 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.

    +

    + The default value for the "disable-pjl" setting is "false". This means that + the PCL renderer usually generates PJL commands before and after the document + in order to switch a printer into PCL language. PJL commands can be disabled + if you set this value to "true". +

    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 @@ -370,20 +422,92 @@ out = proc.getOutputStream();]]> Consult the technical reference for your printer for all available values.

    +
    + Output Bin +

    + The output-bin extension attribute on fo:simple-page-master allows to + select the output bin into which the printed output should be fed. Example: +

    + + + ... + + +]]> +

    + Note: the output bin number is a positive integer and the value depends on + the target printer. Not all PCL printers support the same output bins. + Usually, + "1" is the upper output bin, + "2" is the lower (rear) output bin. + Consult the technical reference for your printer for all available values. +

    +
    +
    + Page Duplex Mode +

    + The duplex-mode extension attribute on fo:simple-page-master allows to + select the duplex mode to be used for a particular simple-page-master. + Example: +

    + + + ... + + +]]> +

    + Note: the duplex is a positive integer and the value depends on + the target printer. Not all PCL printers support duplexing. + Usually, + "0" is simplex, + "1" is duplex (long-edge binding), + "2" is duplex (short-edge binding). + + Consult the technical reference for your printer for all available values. +

    +
    AFP - The AFP Renderer is a new addition (27-Apr-2006) to the sandbox and as such not yet fully tested or feature complete.

    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).

    +

    + The mapping of XSL-FO elements to the major MO:DCA structures is as follows: +

    + + + + + + + + + + + + + + + + + +
    XSL-FO elementMO:DCA-P object
    fo:rootDocument
    fo:page-sequencePage Group
    fo:simple-page-masterPage
    +

    + FOP creates exactly one Document per Printfile with an optional Resource Group at the + beginning. FOP does not create document indices. +

    References
    @@ -399,10 +523,24 @@ out = proc.getOutputStream();]]>
    +
    + Deployment in older environments +

    + There are still a big number of older (or limited) MO:DCA/IPDS environments in production + out there. AFP has grown in functionality over time and not every environment supports the + latest features. We're trying to make AFP output work in as many environments as possible. + However, to make AFP output work on older environments it is recommended to set to + configuration to 1 bit per pixel (see below on how to do this). In this case, all images + are converted to bi-level images using IOCA function set 10 (FS10) and are enclosed in + page-segments since some implementation cannot deal with IOCA objects directly. + If a higher number of bits per pixel is configured, FOP has to switch to at least FS11 + which may not work everywhere. +

    +
    Configuration
    - Fonts + Fonts

    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 @@ -411,18 +549,19 @@ out = proc.getOutputStream();]]> ... ]]> -

    There are 3 font configuration variants supported:

    +

    There are 4 font configuration variants supported:

    1. IBM Raster fonts
    2. IBM Outline fonts
    3. +
    4. IBM CID-keyed (Type 0) fonts
    5. FOP built-in Base14 fonts

    A typical raster font configuration looks like:

    - + base URI for the font --> + @@ -448,15 +587,36 @@ out = proc.getOutputStream();]]> However, the characterset definition is now required within the afp-font element.

    + base-uri="file:/fonts/ibm" />
    ]]> +

    + If "base-uri" is missing or a relative URI, the fonts are resolved relative to + the font base URI specified in the configuration (or on the FopFactory). +

    + + Previously, the location of the font files was given by the "path" attribute. This is still + supported for the time being, but you should move to using the more flexible "base-uri" + attribute so you can profit from the power of URI resolvers. + +

    A CID-keyed font (Type 0, double-byte outline font) configuration is much the same as an outline font. + However, the characterset definition is now required within the afp-font element.

    + + + + +]]> +

    +Note that the value of the encoding attribute in the example is the double-byte encoding 'UnicodeBigUnmarked' (UTF-16BE). +

    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 + available the base-uri 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, all manually configured fonts are embedded, unless they are matched in the + referenced-fonts section of the configuration file. + However, the default fonts shown above will not be embedded. +

    +
    +
    + Output Resolution +

    By default the AFP Renderer creates output with a resolution of 240 dpi. + This can be overridden by the <renderer-resolution/> configuration element. Example:

    + 240]]>
    Images

    By default the AFP Renderer converts all images to 8 bit grey level. - This can be overridden by the <images> configuration element. Example:

    + 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.

    + ]]> -

    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.

    +

    When the native attribute is specified and set to "true", all image resources will be natively injected + into the datastream using an object container rather than being converted into an IOCA FS45 image. + Support for native image formats (e.g. JPEG, TIFF, GIF) is not always available on printer implementations + so by default this configuration option is set to "false".

    +

    + Setting cmyk="true" on the images element will enable CMYK + colors. This will only have an effect if the color mode is set to "color". Example: +

    + ]]> +

    + When the color mode is set to 1 bit (bi-level), the "dithering-quality" attribute can + be used to select the level of quality to use when converting images to bi-level images. + Valid values for this attribute are floating point numbers from 0.0 (fastest) to + 1.0 (best), or special values: "minimum" (=0.0), "maximum" (1.0), + "medium" (0.5, the default). For the higher settings to work as expected, JAI needs to + be present in the classpath. If JAI is present, 0.0 results in a minimal darkness-level + switching between white and black. 0.5 does bayer-based dithering and 1.0 will use + error-diffusion dithering. The higher the value, the higher the quality and the slower + the processing of the images. +

    + ]]> +
    +
    + Shading +

    + By default, filled rectangles are painted using their given color using a PTOCA I-axis rule + (DIR). But not all environments handle these colors correctly. That's why a setting is + supported that paints the rectangles using an ordered dither pattern (bi-level) with + an inline IOCA FS10 image that is used together with the "replicate and trim" mapping. + The optional "shading" element can be used to control the shading mode. Its default value + is "color". To enable the dithered mode, use "dithered". Example: +

    + dithered +]]> +
    +
    + Resource Group File +

    By default the AFP Renderer will place all data resource objects such as images within + the document of the main output datastream. An external resource group file where document resources + may be specified with the <resource-group-file/> configuration element. Example:

    + external_resources.afp +]]> + Be careful when using this option not to overwrite existing resource files from previous rendering runs. +
    +
    + Resource Level Defaults +

    + By default, bitmap image objects (or page segments derived from them) are put in the + print-file-level resource group and GOCA graphics are inlined for compatibility with + the AFP Workbench tool. +

    +

    + It is possible to override these defaults, either per image (see the + afp:resource-level + extension attribute below) or by specifying different defaults in the configuration: +

    + ]]> +

    + "goca" refers to GOCA graphics and "bitmap" refers to IOCA images. The possible values + for the attributes are "inline" and "print-file". In the future, + additional possibilities may be added. +

    @@ -552,21 +794,22 @@ out = proc.getOutputStream();]]> xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp"> ]]>
    - Page Overlay Extension + Page Overlay (IPO) Extension

    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.

    + must be known in the AFP processing environment. Optional x and y attributes can be specified + to place the Overlay at an offset from the top left of the page.

    - Page Segment Extension + Page Segment (IPS) Extension

    The include-page-segment extension element allows to define resource substitution for fo:external-graphics elements. Example:

    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 effect here is that whenever FOP encounters the URI specified in the extension, + it will effectively generate code to include the page segment with the given name + instead of embedding the image referenced by the URI. The URI is still required as + the underlying image serves as a provider for the intrinsic size of the image + (At the moment, FOP is unable to extract the intrinsic size of the page segment from + an AFP resource file). For the image to appear in an AFP viewer or to be printed, the + AFP resource must be available on the target device. FOP does not embed the page + segment in the generated file. Please also note that page segments cannot be scaled. + They are always rendered in their intrinsic size. +

    - Tag Logical Element Extension -

    The tag-logical-element extension element allows to injects TLEs into the AFP output stream. Example: - Example:

    + Tag Logical Element (TLE) Extension +

    The tag-logical-element extension element allows to injects TLEs into the AFP output stream. Example:

    @@ -601,12 +854,128 @@ out = proc.getOutputStream();]]> + [..] + + + + [..] +]]> +

    + The tag-logical-element extension element can appear within a simple-page-master + (page level) or it can appear as child of page-sequence (page group level). + Multiple tag-logical-element extension elements within a simple-page-master or + page-sequence are allowed. The name and value attributes are mandatory. +

    +
    +
    + No Operation (NOP) Extension +

    The no-operation extension provides the ability to carry up to 32K of comments or any other type + of unarchitected data into the AFP output stream. Example:

    + + + + insert up to 32k of character data here! + + ]]> -

    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. +

    The no-operation extension element can only occur within a simple-page-master. + Multiple no-operation extension elements within a simple-page-master are allowed. + The name attribute is mandatory.

    +
    + Invoke Medium Map (IMM) Extension +

    + The invoke-medium-map extension allows to generate IMM fields (Invoke Medium Map) in the + generated AFP output. Example: +

    + + [..] + + + + [..] +]]> +

    + The invoke-medium-map element is allowed as child of fo:page-sequence (page group + level) or fo:simple-page-master. It is NOT supported on document level (fo:root), yet. + FOP also doesn't support specifying medium maps inside XML (using BMM/EMM). It can + only reference an existing medium map by name. The medium map has to be constructed + through different means and available on the target platform. +

    +
    +
    + Form Maps/Defs +

    + Apache FOP supports embedding an external form map resource in the + generated AFP output. This is done using the afp:include-form-map + extension. An example: +

    + + [..] + + + +]]> +

    + The afp:include-form-map is to be placed as a direct child of + fo:declarations. The name is an AFP resource name + (max. 8 characters) and the src attribute is the URI identifying the + external form map resource. When such a form map is embedded, you can use the + afp:invoke-medium-map extension (described above) to invoke any medium + map included in the form map. +

    + + Apache FOP doesn't support a way to define a form map or medium map using XML means + inside an XSL-FO document. You will have to build the form map with some third-party + tool. + +
    +
    +
    + Foreign Attributes +
    + Resource +

    The resource foreign attributes provides the ability to name and control where data object resources + (e.g. images/scalable vector graphics) will reside in the AFP output. + The afp foreign attributes are only used in conjuntion with <fo:external-graphic/> and <instream-foreign-object/>. + Example:

    + + ... + + + + + + + + + + + + + + +]]> +

    The resource-level attribute where the resource object will reside in the AFP output datastream. + The possible values for this are "inline", "print-file" and "external". + When "external" is used a resource-group-file attribute must also be specified. + Please refer to the Resource Level Defaults + above to see what is used if the resource-level attribute is not specified. +

    +

    +
    @@ -614,13 +983,37 @@ out = proc.getOutputStream();]]>

    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 + attempt to contain as much information from the XSL-FO document as + possible. It should be noted that is not possible (due to RTF's limitations) to map all + XSL-FO features to RTF. For complex documents, the RTF output will never reach the feature + level from PDF, for example. Thus, using RTF output is only recommended for simple documents + such as letters. +

    +

    + The RTF output follows Microsoft's RTF specifications and produces best results on Microsoft Word.

    RTF output is currently unmaintained and lacks many features compared to other output formats. Using other editable formats like Open Document Format, instead of producing XSL-FO then RTF through FOP, might give better results. +

    + These are some known restrictions compared to other supported output formats (not a complete list): +

    +
      +
    • + Not supported/implemented: +
        +
      • break-before/after (supported by the RTF library but not tied into the RTFHandler)
      • +
      • fo:page-number-citation-last
      • +
      • keeps (supported by the RTF library but not tied into the RTFHandler)
      • +
      • region-start/end (RTF limitation)
      • +
      • multiple columns
      • +
      +
    • +
    • Only a single page-master is supported
    • +
    • Not all variations of fo:leader are supported (RTF limitation)
    • +
    • percentages are not supported everywhere
    • +
    XML (Area Tree XML) @@ -653,6 +1046,16 @@ out = proc.getOutputStream();]]> 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.

    +
    Bitmap (TIFF/PNG) @@ -664,8 +1067,13 @@ out = proc.getOutputStream();]]>

    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. + page. Note: FOP can only produce multiple files (with PNG output) if + you can set a java.io.File indicating the primary PNG file + using the FOUserAgent.setOutputFile(File) method. +

    +

    + The quality of the bitmap depends on the target resolution setting + on the FOUserAgent and on further settings described below.

    Configuration @@ -673,15 +1081,52 @@ out = proc.getOutputStream();]]> The TIFF and PNG renderer configuration currently allows the following settings:

    + rgba true + white + true + quality ]]>

    - 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, + The default value for the "color-mode" setting is "rgba" which + is equivalent to a 24bit RGB image with an 8bit alpha channel for transparency. + Valid values are: +

    +
      +
    • rgba: RGB with alpha channel (24bit + 8bit = 32bit)
    • +
    • rgb: RGB (24bit)
    • +
    • gray: gray (8bit)
    • +
    • bi-level (or binary): bi-level (1bit)
    • +
    +

    + Please note that there is currently no dithering or error diffusion available for bi-level + bitmap output. +

    +

    + 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.

    +

    + The default value for the "background-color" setting is "white". + The color specifies in which color the page background is painted. It will only be + painted if "transparent-page-background" is not set to "true". + All XSL-FO colors (including color functions) can be used. +

    +

    + The default value for the "anti-aliasing" setting is "true". + You can set this value to "false" to disable anti-aliasing and + thus improve rendering speeds a bit at the loss of some image quality. +

    +

    + The default value for the "rendering" setting is "true". + You can set this value to "false" to improve rendering speeds a bit + at the loss of some image quality. If this setting has an actual effect depends + on the JVM's Java2D backend. +

    TIFF-specific Configuration @@ -702,17 +1147,22 @@ out = proc.getOutputStream();]]> actual codecs being available. Here is a list of possible values:

      -
    • NONE (no compression)
    • -
    • PackBits (RLE, run-length encoding)
    • -
    • JPEG
    • -
    • Deflate
    • -
    • LZW
    • -
    • ZLib
    • -
    • CCITT T.4 (Fax Group 3)
    • -
    • CCITT T.6 (Fax Group 4)
    • +
    • NONE (no compression)
    • +
    • PackBits (RLE, run-length encoding)
    • +
    • JPEG
    • +
    • Deflate
    • +
    • LZW
    • +
    • ZLib
    • +
    • CCITT T.4 (Fax Group 3)
    • +
    • CCITT T.6 (Fax Group 4)
    +

    + This setting may override any setting made using the "color-mode". For example, if + "CCITT T.6" is selected, the color mode is automatically forced to "bi-level" because + this compression format only supports bi-level images. +

    - If you want to use CCITT compression, please make sure you've got a J2SE 1.4 or later and + If you want to use CCITT compression, please make sure you've got Java Advanced Imaging Image I/O Tools @@ -721,6 +1171,17 @@ out = proc.getOutputStream();]]> Deflate and JPEG compression for writing.
    +
    + Runtime Rendering Options +

    + The IF-based bitmap output implementations support a rendering option with the key + "target-bitmap-size" (value: java.awt.Dimension) that allows to force the pages to + be proportionally fit into a bitmap of a given size. This can be used to produce + thumbnails or little preview images of the individual pages. An example: +

    + +
    TXT @@ -803,3 +1264,5 @@ out = proc.getOutputStream();]]> + + diff --git a/src/documentation/content/xdocs/0.94/pdfa.xml b/src/documentation/content/xdocs/1.0/pdfa.xml similarity index 87% rename from src/documentation/content/xdocs/0.94/pdfa.xml rename to src/documentation/content/xdocs/1.0/pdfa.xml index 1b3b75561..db5f56482 100644 --- a/src/documentation/content/xdocs/0.94/pdfa.xml +++ b/src/documentation/content/xdocs/1.0/pdfa.xml @@ -28,9 +28,6 @@
    Overview - - Support for PDF/A is available beginning with version 0.92. -

    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 @@ -56,8 +53,9 @@ 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. + PDF/A-1a is based on PDF-A-1b and adds accessibility features + (such as Tagged PDF). This format is available within the limitation described on + the Accessibility page.

    @@ -67,6 +65,9 @@ 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.

    +

    + PDF/A-1a is enabled by specifying "-pdfprofile PDF/A-1a". +

    Usage (embedded) @@ -83,6 +84,9 @@ Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent); If one of the validation rules of PDF/A is violated, an PDFConformanceException (descendant of RuntimeException) is thrown.

    +

    + For PDF/A-1a, just use the string "PDF/A-1a" instead of "PDF/A-1b". +

    PDF/A in Action @@ -121,12 +125,17 @@ Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent); embedded in clear text so non-PDF-aware applications can extract the XMP metadata. + + There are additional requirements if you want to enabled PDF/A-1a (Tagged PDF). This is + particularly the specification of the natural language and alternative descriptions for + images. Please refer to the Accessibility page for details. +
    PDF profile compatibility

    - The PDF profiles "PDF/X-3:2003" and "PDF/A-1b" are compatible and can both be - activated at the same time. + The PDF profiles "PDF/X-3:2003" and "PDF/A-1b" (or "PDF/A-1a") are compatible and can + both be activated at the same time.

    diff --git a/src/documentation/content/xdocs/0.94/pdfencryption.xml b/src/documentation/content/xdocs/1.0/pdfencryption.xml similarity index 97% rename from src/documentation/content/xdocs/0.94/pdfencryption.xml rename to src/documentation/content/xdocs/1.0/pdfencryption.xml index c8cdbb29c..22d965057 100644 --- a/src/documentation/content/xdocs/0.94/pdfencryption.xml +++ b/src/documentation/content/xdocs/1.0/pdfencryption.xml @@ -204,15 +204,13 @@ Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent);

    1. - Download the binary distribution for your JDK version. If you have JDK - 1.3 or earlier you must also download a JCE from the same page. + Download the binary distribution for your JDK version.
    2. Unpack the distribution. Add the jar file to your classpath. A convenient way to use the jar on Linux is to simply drop it into the FOP lib directory, it will be automatically picked up by - fop.sh. If you have JDK 1.3 or earlier don't forget to - install the JCE as well. + fop.sh.
    3. Open the java.security file and add
      diff --git a/src/documentation/content/xdocs/0.94/pdfx.xml b/src/documentation/content/xdocs/1.0/pdfx.xml similarity index 97% rename from src/documentation/content/xdocs/0.94/pdfx.xml rename to src/documentation/content/xdocs/1.0/pdfx.xml index 342a0ca4c..cf796c74d 100644 --- a/src/documentation/content/xdocs/0.94/pdfx.xml +++ b/src/documentation/content/xdocs/1.0/pdfx.xml @@ -28,8 +28,8 @@
      Overview - Support for PDF/X was made available beginning with version 0.93. - This feature is new and may not be 100% complete, yet. Feedback is welcome. + Support for PDF/X is available beginning with version 0.93. This feature is new and + may not be 100% complete, yet. Feedback is welcome.

      PDF/X is a standard which faciliates prepress digital data exchange using PDF. diff --git a/src/documentation/content/xdocs/0.94/running.xml b/src/documentation/content/xdocs/1.0/running.xml similarity index 71% rename from src/documentation/content/xdocs/0.94/running.xml rename to src/documentation/content/xdocs/1.0/running.xml index c09f35fee..757e7aaa4 100644 --- a/src/documentation/content/xdocs/0.94/running.xml +++ b/src/documentation/content/xdocs/1.0/running.xml @@ -28,21 +28,24 @@ System Requirements

      The following software must be installed:

        -
      • Java 1.3.x or later Runtime Environment.
      • - Apache FOP. The FOP distribution includes all libraries that you will - need to run a basic FOP installation. These can be found in the [fop-root]/lib directory. These - libraries include the following: + Java 1.4.x or later Runtime Environment.
        • - A JAXP-compatible XML Parser (FOP comes with Apache Xerces-J). -
        • -
        • - A JAXP-compatible XSLT Processor (FOP comes with Apache Xalan-J). + Many JREs >=1.4 contain older JAXP implementations (which often contain bugs). It's + usually a good idea to replace them with a current implementation.
        • +
        +
      • +
      • + Apache FOP. The FOP distribution includes all libraries that you will + need to run a basic FOP installation. These can be found in the [fop-root]/lib directory. These + libraries include the following: +
      • @@ -51,8 +54,7 @@
        • Graphics libraries. Generally, FOP contains direct support for the most important - bitmap image formats (including PNG, TIFF, JPEG and GIF). If you're using JDK 1.3, - you may need additional packages to get GIF images to work. See + bitmap image formats (including PNG, JPEG and GIF). See FOP: Graphics Formats for details.
        • @@ -62,7 +64,7 @@

          In addition, the following system requirements apply:

          • - If you will be using FOP to process SVG, you must do so in a graphical environment. + If you will be using FOP to process SVG, you must do so in a graphical environment. See FOP: Graphics (Batik) for details.
          @@ -72,19 +74,19 @@
          Instructions

          - Basic FOP installation consists of first unzipping the .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 + Basic FOP installation consists of first unzipping the .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.

          Problems

          - 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 + 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 tar -xzf instead.

          @@ -94,30 +96,31 @@
          Using the fop script or batch file

          - The usual and recommended practice for starting FOP from the command line is to run the + 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). - These scripts 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 + These scripts 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 /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 + 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.

          - [OPTIONS] - -d debug mode - -x dump configuration settings - -q quiet mode + [OPTIONS] + -version print FOP version and exit + -d debug mode + -x dump configuration settings + -q quiet mode -c cfg.xml use additional configuration file cfg.xml - -l lang the language to use for user information + -l lang the language to use for user information -r relaxed/less strict validation (where available) -dpi xxx target resolution in dots per inch (dpi) where xxx is a number -s for area tree XML, down to block areas only - -v to show FOP version being used + -v run in verbose mode (currently simply print FOP version and continue) -o [password] PDF file will be encrypted with option owner password -u [password] PDF file will be encrypted with option user password @@ -125,62 +128,73 @@ Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl -nocopy PDF file will be encrypted without copy content permission -noedit PDF file will be encrypted without edit content permission -noannotations PDF file will be encrypted without edit annotation permission + -a enables accessibility features (Tagged PDF etc., default off) -pdfprofile prof PDF file will be generated with the specified profile (Examples for prof: PDF/A-1b or PDF/X-3:2003) - [INPUT] - infile xsl:fo input file (the same as the next) - -fo infile xsl:fo input file - -xml infile xml input file, must be used together with -xsl - -atin infile area tree input file - -xsl stylesheet xslt stylesheet - + -conserve Enable memory-conservation policy (trades memory-consumption for disk I/O) + (Note: currently only influences whether the area tree is serialized.) + + [INPUT] + infile xsl:fo input file (the same as the next) + (use '-' for infile to pipe input from stdin) + -fo infile xsl:fo input file + -xml infile xml input file, must be used together with -xsl + -atin infile area tree input file + -ifin infile intermediate format input file + -imagein infile image input file (piping through stdin not supported) + -xsl stylesheet xslt stylesheet + -param name value to use for parameter in xslt stylesheet (repeat '-param name value' for each parameter) - - [OUTPUT] + + -catalog use catalog resolver for input XML and XSLT files + [OUTPUT] outfile input will be rendered as PDF into outfile + (use '-' for outfile to pipe output to stdout) -pdf outfile input will be rendered as PDF (outfile req'd) -pdfa1b outfile input will be rendered as PDF/A-1b compliant PDF (outfile req'd, same as "-pdf outfile -pdfprofile PDF/A-1b") - -awt input will be displayed on screen + -awt input will be displayed on screen -rtf outfile input will be rendered as RTF (outfile req'd) - -pcl outfile input will be rendered as PCL (outfile req'd) - -ps outfile input will be rendered as PostScript (outfile req'd) + -pcl outfile input will be rendered as PCL (outfile req'd) + -ps outfile input will be rendered as PostScript (outfile req'd) -afp outfile input will be rendered as AFP (outfile req'd) -tiff outfile input will be rendered as TIFF (outfile req'd) -png outfile input will be rendered as PNG (outfile req'd) - -txt outfile input will be rendered as plain text (outfile req'd) - -at [mime] out representation of area tree as XML (outfile req'd) - specify optional mime output to allow AT to be converted + -txt outfile input will be rendered as plain text (outfile req'd) + -at [mime] out representation of area tree as XML (outfile req'd) + specify optional mime output to allow the AT to be converted + to final format later + -if [mime] out representation of document in intermediate format XML (outfile req'd) + specify optional mime output to allow the IF to be converted to final format later - -print input file will be rendered and sent to the printer - see options with "-print help" + -print input file will be rendered and sent to the printer + see options with "-print help" -out mime outfile input will be rendered using the given MIME type (outfile req'd) Example: "-out application/pdf D:\out.pdf" (Tip: "-out list" prints the list of supported MIME types) - -mif outfile input will be rendered as MIF (FrameMaker) (outfile req'd) - Experimental feature - requires additional fop-sandbox.jar. - -svg outfile input will be rendered as an SVG slides file (outfile req'd) + -svg outfile input will be rendered as an SVG slides file (outfile req'd) Experimental feature - requires additional fop-sandbox.jar. - -foout outfile input will only be XSL transformed. The intermediate - XSL-FO file is saved and no rendering is performed. + -foout outfile input will only be XSL transformed. The intermediate + XSL-FO file is saved and no rendering is performed. (Only available if you use -xml and -xsl parameters) [Examples] - Fop foo.fo foo.pdf - Fop -fo foo.fo -pdf foo.pdf (does the same as the previous line) - Fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf - Fop -xml foo.xml -xsl foo.xsl -foout foo.fo - Fop foo.fo -mif foo.mif - Fop foo.fo -rtf foo.rtf - Fop foo.fo -print or Fop -print foo.fo - Fop foo.fo -awt]]> + fop foo.fo foo.pdf + fop -fo foo.fo -pdf foo.pdf (does the same as the previous line) + fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf + fop -xml foo.xml -xsl foo.xsl -foout foo.fo + fop -xml - -xsl foo.xsl -pdf - + fop foo.fo -mif foo.mif + fop foo.fo -rtf foo.rtf + fop foo.fo -print + fop foo.fo -awt]]>

          - PDF encryption is only available if FOP was compiled with encryption support - and if compatible encryption support is available at run time. + PDF encryption is only available if FOP was compiled with encryption support + and if compatible encryption support is available at run time. Currently, only the JCE is supported. Check the Details.

          @@ -192,8 +206,8 @@ Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl org.apache.fop.cli.Main <arguments>. The arguments consist of the options and infile and outfile specifications as shown above for the standard scripts. You may wish to review - the standard scripts to make sure that - you get your environment properly configured. + the standard scripts to make sure that + you get your environment properly configured.

      @@ -214,7 +228,7 @@ Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl directory in a single directory. If you use hyphenation, you must also put fop-hyph.jar in that directory.

      -

      In both cases the arguments consist of the options and +

      In both cases the arguments consist of the options and infile and outfile specifications as shown above for the standard scripts.

      @@ -222,65 +236,65 @@ Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl FOP's dynamical classpath construction

      If FOP is started without a proper classpath, it tries to - add its dependencies dynamically. If the system property - fop.home contains the name of a directory, then - FOP uses that directory as the base directory for its - search. Otherwise the current working directory is the base - directory. If the base directory is called build, - then its parent directory becomes the base directory.

      + add its dependencies dynamically. If the system property + fop.home contains the name of a directory, then + FOP uses that directory as the base directory for its + search. Otherwise the current working directory is the base + directory. If the base directory is called build, + then its parent directory becomes the base directory.

      FOP expects to find fop.jar in the - build subdirectory of the base directory, and - adds it to the classpath. Subsequently FOP adds all - jar files in the lib directory to the - classpath. The lib directory is either the lib - subdirectory of the base directory, or, if that does not - exist, the base directory itself.

      + build subdirectory of the base directory, and + adds it to the classpath. Subsequently FOP adds all + jar files in the lib directory to the + classpath. The lib directory is either the lib + subdirectory of the base directory, or, if that does not + exist, the base directory itself.

      If the system property fop.optional.lib - contains the name of a directory, then all jar - files in that directory are also added to the classpath. See - the methods getJARList and - checkDependencies in - org.apache.fop.cli.Main.

      + contains the name of a directory, then all jar + files in that directory are also added to the classpath. See + the methods getJARList and + checkDependencies in + org.apache.fop.cli.Main.

    Using Xalan to Check XSL-FO Input

    - 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 + 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 + 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 + 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 + 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 + 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.

    The user is always responsible to provide correct XSL-FO code to FOP.

    - 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 + 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)

    - When asking for help on the FOP mailing lists, never attach XML and - XSL to illustrate the issue. Always run the XSLT step (-foout) and send the - resulting XSL-FO file instead. Of course, be sure that the XSL-FO file is + When asking for help on the FOP mailing lists, never attach XML and + XSL to illustrate the issue. Always run the XSLT step (-foout) and send the + resulting XSL-FO file instead. Of course, be sure that the XSL-FO file is correct before sending it.

    - The -foout option works the same way as if you would call the + The -foout option works the same way as if you would call the Xalan command-line:

    @@ -302,39 +316,39 @@ Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl

    • - Increase memory available to the JVM. See - the -Xmx option + Increase memory available to the JVM. See + the -Xmx option for more information. - It is usually unwise to increase the memory allocated to the JVM beyond the amount of + It is usually unwise to increase the memory allocated to the JVM beyond the amount of physical RAM, as this will generally cause significantly slower performance.
    • Avoid forward references. Forward references are references to some later part of a document. - Examples include page number citations which refer to pages which follow the citation, - tables of contents at the beginning of a document, and page numbering schemes that - include the total number of pages in the document + Examples include page number citations which refer to pages which follow the citation, + tables of contents at the beginning of a document, and page numbering schemes that + include the total number of pages in the document ("page N of TOTAL"). - Forward references cause all subsequent pages to be held in memory until the reference + Forward references cause all subsequent pages to be held in memory until the reference can be resolved, i.e. until the page with the referenced element is encountered. - Forward references may be required by the task, but if you are getting a memory + Forward references may be required by the task, but if you are getting a memory overflow, at least consider the possibility of eliminating them. - A table of contents could be replaced by PDF bookmarks instead or moved to the end of + A table of contents could be replaced by PDF bookmarks instead or moved to the end of the document (reshuffle the paper could after printing).
    • Avoid large images, especially if they are scaled down. If they need to be scaled, scale them in another application upstream from FOP. - For many image formats, memory consumption is driven mainly by the size of the image - file itself, not its dimensions (width*height), so increasing the compression rate + For many image formats, memory consumption is driven mainly by the size of the image + file itself, not its dimensions (width*height), so increasing the compression rate may help.
    • Use multiple page sequences. FOP starts rendering after the end of a page sequence is encountered. - While the actual rendering is done page-by-page, some additional memory is + While the actual rendering is done page-by-page, some additional memory is freed after the page sequence has been rendered. This can be substantial if the page sequence contains lots of FO elements.
    • diff --git a/src/documentation/content/xdocs/0.94/servlets.xml b/src/documentation/content/xdocs/1.0/servlets.xml similarity index 99% rename from src/documentation/content/xdocs/0.94/servlets.xml rename to src/documentation/content/xdocs/1.0/servlets.xml index 119ac701e..07c22312d 100644 --- a/src/documentation/content/xdocs/0.94/servlets.xml +++ b/src/documentation/content/xdocs/1.0/servlets.xml @@ -161,7 +161,7 @@ public void init() throws ServletException {
      • Instead of java.io.ByteArrayOutputStream consider using the ByteArrayOutputStream - implementation from the Jakarta Commons IO project which allocates less memory. + implementation from the Jakarta Commons IO project which allocates less memory. The full class name is: org.apache.commons.io.output.ByteArrayOutputStream
      • diff --git a/src/documentation/content/xdocs/0.94/upgrading.xml b/src/documentation/content/xdocs/1.0/upgrading.xml similarity index 82% rename from src/documentation/content/xdocs/0.94/upgrading.xml rename to src/documentation/content/xdocs/1.0/upgrading.xml index a7d27cd1c..9f5879174 100644 --- a/src/documentation/content/xdocs/0.94/upgrading.xml +++ b/src/documentation/content/xdocs/1.0/upgrading.xml @@ -31,8 +31,10 @@

        • - More than half of the codebase has been rewritten over the last three years. With version 0.93 the code has reached production level, and - the tradition continues with version 0.94. + More than half of the codebase has been rewritten over the + last three years. With version 0.93 the code has reached + production level, and continues to improve with + version 0.94.
        • The API of FOP has changed considerably and is not @@ -48,18 +50,17 @@
        • If you are using a configuration file for version 0.20.5, you have to rebuild it in the new format. The format - of the configuration files has changed since version 0.20.5. See conf/fop.xconf for + of the configuration files has changed since version 0.20.5. See conf/fop.xconf for an example configuration file. A XML Schema file can be found under - src/foschema/fop-configuration.xsd. + src/foschema/fop-configuration.xsd.
        • - If you are using font metrics files for version 0.20.5 or - 0.92 or earlier, you have to regenerate them in the new - format. The new format is characterized by a version - attribute on the top-level font-metrics element, whose value - is 2.0. The absence of a version attribute will be - interpreted as version 1.0, and such metrics files will no - longer be parsed. + Beginning with version 0.94 you can skip the generation of + font metric files and remove the "font-metrics" attribute + in the font configuration. In the unlikely case that due to + a bug you still need to use font metrics files you will need + to regenerate the font metrics file if yours are from a FOP + version before 0.93.
        • @@ -69,7 +70,7 @@

          While FOP 0.20.5 allowed you to have empty fo:table-cell elements, the new code - will complain about that (unless relaxed validation is enabled via the -r switch via the command line) because the specification + will complain about that (unless relaxed validation is enabled) because the specification demands at least one block-level element ((%block;)+, see XSL-FO 1.1, 6.7.10) inside an fo:table-cell element. @@ -121,11 +122,6 @@ The fox:outline extension is not implemented in this version anymore. It has been superseded by the new bookmark elements from XSL-FO 1.1.
        • -
        • - The fox:destination extension is also not implemented in this version - although it may be added in the future. See also - Bug 37157. -
    diff --git a/src/documentation/content/xdocs/dev/release.xml b/src/documentation/content/xdocs/dev/release.xml index 264bac957..8b82c9111 100644 --- a/src/documentation/content/xdocs/dev/release.xml +++ b/src/documentation/content/xdocs/dev/release.xml @@ -37,17 +37,26 @@ The purpose of documenting it here is to facilitate consistency, ensure that the
  • Determine whether further testing is required.
  • Commit any outstanding changes
  • Create a branch called branches/fop-v_vv
  • -
  • Edit release notes (README and status.xml in the root).
  • +
  • Edit release notes (README and + status.xml in the root).
  • +
  • Add the release to news-data.xml; + remove links to release notes of older versions from this file.
  • +
  • Update the FAQ (faq.xml) to the new release.
  • Check and update the copyright year in NOTICE and build.xml.
  • -
  • Update the index.xml, site.xml and download.xml for the new version.
  • +
  • Update the file doap.rdf, and the files + index.xml, site.xml, + download.xml, fo.xml, + maillist.xml, quickstartguide.xml, + faq.xml and status.xml + in directory xdocs for the new version.
  • Update the version numbers in the release column on the compliance page (compliance.xml); update the compliance in the release column to the current state (development column).
  • Update version number in build.xml (not to be merged back into trunk).
  • Copy trunk documentation directory to a new directory with - the version number, and update any links and the .htaccess - file for redirections.
  • + the new version number, and update the .htaccess file for + redirections.
  • Copy test/fotree/disabled-testcases.xml and test/layoutengine/disabled-testcases.xml to the new version directory @@ -55,17 +64,19 @@ The purpose of documenting it here is to facilitate consistency, ensure that the <version>/layoutengine/disabled-testcases.xml. Copy known-issues.xml to the new version directory. Copy knownissues-overview.xml from the - previous to the new version directory.
  • + current to the new version directory, and update the xi:include + links in it. +
  • Update the tab names and directories in tabs.xml
  • Delete the previous version directory.
  • Build the dist files (build[.sh] dist) and upload them to your web directory on people.apache.org
  • Ask on fop-dev to check the branch and the generated dist files for errors.
  • -
  • Tag the source tree with the release ID. For example, if the release is 0.94: - svn copy https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_94 https://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-0_94
  • +
  • Tag the source tree with the release ID. For example, if the release is 1.0: + svn copy https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-1_0 https://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_0
  • Make a fresh checkout with the just created tag: - svn co https://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-0_94
  • + svn co https://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_0
  • Copy jimi and jai to lib/ (jimi-1.0.jar, jai_core.jar, jai_codec.jar)
  • Copy jce-jdk13-119.jar from from http://www.bouncycastle.org/latest_releases.html to lib/
  • @@ -75,15 +86,15 @@ The purpose of documenting it here is to facilitate consistency, ensure that the
  • Alternatively, create a build-local.properties file that points to the above libs.
  • Run build[.sh] dist. Do this using Sun JDK 1.4.2_08 or later. A Forrest installation is needed.
  • Create signatures. Don't forget to upload your KEY: - gpg -a -b --force-v3-sigs fop-0.94-src.tar.gz etc.
  • + gpg -a -b --force-v3-sigs fop-1.0-src.tar.gz etc.
  • Upload the dist and signature files to your web directory on people.apache.org (An account on minotaur is needed): - scp fop-0.94*.tar.gz* + scp fop-1.0*.tar.gz* chrisg@people.apache.org:public_html/
  • Check permissions: chmod 664 ... ; chgrp xmlgraphics ...
  • -
  • Add MD5 sums: md5 fop-0.94-src.tar.gz > - fop-0.94-src.tar.gz.md5 etc.
  • +
  • Add MD5 sums: md5 fop-1.0-src.tar.gz > + fop-1.0-src.tar.gz.md5 etc.
  • Make a test download.
  • Start a vote for the release on general@xmlgraphics.a.o. The message should point diff --git a/src/documentation/content/xdocs/examples.xml b/src/documentation/content/xdocs/examples.xml index 296b7550c..5df3c5804 100644 --- a/src/documentation/content/xdocs/examples.xml +++ b/src/documentation/content/xdocs/examples.xml @@ -82,7 +82,7 @@

    Developers will find the first steps to a test suite for all implemented -formatting objects and properties in xml-fop/test/xml/. +formatting objects and properties in test/xml in the source distribution.

    diff --git a/src/documentation/content/xdocs/faq.xml b/src/documentation/content/xdocs/faq.xml index f320df28d..87ce1c167 100644 --- a/src/documentation/content/xdocs/faq.xml +++ b/src/documentation/content/xdocs/faq.xml @@ -136,14 +136,13 @@ When is the next released planned?

    - When it's ready and the committers have enough time to go through - the time-consuming process of creating a release. We - released version 0.95 on August 6th, 2008, and intend to - release version 1.0 once we consider it "feature complete", major - work is still in progress regarding page flows with changing page width - (changing IPD, to be precise). If you - want to speed up the process, consider - contributing to FOP.

    + When it's ready and the committers have enough time to go + through the time-consuming process of creating a release. We + released version 1.0 in July 2010, and will release version + 1.1 when we accumulated enough additions and bug fixes. If + you want to speed up the process, consider contributing to + FOP.

    @@ -198,10 +197,8 @@

    If you are running FOP from the command line:

    • - Use the fop.bat, fop or fop.sh command file from the FOP - distribution. If you have a FOP version older than 0.20.5, - ensure the directory where FOP and these files have been - installed is the current working directory. + Use the command file fop.bat, fop.cmd or fop.js on MS Windows, or fop on Unix/Linux from the FOP + distribution.
    • If this doesn't help, check whether still all the jar files @@ -213,7 +210,7 @@ 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 to servlet engines + href="1.0/servlets.html#servlet-engine">servlet engines for further hints.

      @@ -243,7 +240,7 @@ I get an OutOfMemoryException.

      - See FOP Memory. + See FOP Memory.

      @@ -304,7 +301,7 @@

      If you use XSLT, problems in your style sheet and in your source XML also can produce a NullPointerException. Run the transformation + href="1.0/running.html#check-input">Run the transformation separately to check for this, usually you'll get a detailed error message from the XSLT processor.

      @@ -382,7 +379,7 @@

      Try also setting the font-base + href="1.0/configuration.html#general-elements">font-base configuration.

      @@ -443,7 +440,7 @@ public class DefaultErrorListener implements ErrorListener {

      To avoid the warning you can simply delete the old Font Cache file, which lives in ${base}\conf\font.cache (see font-base + href="1.0/configuration.html#general-elements">font-base configuration). Or you can disable Font Caching altogether using the option "use-cache."

      @@ -453,7 +450,7 @@ public class DefaultErrorListener implements ErrorListener { Problems with FOP output - Leaders don't work anymore in 0.94 or later. Instead of + Leaders don't work in current FOP. Instead of filling the line, only three dots or a short ruler is output. @@ -534,7 +531,7 @@ Check the following:

      Other possibilities:

      • The image format is not supported or not supported completely. - See FOP Graphics Formats for a + See FOP Graphics Formats for a list of supported formats and related issues.
      • The graphic may be too large to fit into the intended space.
      • There may be something (static content) that is obscuring the @@ -546,14 +543,14 @@ Check the following:

        My graphical images do not work properly. -

        See FOP Graphics Formats for a +

        See FOP Graphics Formats for a list of supported graphics formats and related issues.

        Why is my graphic rendered at a different resolution than it was created? -

        See Graphics Resolution.

        +

        See Graphics Resolution.

        @@ -561,16 +558,11 @@ Check the following:

        don't work.

        - These properties are not implemented on version 0.20.5 and earlier, - except on table rows. More recent FOP releases have extensive support for - these properties. The current release, FOP 0.95, still supports the + Current FOP releases have extensive support for + these properties. The current release, FOP 1.0, still supports the values "always" and "never" only, no numerical values. There may be a few places where keep-* still don't work, this should be very rare.

        -

        - If you still have to use FOP 0.20.5, you have to nest stuff to be - kept together in a table. -

        The concept is called “blind table”. The table is used for pure layout reasons and is not obvious in the output. @@ -604,9 +596,7 @@ Check the following:

        My tables are missing, or missing their content.

        - Check for fo:table-body around the rows. FOP up to 0.20.4 doesn't - raise an error if it is omitted, it just drops the content. More - recent releases will catch this problem. + Check for fo:table-body around the rows. Usually FOP will catch this problem.

        Also, the fo:table-with-caption element is not implemented, tables @@ -656,7 +646,7 @@ Check the following:

        - FOP 0.95 and FOP 0.94 behave differently when keep-together="always" + FOP behaves differently from earlier versions when keep-together="always" is set on table cells

        Support for inline-level keeps has been added in FOP 0.95, and setting @@ -712,7 +702,7 @@ Check the following:

        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):

        ]]>
        @@ -721,7 +711,6 @@ Check the following:

        When I use margins, my content in a nested table or block-containers gets indented twice. Is this a bug?

        - (Applies to version 0.90 and later) No, although you might easily think so. The problem has to do with property inheritance of the start-indent and end-indent properties to which the margin properties are mapped. Apache @@ -747,7 +736,7 @@ Check the following:

        than Java2D. These can lead to different layout decisions when the same document is rendered with different renderers. An alternative approach to fix this problem might be available but it hasn't been tested, yet. See also the - notes on fonts in the various output formats. + notes on fonts in the various output formats.

        @@ -758,7 +747,7 @@ Check the following:

        How do I use FOP in a servlet?

        - See Using FOP in a Servlet. + See Using FOP in a Servlet.

        @@ -767,7 +756,7 @@ Check the following:

        transformation?

        - See Using FOP in a Servlet with XSLT Transformation. + See Using FOP in a Servlet with XSLT Transformation.

        @@ -775,7 +764,7 @@ Check the following:

        How do I pass parameters to the XSLT transformation?

        - See Using FOP in a Servlet with XSLT Transformation. + See Using FOP in a Servlet with XSLT Transformation.

        @@ -793,7 +782,7 @@ Check the following:

        How do I set the baseDir property in a servlet environment?

        - See Setting the Configuration Programmatically. + See Setting the Configuration Programmatically.

        @@ -801,7 +790,7 @@ Check the following:

        How do I use a user configuration file from a servlet?

        - See Using a Configuration File in an Embedded App. + See Using a Configuration File in an Embedded App.

        @@ -810,7 +799,7 @@ Check the following:

        get FOP working for various servlet engines?

        - See Servlet Engines. + See Servlet Engines.

        @@ -818,7 +807,7 @@ Check the following:

        Can FOP be used in multithreaded environments?

        - See Multithreading FOP. + See Multithreading FOP.

        @@ -829,13 +818,13 @@ Check the following:

        The rendering of SVG text in my PDF is of poor quality. Can I control this? -

        See Placing SVG Text into PDF.

        +

        See Placing SVG Text into PDF.

        How do I use FOP with SVG on headless servers? -

        See FOP: Graphics (Batik).

        +

        See FOP: Graphics (Batik).

        @@ -898,14 +887,14 @@ Can I control this? Why is my SVG rendered at a size different from that specified in my fo:external-graphic element? -

        See SVG Scaling.

        +

        See SVG Scaling.

        FOP fails with something like "The attribute "width" of the element <rect> is required". What's wrong?

        - This phenomenon occurs since FOP 0.92 beta. It surfaced due to a change in the handling of non-FO namespaces. It's not a + This phenomenon is not a bug in FOP, but rather in the dependent packages: Apache Batik, Apache Xalan-J and SAXON. The bug in Apache Batik will be fixed in the next release. In the latest release of Apache Xalan-J, the bug is already fixed. It only occurs in the Xalan version bundled with Sun's JVM, because Sun uses a rather old version. @@ -931,7 +920,7 @@ Can I control this? How do I embed fonts in PDF?

        - See the Fonts page for information + See the Fonts page for information about embedding fonts.

        @@ -950,7 +939,7 @@ Can I control this? set. For a variety of reasons, even those are not completely guaranteed to work, for example you can't use the fi ligature from the standard serif font. Check the overview for the default + href="1.0/output.html#pdf-fonts">overview for the default PDF fonts.

        @@ -958,7 +947,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="1.0/fonts.html">embedding fonts.

        For most symbols, it is better to select the symbol font @@ -976,7 +965,7 @@ Can I control this? What tools are available for post-processing my PDF document? -

        See PDF Post-processing.

        +

        See PDF Post-processing.

        @@ -984,8 +973,8 @@ Can I control this? to my PDF document?

        - See PDF Encryption. - See also PDF Post-processing. + See PDF Encryption. + See also PDF Post-processing.

        @@ -993,13 +982,13 @@ Can I control this? How do I add document properties (title, author, etc.) to my PDF document? -

        See Metadata.

        +

        See Metadata.

        How do I add watermarks to my PDF document? -

        See PDF Watermarks.

        +

        See PDF Watermarks.

        @@ -1018,7 +1007,7 @@ Can I control this? How do I control the Acrobat bookmark display?

        - FOP versions 0.93 and later support the starting-state property of the XSL 1.1 + FOP supports the starting-state property of the XSL 1.1 fo:bookmark element which can be used for this. The color, font-style and font-weight properties on @@ -1035,7 +1024,7 @@ Can I control this?

        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.

        diff --git a/src/documentation/content/xdocs/fo.xml b/src/documentation/content/xdocs/fo.xml index d0e73f302..6546478c9 100644 --- a/src/documentation/content/xdocs/fo.xml +++ b/src/documentation/content/xdocs/fo.xml @@ -519,7 +519,7 @@ This applies similarly to the extent of the after region and the bottom margin o
        External Resources

        Resources needed by an XSL-FO file that are external to it (graphics, for example), are defined in the XSL-FO standard as being of type "uri-specification". This is defined in the standard at Section 5.11 Property Datatypes, which includes a link to the URI standard itself. Refer to the XSL-FO and URI standards themselves for more detailed instructions.

        -

        URIs may be either absolute or relative to a base URI. (See FOP: Configuration for information on setting the base URI for a FOP session). Here is an example referencing an external-graphic that is relative to the base URI:

        +

        URIs may be either absolute or relative to a base URI. (See FOP: Configuration for information on setting the base URI for a FOP session). Here is an example referencing an external-graphic that is relative to the base URI:

        ]]>

        Here is an example referencing an external-graphic that is an absolute URI on a local filesystem:

        ]]> diff --git a/src/documentation/content/xdocs/maillist.xml b/src/documentation/content/xdocs/maillist.xml index becc32464..93a6b6cbe 100644 --- a/src/documentation/content/xdocs/maillist.xml +++ b/src/documentation/content/xdocs/maillist.xml @@ -84,7 +84,7 @@ href="dev/index.html#mail-fop-dev">Development pages. source, or other semantic XML? If so, the question is almost certainly not appropriate to this list. In general, the only input documents that are appropriate on this list are XSL-FO snippets. See Running Xalan for instructions about capturing the XSL-FO document that is actually submitted to FOP. If you haven't examined the XSL-FO document yourself, then you are not yet prepared to formulate a FOP-specific question.
      • + href="1.0/running.html#check-input">Running Xalan for instructions about capturing the XSL-FO document that is actually submitted to FOP. If you haven't examined the XSL-FO document yourself, then you are not yet prepared to formulate a FOP-specific question.
      • If you are providing one or more XSL-FO snippets:
        • Have you reduced them to the shortest possible complete, self-contained document that demonstrates the problem? Please do so.
        • diff --git a/src/documentation/content/xdocs/news-data.xml b/src/documentation/content/xdocs/news-data.xml index 8d876ea95..6a221725f 100644 --- a/src/documentation/content/xdocs/news-data.xml +++ b/src/documentation/content/xdocs/news-data.xml @@ -17,6 +17,15 @@ --> + +

          + The Apache FOP team is delighted to present you a production grade + release of the new FOP codebase. This release + contains many bug fixes and new features. See the Release Notes for a list of + the most important changes. +

          +

          Welcome Pascal Sancho!

          @@ -47,8 +56,7 @@

          The Apache FOP team is pleased to present you the second production grade release of the new FOP codebase. This release contains many bug - fixes and new features. See the Release Notes for a list of + fixes and new features. See the Release Notes for a list of the most important changes.

          diff --git a/src/documentation/content/xdocs/quickstartguide.xml b/src/documentation/content/xdocs/quickstartguide.xml index 7993e4bde..4ea1d0110 100644 --- a/src/documentation/content/xdocs/quickstartguide.xml +++ b/src/documentation/content/xdocs/quickstartguide.xml @@ -29,15 +29,15 @@

          The goal of this Quick Start Guide is to help novice users get Apache FOP up and running quickly. Typically, you'll need to:

          1. Download FOP
          2. -
          3. Build FOP (you can skip this step if you download the binary distribution!)
          4. -
          5. Configure FOP
          6. -
          7. Run FOP
          8. +
          9. Build FOP (you can skip this step if you download the binary distribution!)
          10. +
          11. Configure FOP
          12. +
          13. Run FOP

          Here are some links to help you find out what FOP can do, as well as how and where to get help:

            -
          • Calling FOP from a Java Application
          • -
          • Using FOP in Servlets
          • -
          • Using FOP in an 'Ant' Build Script
          • +
          • Calling FOP from a Java Application
          • +
          • Using FOP in Servlets
          • +
          • Using FOP in an 'Ant' Build Script
          • XSL-FO Compliance (what FOP supports and what it doesn't)
          • FAQs
          • Getting Help
          • @@ -45,7 +45,7 @@

          Once you've familiarized yourself with the basics, you can get more detailed information, - in the detailed FOP product documentation. + in the detailed FOP product documentation.

    @@ -65,7 +65,7 @@
  • Get a command prompt in the <fop-home> directory and write:
    Windows: fop -fo examples/fo/basic/readme.fo -awt
    - Unix: ./fop.sh -fo examples/fo/basic/readme.fo -awt
    + Unix: ./fop -fo examples/fo/basic/readme.fo -awt
  • If all went well, this should open a window showing you a "readme"-style document. @@ -112,7 +112,7 @@ Finally, let's put the previous two steps together: Go back to the command prompt and enter the following command:
    Windows: fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf
    - Unix: ./fop.sh -xml name.xml -xsl name2fo.xsl -pdf name.pdf
    + Unix: ./fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf
  • You've produced your first PDF with Apache FOP! Please open name.pdf diff --git a/src/documentation/content/xdocs/relnotes.xml b/src/documentation/content/xdocs/relnotes.xml deleted file mode 100644 index 0037817bd..000000000 --- a/src/documentation/content/xdocs/relnotes.xml +++ /dev/null @@ -1,551 +0,0 @@ - - - - - -
    - Release Notes - $Revision$ -
    - - -
    - FOP 0.92 beta -

    - This is the third release after the big redesign effort. FOP 0.92 beta has now - stabilized the API. In addition it contains many bug fixes and new features. -

    -

    - We would like to encourage you to download the code and to play with it. - We're still in the process of stabilizing - the code. We welcome any feedback you might have and even more, any - other form of help to get the project forward. -

    -

    Caveats:

    -
      -
    • - This release is still a beta release. If you intend to use this software in a production - environment, please perform careful testing. -
    • -
    • - The API has changed between 0.91beta this release. - Please consult the "Upgrading" page for details. -
    • -
    • - You may experience different behaviour compared to version 0.20.5. - Please consult the "Upgrading" page for details. -
    • -
    -

    Known Issues:

    -
      -
    • - PCL, MIF and SVG output support have not been restored, yet. -
    • -
    • - Java2D/AWT support contains some problems, for example with - block-containers. -
    • -
    • - Auto table layout is not implemented, yet. -
    • -
    • - The collapsing border model on tables is not implemented, yet. Please - use border-collapse="separate" for now. -
    • -
    • - Footnotes may overlap with text of the region-body in multi-column - documents. -
    • -
    • - Space resolution does not work between footnote regions. -
    • -
    • - There's a problem involving nested block-containers and - reference-orientation 180/-180 (Bugzilla #36391) -
    • -
    • - block-containers with no height currently don't create a fence for - spaces as they should (they behave like a normal block). -
    • -
    • - Preserved linefeeds in fo:character are not handled correctly. -
    • -
    • - An empty block currently produces a fence for stacking constraints - which it shouldn't. -
    • -
    • - There are several small problems around white space handling. -
    • -
    • - Images currently don't shrink so they fit on a page when they are - too big and shrinking is allowed to happen. -
    • -
    • - Block-level content in fo:inlines may produce unwelcome results. -
    • -
    • - inline-container may not work as expected. -
    • -
    • - letter-spacing and word-spacing properties may not work as expected. -
    • -
    • - leaders with leader-pattern="use-content" may not work as expected. -
    • -
    • - keep-with-previous doesn't work inside tables and lists, yet. -
    • -
    • - White space on direct inline-level children of a marker is not - handled correctly. -
    • -
    • - If two consecutive pages don't have the same available width, the - content currently isn't properly fit into the available space on - the new page. -
    • -
    • - background-images on page-number-citations are not placed correctly. -
    • -
    • - Not all FO elements can be referenced by their "id", most notably: - table-body, table-header, table-footer and table-row. -
    • -
    • - The backgrounds of table-body, table-header, table-footer and - table-column are not painted, yet. -
    • -
    • - Border and padding conditionality are not supported on table-cells, yet. -
    • -
    • - Copy/Paste from PDF content in Acrobat Reader is not supported for - text using embedded TrueType fonts. -
    • -
    • - Column balancing in multi-column documents may not work as expected - (Bugzilla #36356) -
    • -
    • - Omitting fo:table-column or having fo:table-column without a column-width - and attempting to create columns implicitly from the first - table row is not implemented, yet (Bugzilla #35656). -
    • -
    • - Internal basic-links don't point to the exact location on a page, yet, as they - did in 0.20.5. Currently you land in the upper left corner of the page. -
    • -
    -
    -
    -FOP 0.91 beta -

    - This is the second release after the big redesign effort. FOP 0.91 beta is mostly a bug - fix release but also contains some new features. -

    -

    - 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. -

    -

    Caveats:

    -
      -
    • - This release is an beta release. If you intend to use this software in a production - environment, please perform careful testing. -
    • -
    • - The API is not to be considered stable, yet. Please be prepared - for the API to be changed in a backwards-incompatible way. -
    • -
    • - You may experience different behaviour compared to version 0.20.5. - Please consult the "Upgrading" page indicated above for details. -
    • -
    -

    Known Issues:

    -
      -
    • - PCL, MIF and SVG output support have not been restored, yet. -
    • -
    • - Java2D/AWT support contains some problems, for example with - block-containers. -
    • -
    • - Support for kerning has not been restored, yet. -
    • -
    • - Auto table layout is not implemented, yet. -
    • -
    • - The collapsing border model on tables is not implemented, yet. Please - use border-collapse="separate" for now. -
    • -
    • - Footnotes may overlap with text of the region-body in multi-column - documents. -
    • -
    • - Space resolution does not work between footnote regions. -
    • -
    • - There's a problem involving nested block-containers and - reference-orientation 180/-180 (Bugzilla #36391) -
    • -
    • - block-containers with no height currently don't create a fence for - spaces as they should (they behave like a normal block). -
    • -
    • - Preserved linefeeds in fo:character are not handled correctly. -
    • -
    • - Zero-width spaces are not handled correctly. -
    • -
    • - An empty block currently produces a fence for stacking constraints - which it shouldn't. -
    • -
    • - There are several small problems around white space handling. -
    • -
    • - Images currently don't shrink so they fit on a page when they are - too big and shrinking is allowed to happen. -
    • -
    • - Block-level content in fo:inlines may produce unwelcome results. -
    • -
    • - inline-container may not work as expected. -
    • -
    • - letter-spacing and word-spacing properties may not work as expected. -
    • -
    • - leaders with leader-pattern="use-content" may not work as expected. -
    • -
    • - keep-with-previous doesn't work inside tables and lists, yet. -
    • -
    • - White space on direct inline-level children of a marker is not - handled correctly. -
    • -
    • - If two consecutive pages don't have the same available width, the - content currently isn't properly fit into the available space on - the new page. -
    • -
    • - background-images on page-number-citations are not placed correctly. -
    • -
    • - Not all FO elements can be referenced by their "id", most notably: - table-body, table-header, table-footer and table-row. -
    • -
    • - The backgrounds of table-body, table-header, table-footer and - table-column are not painted, yet. -
    • -
    • - Border and padding conditionality are not supported on table-cells, yet. -
    • -
    • - Copy/Paste from PDF content in Acrobat Reader is not supported for - text using embedded TrueType fonts. -
    • -
    • - Column balancing in multi-column documents may not work as expected - (Bugzilla #36356) -
    • -
    • - Omitting fo:table-column or having fo:table-column without a column-width - and attempting to create columns implicitly from the first - table row is not implemented, yet (Bugzilla #35656). -
    • -
    • - Leaders with the "rule" pattern don't work for PostScript output. -
    • -
    • - break-after may in some cases cause subsequent content to be swallowed. - Please use break-before, if possible. -
    • -
    • - Internal basic-links don't point to the exact location on a page, yet, as they - did in 0.20.5. Currently you land in the upper left corner of the page. -
    • -
    -
    -
    - FOP 0.90 alpha 1 -

    - This is the first preview release after the big redesign effort. -

    -

    - 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. -

    -

    Caveats:

    -
      -
    • - This release is a (unstable) preview release and not intended for use in a - production environment. Use at your own risk! -
    • -
    • - The API is not to be considered stable, yet. Please be prepared - for the API to be changed in a backwards-incompatible way. -
    • -
    • - You may experience different behaviour compared to version 0.20.5. - Please consult the "Upgrading" page indicated above for details. -
    • -
    -

    Known Issues:

    -
      -
    • - PCL, MIF and SVG output support have not been restored, yet. -
    • -
    • - Java2D/AWT support contains some problems, for example with - block-containers. -
    • -
    • - Support for kerning has not been restored, yet. -
    • -
    • - Auto table layout is not implemented, yet. -
    • -
    • - The collapsing border model on tables is not implemented, yet. Please - use border-collapse="separate" for now. -
    • -
    • - Footnotes may overlap with text of the region-body in multi-column - documents. -
    • -
    • - Space resolution does not work between footnote regions. -
    • -
    • - There's a problem involving nested block-containers and - reference-orientation 180/-180 (Bugzilla #36391) -
    • -
    • - block-containers with no height currently don't create a fence for - spaces as they should (they behave like a normal block). -
    • -
    • - Preserved linefeeds in fo:character are not handled correctly. -
    • -
    • - Zero-width spaces are not handled correctly. -
    • -
    • - An empty block currently produces a fence for stacking constraints - which it shouldn't. -
    • -
    • - There are several small problems around white space handling. -
    • -
    • - Images currently don't shrink so they fit on a page when they are - too big and shrinking is allowed to happen. -
    • -
    • - Block-level content in fo:inlines may produce unwelcome results. -
    • -
    • - inline-container may not work as expected. -
    • -
    • - letter-spacing and word-spacing properties may not work as expected. -
    • -
    • - leaders with leader-pattern="use-content" may not work as expected. -
    • -
    • - keep-with-previous doesn't work inside tables and lists, yet. -
    • -
    • - White space on direct inline-level children of a marker is not - handled correctly. -
    • -
    • - If two consecutive pages don't have the same available width, the - content currently isn't properly fit into the available space on - the new page. -
    • -
    • - background-images on page-number-citations are not placed correctly. -
    • -
    • - Not all FO elements can be referenced by their "id", most notably: - table-body, table-header, table-footer and table-row. -
    • -
    • - The backgrounds of table-body, table-header, table-footer and - table-column are not painted, yet. -
    • -
    • - Border and padding conditionality are not supported on table-cells, yet. -
    • -
    • - Copy/Paste from PDF content in Acrobat Reader is not supported for - text using embedded TrueType fonts. -
    • -
    • - Column balancing in multi-column documents may not work as expected - (Bugzilla #36356) -
    • -
    • - Omitting fo:table-column or having fo:table-column without a column-width - and attempting to create columns implicitly from the first - table row is not implemented, yet (Bugzilla #35656). -
    • -
    • - Leaders with the "rule" pattern don't work for PostScript output. -
    • -
    -
    -
    - FOP 0.20.5 -

    This was the last release in the 0.20.x series (aka maintenance branch).

    -

    Important changes since the last release (0.20.4):

    -
      -
    • Some hyphenation patterns (cs, da, de, de_DR, el, en, en_US, fr, nl, - no, sk, tr) have been removed due to licensing reasons - (en_GB hyphenation has been renamed to en). - We're still working on this issue - (see - Wiki for details). -
    • -
    • Documentation is now built with - Forrest (version 0.4). You need to install Forrest if you want build the docs - yourself. (See - Using Forrest) -
    • -
    • The following JARs have been updated: - Xerces to version 2.2.1, Xalan to version 2.4.1 and Batik to version 1.5beta4. -
    • -
    • FOP has been compiled with Jimi support, but Jimi is not included in the - FOP distribution. To use it, first download - Jimi, then extract - the archive, then - copy JimiProClasses.zip to FOP's lib dir and rename it to jimi-1.0.jar. -
    • -
    • FOP has been compiled with JAI support, but JAI is not included in the - FOP distribution. To use it, simply install - JAI. -
    • -
    • Links in PDF won't generate multiple link rectangles anymore. If this causes - a problem you can set the system property "links.merge" to "no". -
    • -
    • FOP has been compiled with cryptography support. See - - PDF encryption for details about installation and usage. -
    • -
    • The behaviour of leader has changed. See - bug #19341, - bug #19465 - and leader.fo (examples). -
    • -
    • - For a more detailed list of changes, see the CHANGES file in the root of the - FOP distribution. -
    • -
    - -
    -
    - FOP 0.20.4 -

    Important changes since 0.20.3:

    -
      -
    • FOP should now work with any JAXP1.1 compliant parser/transformer. - It has been successfully tested with Xerces/Xalan, Saxon and JDK1.4 - (which includes Crimson and Xalan). -
    • -
    • The following JARs have been updated: - Xerces to version 2.0.1, Xalan to version 2.3.1 and Batik to version 1.5beta2. -
    • -
    • FOP has been compiled with Jimi support this time - but you still have to download - Jimi - and copy it to lib/ to get PNG support (no need to build FOP yourself though). -
    • -
    • Building FOP with JDK1.2 does not work. Running is ok except - support for additional truetype fonts in AWT Viewer. -
    • -
    • Logging has been changed from LogKit to Avalon's Logger Interface. - (see Embedding for details). -
    • -
    • Building under JDK 1.4: - You need to add a method in - src/org/apache/fop/svg/PDFGraphics2D.java - (search for jdk1.4 and remove the comments) -
    • -
    • To decrease the size of the distributions, ant, xml-docs, design-docs - and the hyphenation sources have been removed from the binary distribution. - Javadocs have been removed from the source distribution (use - build javadocs to generate them). -
    • -
    • Documentaion generation is broken in the maintenance branch at the moment - (Stylebook needs xerces1). The docs for this release are generated from the trunk. -
    • -
    • - For a more detailed list of changes, see the CHANGES file in the root of the FOP distribution. -
    • -
    -
    - -
    - FOP 0.20.3 -

    Important Information:

    -
      -
    • This version supports the - XSL-FO Version 1.0 - W3C Recommendation syntax. So don't forget to update your - Stylesheets: -
      Just rename the master-name property to master-reference - on fo:page-sequence, fo:single-page-master-reference, - fo:repeatable-page-master-reference and - fo:conditional-page-master-reference.
    • -
    • JDK 1.2 (or later) is required
    • -
    • Jimi has been removed for licensing reasons -
      If you need PNG support you have to download - Jimi, - copy it to lib/ and build FOP yourself
    • -
    • Building under JDK 1.4: -
      You need to add a method in - src/org/apache/fop/svg/PDFGraphics2D.java - (search for jdk1.4 and remove the comments) -
    • -
    • - For a more detailed list of changes, see the CHANGES file in the root of the FOP distribution. -
    • -
    -
    - - -
    - diff --git a/src/documentation/content/xdocs/resources.xml b/src/documentation/content/xdocs/resources.xml index db45d7437..708f10334 100644 --- a/src/documentation/content/xdocs/resources.xml +++ b/src/documentation/content/xdocs/resources.xml @@ -37,24 +37,29 @@
    XSLT
      -
    • XSLT Recommendation
    • +
    • XSLT 1.0 Recommendation
    • +
    • XSLT 2.0 Recommendation
    XML
      -
    • XML Recommendation
    • +
    • XML 1.0
    • +
    • XML 1.1
    • Simple API for XML (SAX)
    • Document Object Model (DOM)
    • -
    • Namespaces in XML Recommendation
    • +
    • Document Object Model (DOM) Level 2 Core Specification
    • +
    • Document Object Model (DOM) Level 3 Core Specification
    • +
    • Namespaces in XML 1.0
    • +
    • Namespaces in XML 1.1
    Java
      -
    • Java JDK 1.3 Documentation
    • -
    • Java JDK 1.4 Documentation
    • -
    • Java JDK 1.5 Documentation
    • +
    • Java 2 Platform, Standard Edition, v 1.4.2 API Specification
    • +
    • Java 2 Platform Standard Edition 5.0 API Specification
    • +
    • Java Platform, Standard Edition 6 API Specification
    @@ -83,13 +88,15 @@ XSL-FO
    • [online book] The XML Bible, by Elliotte Rusty Harold. Chapter 18 of XSL Formatting Objects
    • +
    • [online article] Using XSL Formatting Objects, by J. David Eisenberg.
    • [online reference] XSL FO reference, by Miloslav Nic.
    • [online reference] Dave Pawson's XSL-FO FAQ.
    • [book] XSL-FO, by Dave Pawson, O'Reilly & Associates, 2002, ISBN 0-596-00355-2. See online version above.
    • -
    • [book] Definitive XSL-FO, by G. Ken Holman, Prentice Hall PTR, 2003, ISBN 0-131-40374-5.
    • -
    • [book] XSL Formatting Objects Developer's Handbook, by Doug Lovell, Sams, 2002, ISBN 0-672-32281-1.
    • +
    • [book] Definitive XSL-FO, by G. Ken Holman, Prentice Hall PTR, 2003, ISBN 0-131-40374-5.
    • +
    • [book] XSL Formatting Objects Developer's Handbook, by Doug Lovell, Sams, 2002, ISBN 0-672-32281-1.
    • [book] Practical Formatting Using XSLFO, Crane Softwrights Ltd., 2003, ISBN 1-894049-11-X.
    @@ -97,12 +104,13 @@ XSLT
    • [online resource] Extensible Stylesheet Language Family (XSL), W3C XSL Family page.
    • -
    • [book] XSLT Programmer's Reference, by Michael H. Kay, Wrox Press, ISBN 1-861-00506-7.
    • +
    • [book] XSLT Programmer's Reference, by Michael H. Kay, Wrox Press, ISBN 1-861-00506-7.
    • +
    • [book] XSLT2 and XPath2 Programmer's Reference, by Michael H. Kay, Wrox Press, ISBN: 978-0-470-19274-0.
    • [book] XSLT, by Doug Tidwell, O'Reilly & Associates, 2001, ISBN 0-596-00053-7.
    • [book] XSLT Cookbook, by Sal Mangano, O'Reilly & Associates, 2002, ISBN 0-596-00372-2.
    • [article] Dave Pawson's XSL FAQ.
    • [book] XPath and XPointer: Locating Content in XML Documents, by John E. Simpson, O'Reilly & Associates, 2002, ISBN 0-596-00291-2.
    • -
    • [book] XSL Essentials, by Michael Fitzgerald, John Wiley & Sons, 2001, ISBN 0-471-41620-7.
    • +
    • [book] XSL Essentials, by Michael Fitzgerald, John Wiley & Sons, 2001, ISBN 0-471-41620-7.
    • [book] Java and XSLT, by Eric M. Burke, O'Reilly & Associates, 2001, ISBN 0-596-00143-6.
    @@ -110,7 +118,7 @@ XML
    • [online book] The XML Bible, by Elliotte Rusty Harold. See hardcopy version below.
    • -
    • [book] The XML Bible, by Elliotte Rusty Harold, John Wiley & Sons, ISBN 0-764-54760-7. See online version above.
    • +
    • [book] The XML Bible, by Elliotte Rusty Harold, John Wiley & Sons, ISBN 0-764-54760-7. See online version above.
    • [online resource] A great number of additional XML-related books and articles can be found at the O'Reilly XML Site.
    @@ -204,10 +212,9 @@
    PDF post-processors
      -
    • [software] Apache PDFBox (Incubating, Apache License V2.0)
    • +
    • [software] Apache PDFBox (Apache License V2.0)
    • [software] iText (MPL and LGPL)
    • -
    • [software] PJ Classic by Etymon (GPL)
    • -
    • [software] PJ Professional by Etymon (commercial)
    • +
    • [software] PJX by Etymon (GPL)
    • [software] pdftk the pdf toolkit
    @@ -227,11 +234,13 @@ Other products
    • [software] FOray a renderer for converting XML files to PDF via XSL Formatting Object elements (FOP fork)
    • +
    • [software] xmlroff an open source XSL-FO implementation written in C (BSD-style license)
    • [commercial software developer] Antenna House - XSL Formatter, WordMLToFo, XML Editor...
    • -
    • [commercial software developer] RenderX XEP, EnMasse, Docbench...
    • +
    • [commercial software developer] RenderX XEP, EnMasse, Docbench...
    • [software] html2fo is a converter from HTML to XSL-FO (GPL).
    • [software] wh2fo is a converter from Word HTML to XSL-FO (MPL).
    • diff --git a/src/documentation/content/xdocs/site.xml b/src/documentation/content/xdocs/site.xml index 7d1b10b97..2d55ae3f2 100644 --- a/src/documentation/content/xdocs/site.xml +++ b/src/documentation/content/xdocs/site.xml @@ -124,7 +124,9 @@ + + @@ -246,8 +248,6 @@ - - diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index fa3e2e643..f2bcc10bb 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -27,31 +27,27 @@
      Status -

      [last updated 4 March 2008]

      -
      +

      [last updated 5 July 2010]

      - This is the development status of Apache FOP. Development on - the maintenance branch where FOP 0.20.5 came from has been - halted. The code base has been largely redesigned. The new - code base has reached release 0.95. + FOP version 0.95 was released on 5 August 2008. FOP version 1.0 was released in July 2010.

      Development Status -

      The FOP code base has been largely rewritten, to address - design issues for layout and performance. The new design makes - it better possible to be conformant to the spec and be able to - handle large documents.

      -

      The redesign of the code base has largely been completed. The - new code reached production quality with release 0.93. In the - course of 2008 or 2009 we hope to release version 1.0.

      + +

      The FOP code base is gradually evolving, from version 0.90 + released on 22 November 2005, to version 1.0 released in July + 2010. Further releases in the 1.x series may be expected.

      +

      FOP releases before version 0.90 were based on a different + code base. The last release in that series was version 0.20.5, + released on 18 July 2003. This series is no longer maintained.

      If you're looking for a long-term road-map we have to disappoint you. This is Open Source and we're mostly volunteers working in their free time. What we have is an idea where we want to go. How fast we get there depends on the available time, on how well our ideas work out while developing and on you! There's a document in the Wiki - where you can get a glimpse of what points we're currently focusing on. + where ideas for new developments may be registered and documented.

      Status of the individual components @@ -131,180 +127,5 @@
      -
      - Maintenance Status -

      - The latest release of the maintenance branch is FOP 0.20.5, released on July 18th, 2003. - The maintenance branch has been frozen in 2004 so the team can concentrate on the new code - base. -

      -
      - diff --git a/src/documentation/content/xdocs/tabs.xml b/src/documentation/content/xdocs/tabs.xml index 9b423f996..a9c458fe3 100644 --- a/src/documentation/content/xdocs/tabs.xml +++ b/src/documentation/content/xdocs/tabs.xml @@ -21,8 +21,8 @@ - + diff --git a/src/documentation/content/xdocs/trunk/fonts.xml b/src/documentation/content/xdocs/trunk/fonts.xml index df2ed72b8..dcd03e548 100644 --- a/src/documentation/content/xdocs/trunk/fonts.xml +++ b/src/documentation/content/xdocs/trunk/fonts.xml @@ -215,7 +215,7 @@ in this case can be found on the page about output formats.

      - Prior to FOP version 0.94, it was always necessary to create an XML font metrics file + In earlier FOP versions, it was always necessary to create an XML font metrics file if you wanted to add a custom font. This unconvenient step has been removed and in addition to that, FOP supports auto-registration of fonts, i.e. FOP can find fonts installed in your operating system or can scan user-specified directories for fonts. diff --git a/src/documentation/content/xdocs/trunk/graphics.xml b/src/documentation/content/xdocs/trunk/graphics.xml index 725c1839f..270d6b49b 100644 --- a/src/documentation/content/xdocs/trunk/graphics.xml +++ b/src/documentation/content/xdocs/trunk/graphics.xml @@ -26,19 +26,15 @@

      Introduction

      - After the Apache FOP 0.94 release, the image handling subsystem has been rewritten in - order to improve the range of supported images and image subtypes, to lower the - overall memory consumption when handling images, to produce smaller output files and to - increase the performance in certain areas. Of course, this causes a few changes most of - which the user will probably not notice. The most important changes are: + Some noteworthy features of the image handling subsystem are:

      • - The image libraries Jimi and JAI are no longer supported. Instead, Apache FOP uses the + The image libraries Jimi and JAI are not supported. Instead, Apache FOP uses the Image I/O API that was introduced with Java 1.4 for all bitmap codecs.
      • - Some bitmap images are no longer converted to a standardized 24 bit RGB image but are + Some bitmap images are not converted to a standardized 24 bit RGB image but are instead handled in their native format.
      • @@ -48,7 +44,7 @@

      The actual image loading framework - no longer resides in Apache FOP, but was instead placed in + does not reside in Apache FOP, but in XML Graphics Commons.

      diff --git a/src/documentation/skinconf.xml b/src/documentation/skinconf.xml index ccafd9541..8190982e3 100644 --- a/src/documentation/skinconf.xml +++ b/src/documentation/skinconf.xml @@ -378,6 +378,7 @@ which will be used to configure the chosen Forrest skin. 125 --> + PDF created by Apache FOP -- 2.39.5