Package org.docx4j.convert.out
Class ConversionFeatures
java.lang.Object
org.docx4j.convert.out.ConversionFeatures
- Direct Known Subclasses:
CreateWrappers,Preprocess
This interface contains flags that get passed to the conversion process.
- PP_xx : Functions that get done in the preprocessing step
- xx_COMMON_xx: Common functions, may be applied to HTML and PDF conversion.
- xx_HTML_xx: HTML functions, may be applied only to HTML conversion.
- xx_PDF_xx: PDF functions, may be applied only to PDF conversion.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]Default features, that get applied to a HTML conversionstatic final String[]Default features, that get applied to a PDF conversionstatic final StringWord may save a field (date, page numbers, references...) in two formats: a simple one and a complex one.static final StringWord combines the borders and background colors of two (or more) continuous paragraphs.static final StringIn PDF the conversion process needs to break up the document into the defined sections to handle such things as headers and footers.static final StringDuring the conversion the document might be changed.static final StringThis step defines only one section for the complete document.static final StringThis step defines some dummy page number information.static final StringThe conversion is only able to handle bookmarks that are in a paragraph.static final StringWord might put some pagebreaks in a paragraph.static final StringThe page number formatting might be stored in different places, the section properties and the field definition.static final StringIn a cell, a paragraph uses the table's paragraph properties, plus the relevant paragraph style (Normal, by default).static final StringIn HTML the conversion process can create lists (OL, UL).static final StringThis step removes a pagebreak before the first paragraph of the document.static final StringThis step removes a pagebreak before the first list item in each list.static final StringIf the docx contains a cover page which starts with a sectPr, this step moves the sectPr to a new w:p inserted after. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcheckParams(OpcPackage opcPackage, Set<String> features) Check the package and requested features and append defaults if necessary
-
Field Details
-
PP_COMMON_DEEP_COPY
During the conversion the document might be changed. If the caller continues to use the document after it, a deep copy should be done. This is not needed if the document gets discarded after the conversion process.- See Also:
-
PP_COMMON_MOVE_BOOKMARKS
The conversion is only able to handle bookmarks that are in a paragraph. This flag that bookmarks are in paragraphs. This is not needed if the document doesn't contain bookmarks or page references.- See Also:
-
PP_COMMON_MOVE_PAGEBREAK
Word might put some pagebreaks in a paragraph. In the conversion process the pagebreaks need to be at the beginning of a paragraph. This is not needed if the document doesn't contain explicit pagebreaks.- See Also:
-
PP_COMMON_CONTAINERIZATION
Word combines the borders and background colors of two (or more) continuous paragraphs. This flag simulates this behaviour. This is not needed if paragraphs dont have a border or background color defined.- See Also:
-
PP_COMMON_COMBINE_FIELDS
Word may save a field (date, page numbers, references...) in two formats: a simple one and a complex one. The conversion process only knows about the simple ones. This step converts the complex fields (if possible) to simple ones. This step is only required if the document contains page references.- See Also:
-
PP_COMMON_PAGE_NUMBERING
The page number formatting might be stored in different places, the section properties and the field definition. If the document contains page count fields (NUMPAGES, SECTIONPAGES) it might be necessary to do a two pass conversion. This step collects the necessary information. A two pass conversion will only be done in PDF. This step isn't necessary if no page numbers are used or no custom formatting has been applied to the page number field and if no page count fields got used.
If this step is omitted thenPP_COMMON_DUMMY_PAGE_NUMBERINGwill be used.- See Also:
-
PP_COMMON_DUMMY_PAGE_NUMBERING
This step defines some dummy page number information. The required data will be taken only from the section properties. In PDF the conversion will always be one pass. The use ofPP_COMMON_PAGE_NUMBERINGin HTML doesn't offer any advantage.- See Also:
-
PP_COMMON_CREATE_SECTIONS
In PDF the conversion process needs to break up the document into the defined sections to handle such things as headers and footers. This step does this processing. If the document only contains one section this processing isn't necessary. In the conversion to HTML the document will be treated as if it only has one section, therefore this step isn't needed in HTML.
If this step is omitted thenPP_COMMON_DUMMY_CREATE_SECTIONSwill be used.- See Also:
-
PP_HTML_COLLECT_LISTS
In HTML the conversion process can create lists (OL, UL). This step prepares for that, by inserting content controls around list items.- See Also:
-
PP_COMMON_DUMMY_CREATE_SECTIONS
This step defines only one section for the complete document. The required data will be taken from the body section pointers. In PDF the document will be treated as having only one section. The use ofPP_COMMON_CREATE_SECTIONSin HTML doesn't offer any advantage.- See Also:
-
PP_PDF_APACHEFOP_DISABLE_PAGEBREAK_FIRST_PARAGRAPH
This step removes a pagebreak before the first paragraph of the document. This is a workaround for https://issues.apache.org/bugzilla/show_bug.cgi?id=54094 You can disable this step if you are using FOP post 1.1 or another FO renderer.- See Also:
-
PP_PDF_APACHEFOP_DISABLE_PAGEBREAK_LIST_ITEM
This step removes a pagebreak before the first list item in each list. This is a workaround for https://issues.apache.org/bugzilla/show_bug.cgi?id=54094 You can disable this step if you are using FOP post 1.1 or another FO renderer.- Since:
- 3.0.1
- See Also:
-
PP_PDF_COVERPAGE_MOVE_SECTPR
If the docx contains a cover page which starts with a sectPr, this step moves the sectPr to a new w:p inserted after. This prevents the generation of an empty fo:flow.- Since:
- 3.0.1
- See Also:
-
PP_COMMON_TABLE_PARAGRAPH_STYLE_FIX
In a cell, a paragraph uses the table's paragraph properties, plus the relevant paragraph style (Normal, by default). The relevant paragraph style trumps the values from the table's paragraph properties, so that would mean giving the doc defaults (which we've made part of our styles) priority over the table's paragraph properties, which is wrong. TO avoid this, this preprocessor creates a new style, which encapsulates the paragraph style, with DocDefaults given lower priority than table style. This created style has no w:basedOn setting. This preprocessor is required if paragraphs in tables are being styled incorrectly. It wouldn't be required but for our DocDefaults styles hack!- Since:
- 3.0.2
- See Also:
-
DEFAULT_PDF_FEATURES
Default features, that get applied to a PDF conversion -
DEFAULT_HTML_FEATURES
Default features, that get applied to a HTML conversion
-
-
Constructor Details
-
ConversionFeatures
public ConversionFeatures()
-
-
Method Details
-
checkParams
Check the package and requested features and append defaults if necessary- Parameters:
opcPackage-features-
-