Package org.docx4j.convert.out.common
Class Preprocess
java.lang.Object
org.docx4j.convert.out.ConversionFeatures
org.docx4j.convert.out.common.Preprocess
This class manages the preprocessing functionality for the conversion.
It contains two methods that get called from the conversions:
It contains two methods that get called from the conversions:
- process: does the preprocessing and returns an OpcPackage or a WordprocessingMLPackage
- createSections: generates the sections depending on the selected features
-
Field Summary
Fields inherited from class org.docx4j.convert.out.ConversionFeatures
DEFAULT_HTML_FEATURES, DEFAULT_PDF_FEATURES, PP_COMMON_COMBINE_FIELDS, PP_COMMON_CONTAINERIZATION, PP_COMMON_CREATE_SECTIONS, PP_COMMON_DEEP_COPY, PP_COMMON_DUMMY_CREATE_SECTIONS, PP_COMMON_DUMMY_PAGE_NUMBERING, PP_COMMON_MOVE_BOOKMARKS, PP_COMMON_MOVE_PAGEBREAK, PP_COMMON_PAGE_NUMBERING, PP_COMMON_TABLE_PARAGRAPH_STYLE_FIX, PP_HTML_COLLECT_LISTS, PP_PDF_APACHEFOP_DISABLE_PAGEBREAK_FIRST_PARAGRAPH, PP_PDF_APACHEFOP_DISABLE_PAGEBREAK_LIST_ITEM, PP_PDF_COVERPAGE_MOVE_SECTPR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRelationshipTypes(Set<String> features) Check what parts might be changed by the preprocessing, those parts need to be deep copied.static OpcPackageprocess(OpcPackage opcPackage, Set<String> features) This method applies those features in the preprocessing, that may be used with an OpcPackage.
Features processed: PP_COMMON_DEEP_COPYstatic WordprocessingMLPackageprocess(WordprocessingMLPackage wmlPackage, Set<String> features) This method applies those features in the preprocessing, that may be used with an WordprocessingMLPackage.Methods inherited from class org.docx4j.convert.out.ConversionFeatures
checkParams
-
Constructor Details
-
Preprocess
public Preprocess()
-
-
Method Details
-
process
public static OpcPackage process(OpcPackage opcPackage, Set<String> features) throws Docx4JException This method applies those features in the preprocessing, that may be used with an OpcPackage.
Features processed:- PP_COMMON_DEEP_COPY
- Parameters:
opcPackage- , the package that should be preprocessedfeatures- , the selected features- Returns:
- a preprocessed OpcPackage
- Throws:
Docx4JException
-
createRelationshipTypes
Check what parts might be changed by the preprocessing, those parts need to be deep copied.- Parameters:
features- , the selected features- Returns:
- the affected parts
-
process
public static WordprocessingMLPackage process(WordprocessingMLPackage wmlPackage, Set<String> features) throws Docx4JException This method applies those features in the preprocessing, that may be used with an WordprocessingMLPackage. As the WordprocessingMLPackage is a OpcPackage it will call process(OpcPackage).
Features processed include, for example:- PP_COMMON_MOVE_BOOKMARKS
- PP_COMMON_MOVE_PAGEBREAK
- PP_COMMON_CONTAINERIZATION
- PP_COMMON_COMBINE_FIELDS
- PP_APACHEFOP_DISABLE_PAGEBREAK_FIRST_PARAGRAPH
- Parameters:
wmlPackage- , the package that should be preprocessedfeatures- , the selected features- Returns:
- a preprocessed WordprocessingMLPackage
- Throws:
Docx4JException
-