Package org.docx4j.convert.out
Class FOSettings
java.lang.Object
org.docx4j.convert.out.AbstractConversionSettings
org.docx4j.convert.out.FOSettings
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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringThere is no MIME that explicitly defines fo, only application/xml.protected static org.slf4j.Loggerstatic final StringFields 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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetApacheFopMime(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(File foFile) For testing and debugging you can pass here a File object.voidsetFopConfig(Fop fopConfig) Generally there is no need to invoke this; the fop config will be generated based on the fonts used in your WordprocessingMLPackage and the specified FontMapper.voidsetLayoutMasterSetCalculationInProgress(boolean layoutMasterSetCalculationInProgress) The flag layoutMasterSetCalculationInProgress is used by LayoutMasterSetBuilder, to record whether for this conversion run, the correct extents have been calculated yet.voidsetOpcPackage(OpcPackage opcPackage) Side effect (where there is no fopConfig) for WordprocessingMLPackage is to invoke FopConfigUtil.createConfigurationObjectMethods inherited from class org.docx4j.convert.out.AbstractConversionSettings
addFeatures, getCustomXsltTemplates, getFeatures, getHyperlinkHandler, getImageDirPath, getImageHandler, getOpcPackage, getSettings, isImageIncludeUUID, setCustomXsltTemplates, setHyperlinkHandler, setImageDirPath, setImageHandler, setImageIncludeUUID, setWmlPackage
-
Field Details
-
log
protected static org.slf4j.Logger log -
INTERNAL_FO_MIME
There 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:
-
MIME_PDF
- See Also:
-
APACHEFOP_CONFIGURATION
- See Also:
-
APACHEFOP_MIME
- See Also:
-
CUSTOM_FO_RENDERER
- See Also:
-
-
Constructor Details
-
FOSettings
public FOSettings() -
FOSettings
- Throws:
Docx4JException
-
-
Method Details
-
setFopConfig
Generally there is no need to invoke this; the fop config will be generated based on the fonts used in your WordprocessingMLPackage and the specified FontMapper. But in an advanced unsupported usage, you can specify your own Fop config. If its a String or InputStream, you'll need to unmarshall it.- Parameters:
fopConfig-
-
getFopConfig
-
setOpcPackage
Side effect (where there is no fopConfig) for WordprocessingMLPackage is to invoke FopConfigUtil.createConfigurationObject- Overrides:
setOpcPackagein classAbstractConversionSettings- Throws:
Docx4JException
-
getApacheFopMime
-
setApacheFopMime
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
-
setFoDumpFile
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.
-