Package org.docx4j.convert.out.fo
Class FOConversionContext
java.lang.Object
org.docx4j.convert.out.common.AbstractConversionContext
org.docx4j.convert.out.common.AbstractWmlConversionContext
org.docx4j.convert.out.fo.FOConversionContext
See /docs/developer/Convert_Out.docx for an overview of
the design.
- Author:
- Alberto Zerolo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final AbstractMessageWriterprotected static final AbstractWriterRegistryprotected FORendererprotected booleanprotected booleanFields inherited from class org.docx4j.convert.out.common.AbstractWmlConversionContext
complexFieldDefinitionLevel, conversionSectionWrappers, currentPart, endnoteNumberCounter, footnoteNumberCounter, styleTreeFields inherited from class org.docx4j.convert.out.common.AbstractConversionContext
CONVERSION_CONTEXT_ID, DUMMY_HYPERLINK_HANDLER, DUMMY_WRITER -
Constructor Summary
ConstructorsConstructorDescriptionFOConversionContext(FOSettings settings, WordprocessingMLPackage wmlPackage, ConversionSectionWrappers conversionSectionWrappers) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanA 2 pass pdf generation is required if the result of fo:page-number-citation-last does not correspond to the field results of NUMPAGES or SECTIONPAGES.protected static RunFontSelectorcreateRunFontSelector(WordprocessingMLPackage wmlPackage) voidIf it is a 2 pass generation, the xslfo document can't be generated independently of a rendering step.protected FORendererinitializeFoRenderer(FOSettings settings) protected ConversionImageHandlerinitializeImageHandler(AbstractConversionSettings settings, ConversionImageHandler handler) booleanMethods inherited from class org.docx4j.convert.out.common.AbstractWmlConversionContext
getCurrentPart, getNextEndnoteNumber, getNextFootnoteNumber, getPropertyResolver, getRunFontSelector, getSections, getStyleTree, getTransformState, getWmlPackage, getWriterRegistry, handleHyperlink, initializeOpcPackage, initializeStyleTree, initializeTransformStates, initializeWriterRegistry, isInComplexFieldDefinition, setCurrentPart, setCurrentPartMainDocument, updateComplexFieldDefinitionMethods inherited from class org.docx4j.convert.out.common.AbstractConversionContext
getConversionSettings, getHyperlinkHandler, getImageHandler, getLog, getMessageWriter, getOpcPackage, getXsltParameters, initializeHyperlinkHandler, initializeMessageWriter, initializeSettings, initializeXsltParameters
-
Field Details
-
requires2PassChecked
protected boolean requires2PassChecked -
requires2Pass
protected boolean requires2Pass -
foRenderer
-
FO_WRITER_REGISTRY
-
FO_MESSAGE_WRITER
-
-
Constructor Details
-
FOConversionContext
public FOConversionContext(FOSettings settings, WordprocessingMLPackage wmlPackage, ConversionSectionWrappers conversionSectionWrappers)
-
-
Method Details
-
createRunFontSelector
-
initializeFoRenderer
-
initializeImageHandler
protected ConversionImageHandler initializeImageHandler(AbstractConversionSettings settings, ConversionImageHandler handler) - Overrides:
initializeImageHandlerin classAbstractConversionContext
-
getFORenderer
-
forceRequires1Pass
public void forceRequires1Pass()If it is a 2 pass generation, the xslfo document can't be generated independently of a rendering step. Some APIs return a xslfo document without rendering it (XSLFOExporterNonXSLT, Conversion.outputXSLFO), for this cases this method ensures, that the document doesn't require the corresponding parameters but if a 2 pass generation was required the rendered document will show errors. -
isRequires2Pass
public boolean isRequires2Pass() -
checkRequires2Pass
protected boolean checkRequires2Pass()A 2 pass pdf generation is required if the result of fo:page-number-citation-last does not correspond to the field results of NUMPAGES or SECTIONPAGES. This is the case when one of those fields are used and:- There is an explicit start of page numbers (> 1 in the first section, anything in the following sections) or
- The document contains more than 1 section (and SECTIONPAGES is used).
- Returns:
-