
config.freemarker-doc-process.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="utf-8"?> <freemarker-doc-process-config xmlns="https://freemarkerdocprocess.fugerit.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://freemarkerdocprocess.fugerit.org https://www.fugerit.org/data/java/doc/xsd/freemarker-doc-process-1-0.xsd" > <docHandlerConfig registerById="true" allowDuplicatedId="true"> <docHandler id="pdf_ua-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-pdfua.xml" pdf-ua-mode="PDF/UA-1"/> </docHandler> <docHandler id="pdf_a-fop" info="pdf" type="org.fugerit.java.doc.mod.fop.PdfFopTypeHandler"> <docHandlerCustomConfig charset="UTF-8" fop-config-mode="inline" pdf-a-mode="PDF/A-1b"> <fop version="1.0"> <!-- Strict user configuration --> <strict-configuration>true</strict-configuration> <!-- Strict FO validation --> <strict-validation>true</strict-validation> <!-- Base URL for resolving relative URLs --> <base>.</base> <!-- Font Base URL for resolving relative font URLs --> <font-base>.</font-base> <!-- NOTE: for PDF/A format all fonts, even the basic ones, myst be fully embdedded. https://xmlgraphics.apache.org/fop/2.8/pdfa.htm --> <renderers> <renderer mime="application/pdf"> <!-- It seems setting both PDF/A and PDF/UA profile leads to this error on PDF/A validation : "XMP property pdfuaid:part not defined in current schema." Where PDF/UA validation succeds <pdf-ua-mode>PDF/UA-1</pdf-ua-mode> PDF/A checked with : https://avepdf.com/en/pdfa-validation ( and Adobe ) PDF/UA checked with : https://check.axes4.com/en/ --> <pdf-a-mode>PDF/A-1b</pdf-a-mode> <version>1.4</version> <fonts> <font embed-url="classpath://font/TitilliumWeb-Regular.ttf" embedding-mode="full"> <font-triplet name="TitilliumWeb" style="normal" weight="normal"/> </font> <font embed-url="classpath://font/TitilliumWeb-Bold.ttf" embedding-mode="full"> <font-triplet name="TitilliumWeb" style="normal" weight="bold"/> </font> <font embed-url="classpath://font/TitilliumWeb-Italic.ttf" embedding-mode="full"> <font-triplet name="TitilliumWeb" style="italic" weight="normal"/> </font> <font embed-url="classpath://font/TitilliumWeb-BoldItalic.ttf" embedding-mode="full"> <font-triplet name="TitilliumWeb" style="italic" weight="bold"/> </font> </fonts> </renderer> </renderers> <!-- 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="11in" width="8.26in"/> </fop> </docHandlerCustomConfig> </docHandler> <docHandler id="md-ext" info="md" type="org.fugerit.java.doc.base.typehandler.markdown.SimpleMarkdownExtTypeHandler" /> <docHandler id="xml-doc" info="xml" type="org.fugerit.java.doc.base.config.DocTypeHandlerXMLUTF8" /> <docHandler id="xls-poi" info="xls" type="org.fugerit.java.doc.mod.poi.XlsPoiTypeHandler" /> <docHandler id="xlsx-poi" info="xlsx" type="org.fugerit.java.doc.mod.poi.XlsxPoiTypeHandler" /> <docHandler id="fo-fop" info="fo" type="org.fugerit.java.doc.mod.fop.FreeMarkerFopTypeHandlerUTF8" /> <docHandler id="pdf-fop" info="pdf" type="org.fugerit.java.doc.mod.fop.PdfFopTypeHandler"> <!-- Starting with fj-doc-mod-fop version 0.5.2 there is a new attribute : 'fop-config-mode' Accepting three possible values : 1) fop-config-mode='default' (is optional, if nothing is specified it is the default) 2) fop-config-mode='classloader' Example : <config fop-config-mode="classloader" fop-config-classloader-path="fop-config.xml"/> With an optinal attribute : 'fop-config-resover-type' (which default to 'org.fugerit.java.doc.mod.fop.config.ClassLoaderResourceResolverWrapper') 3) fop-config-mode='classloader-legacy' [deprecated, equal to the previous method of classloading, see [0.5.2](https://github.com/fugerit-org/fj-doc/issues/7) Example 1: <config fop-config-mode='classloader-legacy' fop-config-classloader-path="fop-config.xml" font-base-classloader-path="font/"/> Note for compatibilty reason, if attributes 'fop-config-classloader-path' and 'font-base-classloader-path' are both set, the mode switch to fop-config-mode='classloader-legacy' Example 2 : <config fop-config-classloader-path="fop-config.xml" font-base-classloader-path="font/"/> --> <docHandlerCustomConfig charset="UTF-8" fop-config-mode="classloader" fop-config-classloader-path="fop-config.xml" fop-suppress-events="1"/> </docHandler> <docHandler id="html-fm" info="html" type="org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlTypeHandlerEscapeUTF8" /> <docHandler id="html-fragment-fm" info="fhtml" type="org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlFragmentTypeHandlerEscapeUTF8" /> <docHandler id="csv-opencsv" info="csv" type="org.fugerit.java.doc.mod.opencsv.OpenCSVTypeHandler"/> <!-- test for unsafe DocTypeHandler: this class does not exist, the error will be traced but the initialization will end --> <docHandler id="pdf-unsafe" info="pdf" type="org.fugerit.java.doc.pdf.UnsafeDocHandler" unsafe="true" unsafeMode="log-trace"/> </docHandlerConfig> <docChain id="shared"> <chainStep stepType="config"> <config id="FJ_SAMPLE_TEST" version="2.3.31" path="/free_marker/"/> </chainStep> <chainStep stepType="function"> <function name="messageFormat" value="org.fugerit.java.doc.freemarker.fun.SimpleMessageFun"/> <function name="sumLong" value="org.fugerit.java.doc.freemarker.fun.SimpleSumLongFun"/> </chainStep> <chainStep stepType="test.org.fugerit.java.doc.sample.freemarker.TestFreeMarker01DataStep"/> <chainStep stepType="map"> <map name="list" value="userList"/> <map name="testBase64Img" value="testBase64Img"/> </chainStep> </docChain> <docChain id="free-marker-01" parent="shared"> <chainStep stepType="complex" template-path="test_01.ftl"/> </docChain> <docChain id="free-marker-01-fop" parent="free-marker-01"/> <docChain id="free-marker-test-fop-font" parent="shared"> <chainStep stepType="complex" template-path="test_fop_font.ftl"/> </docChain> <docChain id="full-facade-01" parent="shared"> <chainStep stepType="complex" template-path="test_01.ftl"/> </docChain> <docChain id="free-marker-02" parent="shared"> <chainStep stepType="complex" template-path="test_02.ftl"/> </docChain> <docChain id="free-marker-color-test" parent="shared"> <chainStep stepType="complex" template-path="color_test.ftl"/> </docChain> <docChain id="free-marker-format-test" parent="shared"> <chainStep stepType="complex" template-path="format_test.ftl"/> </docChain> <docChain id="basic" parent="shared"> <chainStep stepType="complex" template-path="basic.ftl"/> </docChain> <docChain id="pdf_a_test" parent="shared"> <chainStep stepType="complex" template-path="pdf_a_test.ftl"/> </docChain> <docChain id="kotlin-01" parent="shared"> <chainStep stepType="kotlin" kts-path="kts/kotlin-01.kts"/> </docChain> </freemarker-doc-process-config>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy