HtmlSaveOptions.ExportPageSetup

HtmlSaveOptions ExportPageSetup property. Specifies whether page setup is exported to HTML MHTML or EPUB. Default is false.

HtmlSaveOptions.ExportPageSetup property

Specifies whether page setup is exported to HTML, MHTML or EPUB. Default is false.

public bool ExportPageSetup { get; set; }

Remarks

Each section in MS Word document provides page setup information. When you export a document to HTML format you might need to keep this information for further usage. In particular, page setup might be important for rendering to paged media (printing) or subsequent conversion to the native Microsoft Word file formats (DOCX, DOC, RTF, WML).

In most cases HTML is intended for viewing in browsers where pagination is not performed. So this feature is inactive by default.

Examples

Shows how enable exporting page margins and page setup to HTML.

HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.ExportPageMargins = true;
htmlSaveOptions.ExportPageSetup = true;

Converter.Create()
    .From(MyDir + "Simple.docx")
    .To(ArtifactsDir + "HtmlSaveOptions.ExportPageMargins.html", htmlSaveOptions)
    .Execute();

See Also