FO Converter
Usage
Using the FO Converter you convert XSL-FO-formatted input messages into one of the following output formats:
-
PDF:
To create PDF/UA-1 format additional steps are required. Refer to Creating PDF/UA-1
-
PDF/A-1b:
Refer to Creating PDF/A-1b and Changing Fonts. To create PDF/UA-1 format additional steps are required. Refer to Creating PDF/UA-1
-
PDF/X-3:2003
-
PCL (Printer Control Language)
-
PostScript
-
RTF (Rich Text Format)
-
SVG (Scalable Vector Graphic)
Refer to Unix/Linux: Generating SVG Graphics
-
TXT
-
WML (Word Markup Language)
To create an XSL-FO–formatted input message, you can use the XSLT Converter, refer to XSLT Command Wizard in the XSLT Converter.
Creating PDF/A-1b and Changing Fonts
Requirements
-
You will need a font metrics file. This file contains general and character-set-specific information for the fonts that are to be used.
-
Do not use PDF encryption, as this is not allowed for PDF/A.
-
Do not use CMYK graphics without an ICC color profile. Currently, the FO processor provides reliable support for the sRGB color space only, and mixing color spaces is not allowed. By default, FOP embeds a standard sRGB ICC profile (sRGB IEC61966-2.1). This profile is used if no other information is provided in the configuration file.
-
For SVG graphics, use RGB colors only.
-
Do not use EPS graphics for fo:external-graphic. Embedded EPS graphics are not allowed for PDF/A.
-
You may not specify explicit filters for metadata objects. Metadata must be embedded in plain text to enable non-PDF-enabled applications to extract the XMP metadata.
-
In the input messages, the root element must include the
font-family
attribute:<?xml version="1.0" encoding="UTF-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Arial"> [...] </fo:root>
-
Make sure that all fonts are embedded. If you use base14 fonts (such as Helvetica), the fonts must be licensed and embedded just like other fonts.
-
PDF Version 1.4 is forced if PDF/A-1b output is enabled.
Proceed as follows
-
Create a configuration file for the FO processor (FOP), for example
fop.xconf
:<?xml version="1.0" encoding="UTF-8"?> <fop version="1.0"> <use-cache>false</use-cache> <!-- Base URL for resolving relative URLs --> <base>./</base> <!-- Font Base URL for resolving relative font URLs --> <font-base>./</font-base> <!-- Strict FO validation --> <strict-validation>false</strict-validation> <strict-configuration>true</strict-configuration> <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi --> <source-resolution>72</source-resolution> <!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi --> <target-resolution>72</target-resolution> <!-- Default page-height and page-width, in case value is specified as auto --> <default-page-settings height="auto" width="auto"/> <!-- Information for specific renderers --> <!-- Uses renderer mime type for renderers --> <renderers> <renderer mime="application/pdf"> </renderer> </renderers> </fop>
-
In the
<base>
element, enter the base directory for fonts. -
In the
<strict-validation>
element, enterfalse `if you want to allow empty `fo:table-cell
elements. -
Copy the font you would like to embed, including its font metrics, to the base directory.
-
Add the definition of the embedded fonts to the FOP configuration file. For example:
<renderers> <renderer mime="application/pdf"> <fonts> <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf"> <font-triplet name="Arial" style="normal" weight="normal"/> </font> </fonts> </renderer> </renderers>
-
Create an FO Converter.
-
Configure the following settings:
-
XSL-FO processor: Apache FOP
-
Output format: PDF/A-1B
-
-
Click Finish.
-
-
To lodge the configuration file add the following module property:
-
Name:
ConfigFile
-
Data type:
Text (single line)
-
Value: Path to the FOP configuration file
Refer to Adding Module Properties
-
-
Save the changes.
Creating PDF/UA-1
Proceed as follows
-
Add the documentation title in the FO.
-
Add the below section between
</fo:layout-master-set>
and<fo:page-sequence>:
<fo:declarations> <x:xmpmeta xmlns:x="adobe:ns:meta/"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:title>Document title</dc:title> <dc:creator>Document author</dc:creator> <dc:description>Document subject</dc:description> </rdf:Description> </rdf:RDF> </x:xmpmeta> </fo:declarations>
-
Create a configuration file for the FO processor (FOP), for example
fop.xconf
. -
Add the below section to enable PDF/UA-1 in
fop.xconf
:<fop version="1.0"> <accessibility>true</accessibility> <renderers> <renderer mime="application/pdf"> <pdf-ua-mode>PDF/UA-1</pdf-ua-mode> </renderer> </renderers> </fop>
Unix/Linux: Generating SVG Graphics
If no X Server is installed, you have to customize a file in order to generate graphics.
Dialog FO Converter Properties
This dialog offers the following options:
-
XSL-FO Processor
The processors differ in their functions and the output formats they support:
-
Apache FOP
Supports PDF/A-1b as archive format and offers a better support of the FOP standard (Apache FOP 2.2).
Along with many improvements for creating PDF files using Apache FOP 2.2, there is an incompatibility with previous versions of Apache FOP:
If there is an empty
<fo:block>
element in the XSLT style sheet, the layout of the PDF file differs as the new version 2.2 of FOP does not consider empty blocks.To resolve this issue, add a
<fo:leader/>
element to each<fo:block>
section so that it is no longer an empty element, e.g. as follows:<fo:block hyphenate="true" language="de"> <fo:inline color="#000000" font-family="Times New Roman" font-size="8.0pt"> <fo:leader/> </fo:inline> </fo:block>
For other changes, please refer to Apache FOP 2.2 history of changes.
-
XMLmind XSL-FO
Supports RTF and WordML output.
-
-
Output format
Depending on the selected XSL-FO processor one of the following output formats can be generated:
-
PDF
Adobe’s Portable Document Format can be viewed using Acrobat Reader, a free application.
-
PDF/A-1b
Standard for long-term archiving of electronic documents. The following must be included in a PDF/A-1b document:
-
All fonts used (subgroups are allowed)
-
All images
-
Metadata in XMP format
Refer to Creating PDF/A-1b and Changing Fonts
-
-
PDF/X-3:2003
ISO standard defining the transfer of digital PDF print.
-
If used, the following data must be embedded:
-
Fonts
-
TrimBoxes
-
Graphic data
-
-
The following are not allowed:
-
OPI comments
-
Comments and form fields
-
Encryption
-
Transparencies
-
-
-
PCL (Printer Control Language):
A format for controlling printers, defined by Hewlett Packard. PCL output files can be sent directly to a printer.
-
PostScript
A standard developed by Adobe for layout description of a printed page. A PostScript-formatted page can be viewed in special viewer applications, or it can be sent directly to a printer supporting the PostScript format.
-
RTF (Rich Text Format)
A file format for exchanging formatted text between different word-processing applications. The document’s font, font size, and font color remain unchanged when used in applications from different manufacturers.
-
SVG (Scalable Vector Graphic)
XML-based format for vector graphics. If an SVG file is embedded in an HTML page, the browser must have a plug-in that can display this format.
Refer to Unix/Linux: Generating SVG Graphics
-
TXT
Text file without any layout information.
-
WML (Wireless Markup Language)
XML-Format, used by MS Word since version 2003.
-
-
Working directory
Absolute path to multimedia files (images, videos, etc.), which are to be embedded into the selected output format.