HtmlSaveOptions.DocumentSplitCriteria

HtmlSaveOptions DocumentSplitCriteria property. Specifies how the document should be split when saving to Html Epub or Azw3 format. Default is None for HTML and HeadingParagraph for EPUB and AZW3.

HtmlSaveOptions.DocumentSplitCriteria property

Specifies how the document should be split when saving to Html, Epub or Azw3 format. Default is None for HTML and HeadingParagraph for EPUB and AZW3.

public HtmlDocumentSplitCriteria DocumentSplitCriteria { get; set; }

Remarks

Normally you would want a document saved to HTML as a single file. But in some cases it is preferable to split the output into several smaller HTML pages. When saving to HTML format these pages will be output to individual files or streams. When saving to EPUB format they will be incorporated into corresponding packages.

A document cannot be split when saving in the MHTML format.

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