Package org.docx4j.convert.out.common
Class Preprocess
java.lang.Object
org.docx4j.convert.out.ConversionFeatures
org.docx4j.convert.out.common.Preprocess
public class Preprocess extends ConversionFeatures
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 Constructor Description Preprocess() -
Method Summary
Modifier and Type Method Description protected static java.util.Set<java.lang.String>createRelationshipTypes(java.util.Set<java.lang.String> features)Check what parts might be changed by the preprocessing, those parts need to be deep copied.static OpcPackageprocess(OpcPackage opcPackage, java.util.Set<java.lang.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, java.util.Set<java.lang.String> features)This method applies those features in the preprocessing, that may be used with an WordprocessingMLPackage.
-
Constructor Details
-
Preprocess
public Preprocess()
-
-
Method Details
-
process
public static OpcPackage process(OpcPackage opcPackage, java.util.Set<java.lang.String> features) throws Docx4JExceptionThis 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
protected static java.util.Set<java.lang.String> createRelationshipTypes(java.util.Set<java.lang.String> features)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, java.util.Set<java.lang.String> features) throws Docx4JExceptionThis 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
-