HtmlDocumentSplitCriteria Enum
Wordize.Saving.HtmlDocumentSplitCriteria enum. Specifies how the document is split into parts when saving to Html Epub or Azw3 format.
HtmlDocumentSplitCriteria enumeration
Specifies how the document is split into parts when saving to Html, Epub or Azw3 format.
[Flags]
public enum HtmlDocumentSplitCriteria
Values
Name | Value | Description |
---|---|---|
None | 0 | The document is not split. |
PageBreak | 1 | The document is split into parts at explicit page breaks. A page break can be specified by a explicit page break (Ctrl+Enter), a section break specifying start of new section on a new page, or a paragraph that has its “Page Break Before” property set. |
ColumnBreak | 2 | The document is split into parts at column breaks. A column break can be specified by a column break character (Alt+Enter) or a section break specifying start of new section in a new column. |
SectionBreak | 4 | The document is split into parts at a section break of any type. |
HeadingParagraph | 8 | The document is split into parts at a paragraph formatted using a heading style Heading 1, Heading 2 etc. Use together with DocumentSplitHeadingLevel to specify the heading levels (from 1 to the specified level) at which to split. |
Remarks
HtmlDocumentSplitCriteria
is a set of flags which can be combined. For instance you can split the document at page breaks and heading paragraphs in the same export operation.
Different criteria can partially overlap. For instance, Heading 1 style is frequently has page break before property set so it falls under two criteria: PageBreak and HeadingParagraph. Some section breaks can cause page breaks and so on. In typical cases specifying only one flag is the most practical option.
Examples
Shows how to specify document split criteria.
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions(SaveFormat.Epub);
htmlSaveOptions.DocumentSplitCriteria = HtmlDocumentSplitCriteria.HeadingParagraph;
htmlSaveOptions.DocumentSplitHeadingLevel = 1;
Converter.Create()
.From(MyDir + "TestSpliter.docx")
.To(ArtifactsDir + "HtmlSaveOptions.DocumentSplitCriteria.epub", htmlSaveOptions)
.Execute();
See Also
- namespace Wordize.Saving
- assembly Wordize