PDF Creator
![]() |
|
|---|
Apache FOP-specific adjustments, such as the incorporation of fonts into a PDF file, can be made directly in the configuration file X4DB/0/fopuserconfig.xml.
Properties
| Path to the linked file in the repository |
| Component Parameter. For more information, see Using Component Parameters . |
| Output format of the report Possible values:
For the PDF/A option, Apache FOP 1.0 explicitly requires each text block within the FO document to specify a |
Creating reports with XSL-FO
With the PDF Creator module, you can dynamically generate documents for print output (reports) at the runtime of a process. A report is a special XSL mapping that transforms XML data and outputs an XML document with XSL-FO statements. The generated XSL-FO document is directly converted to the specified output format by the X4 BPMS and passed on to the subsequent process step.
The X4 BPMS uses Apache FOP as the XSL-FO processor to process the reports.
Graphic files (e.g. GIF, JPEG, PNG, SVG) can be integrated into the report document via the XSL-FO element <fo:external-graphic src="url('Pfad/zur/Datei.png')">. To include graphics from the X4 BPMS repository, you can specify their path with an XStore:/ URL, for example:
<fo:external-graphic src="url('xstore://Project/Folder/File.png')"
content-width="10mm" content-height="10mm"/>
The optional attributes content-width and content-height allow you to determine the width and height of the image in the output document.
Alternatively, you can embed binary graphics files as a Base64-encoded string in the report according to the following pattern. For more information, see Base64 Converter .
<fo:external-graphic src="url(data:;base64,Base64-kodierte Bilddaten)"/>
For SVG images, their source code can also be embedded directly in the report, for example:
<fo:instream-foreign-object>
<svg:svg xmlns:svg="http://www.w3.org/2000/svg"
height="1mm" width="40mm">
<svg:line y1="0" y2="0" x1="0" x2="40mm"
style="stroke:#0000FF;stroke-width:0.5pt" />
</svg:svg>
</fo:instream-foreign-object>
Make sure that all SVG elements have the svg: namespace.
Example
The following is an example of a very simple (minimal) XSL-FO document:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple" page-height="29.7cm"
page-width="21cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="3cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block>Hello World</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
For more information on hyphenation, visit https://xmlgraphics.apache.org/fop/2.5/hyphenation.html.
