View on GitHub

fj-doc

Venus - Fugerit Document Generation Framework (fj-doc)

Fugerit Document Generation Framework (fj-doc)

Apache FOP Render (PDF)(fj-doc-mod-fop)

back to fj-doc index

Maven Central javadoc

Status :
Most feature implemented. (Sample JUnit TestFreeMarker01Fop is now working).

Since : fj-doc 0.3

Native support :
Disabled, native support will be added in a future release. Apache FOP native support must be verified.

Quickstart :
Basically this is only a type handler, see core library fj-doc-base.
NOTE: If you have any special need you can open a pull request or create your own handler based on this.

Useful resources on Apache FOP

Handler configuration

attribute required default note
charset no UTF-8 Set the charset to be used for the handler
fop-config-mode no   Custom configuration method : ‘classloader’, ‘inline’
fop-config-classloader-path no   Class loader path to fop-config.xml
pdf-a-mode no   pdf a profile : PDF/A-1b, PDF/A-1a, PDF/A-2a, PDF/A-3a
pdf-ua-mode no   pdf ua profile : PDF/UA-1
fop-suppress-events no false if set to true, it will support some fop logging
fop-pool-min no 0 Integer, if higher than 0, fop configuration will be pooled and resued
fop-pool-max no 0 Integer, maximum number of fop configuration

Example of classloader configuration :

<docHandler id="pdf-fop" info="pdf" type="org.fugerit.java.doc.mod.fop.PdfFopTypeHandler">
    <docHandlerCustomConfig charset="UTF-8" 
        fop-config-mode="classloader" 
        fop-config-classloader-path="fop-config.xml" />
</docHandler>

Example of inline configuration :

<docHandler id="pdf-fop" info="pdf" type="org.fugerit.java.doc.mod.fop.PdfFopTypeHandler">
    <docHandlerCustomConfig charset="UTF-8" 
        fop-config-mode="inline" >
        <fop version="1.0">
            <strict-configuration>true</strict-configuration>
            <strict-validation>true</strict-validation>
            <renderers>
                <renderer mime="application/pdf">
                    <version>1.4</version>
                </renderer>
            </renderers>
        </fop>
    </docHandlerCustomConfig>
</docHandler>