Package org.docx4j.convert.out
Class FOSettings
java.lang.Object
org.docx4j.convert.out.AbstractConversionSettings
org.docx4j.convert.out.FOSettings
public class FOSettings extends AbstractConversionSettings
This class contains the configuration for the conversion process.
The conversion is done in two steps:
The conversion is done in two steps:
- Generate a fo document
- Render it into the desired format
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAPACHEFOP_CONFIGURATIONstatic java.lang.StringAPACHEFOP_MIMEstatic java.lang.StringCUSTOM_FO_RENDERERstatic java.lang.StringFO_DUMP_FILEstatic java.lang.StringINTERNAL_FO_MIMEThere is no MIME that explicitly defines fo, only application/xml.static java.lang.StringMIME_PDFFields inherited from class org.docx4j.convert.out.AbstractConversionSettings
CUSTOM_XSLT_TEMPLATES, features, HYPERLINK_HANDLER, IMAGE_DIR_PATH, IMAGE_HANDLER, IMAGE_INCLUDE_UUID, OPC_PACKAGE, settings -
Constructor Summary
Constructors Constructor Description FOSettings() -
Method Summary
Modifier and Type Method Description java.lang.StringgetApacheFopConfiguration()java.lang.StringgetApacheFopMime()FORenderergetCustomFoRenderer()java.io.FilegetFoDumpFile()booleanlsLayoutMasterSetCalculationInProgress()voidsetApacheFopConfiguration(java.lang.String apacheFopConfiguration)A String with the configuration of the Apache fop factory.voidsetApacheFopMime(java.lang.String apacheFopMime)The output format of the ApacheFORenderer.voidsetCustomFoRenderer(FORenderer customFoRenderer)If the rendering should be done with a different fo renderer, then you need to pass here your custom implementation of the FORenderer interface.voidsetFoDumpFile(java.io.File foFile)For testing and debugging you can pass here a File object.voidsetLayoutMasterSetCalculationInProgress(boolean layoutMasterSetCalculationInProgress)The flag layoutMasterSetCalculationInProgress is used by LayoutMasterSetBuilder, to record whether for this conversion run, the correct extents have been calculated yet.Methods inherited from class org.docx4j.convert.out.AbstractConversionSettings
addFeatures, getCustomXsltTemplates, getFeatures, getHyperlinkHandler, getImageDirPath, getImageHandler, getOpcPackage, getSettings, isImageIncludeUUID, setCustomXsltTemplates, setHyperlinkHandler, setImageDirPath, setImageHandler, setImageIncludeUUID, setOpcPackage, setWmlPackage
-
Field Details
-
INTERNAL_FO_MIME
public static final java.lang.String INTERNAL_FO_MIMEThere is no MIME that explicitly defines fo, only application/xml. If you want as the result of the conversion process the fo document then you should use the MIME defined here.- See Also:
- Constant Field Values
-
MIME_PDF
public static final java.lang.String MIME_PDF- See Also:
- Constant Field Values
-
APACHEFOP_CONFIGURATION
public static final java.lang.String APACHEFOP_CONFIGURATION- See Also:
- Constant Field Values
-
APACHEFOP_MIME
public static final java.lang.String APACHEFOP_MIME- See Also:
- Constant Field Values
-
CUSTOM_FO_RENDERER
public static final java.lang.String CUSTOM_FO_RENDERER- See Also:
- Constant Field Values
-
FO_DUMP_FILE
public static final java.lang.String FO_DUMP_FILE- See Also:
- Constant Field Values
-
-
Constructor Details
-
FOSettings
public FOSettings()
-
-
Method Details
-
getApacheFopConfiguration
public java.lang.String getApacheFopConfiguration() -
setApacheFopConfiguration
public void setApacheFopConfiguration(java.lang.String apacheFopConfiguration)A String with the configuration of the Apache fop factory. If no configuration is passed then a default configuration will be generated for each document (and a new factory created). -
getApacheFopMime
public java.lang.String getApacheFopMime() -
setApacheFopMime
public void setApacheFopMime(java.lang.String apacheFopMime)The output format of the ApacheFORenderer. If no value is passed, then it will be a PDF document. If INTERNAL_FO_MIME is used then the fo document will be outputted to the OutputStream. -
getCustomFoRenderer
-
setCustomFoRenderer
If the rendering should be done with a different fo renderer, then you need to pass here your custom implementation of the FORenderer interface. -
getFoDumpFile
public java.io.File getFoDumpFile() -
setFoDumpFile
public void setFoDumpFile(java.io.File foFile)For testing and debugging you can pass here a File object. The intermediate fo document will be outputted here. The outputted fo may contain placeholder for the 2 pass conversion. -
lsLayoutMasterSetCalculationInProgress
public boolean lsLayoutMasterSetCalculationInProgress() -
setLayoutMasterSetCalculationInProgress
public void setLayoutMasterSetCalculationInProgress(boolean layoutMasterSetCalculationInProgress)The flag layoutMasterSetCalculationInProgress is used by LayoutMasterSetBuilder, to record whether for this conversion run, the correct extents have been calculated yet. User code should not alter this flag.
-