HtmlSaveOptionsExportRoundtripInformation Property

Specifies whether to write the roundtrip information when saving to HTML, MHTML or EPUB. Default value is true for HTML and false for MHTML and EPUB.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool ExportRoundtripInformation { get; set; }

Property Value

Type: Boolean
Remarks

Saving of the roundtrip information allows to restore document properties such as tab stops, comments, headers and footers during the HTML documents loading back into a Document object.

When true, the roundtrip information is exported as -aw-* CSS properties of the corresponding HTML elements.

When false, causes no roundtrip information to be output into produced files.

Examples
Shows how to preserve hidden elements when converting to .html.
Document doc = new Document(MyDir + "Rendering.docx");

// When converting a document to .html, some elements such as hidden bookmarks, original shape positions,
// or footnotes will be either removed or converted to plain text and effectively be lost
// Saving with a HtmlSaveOptions object with ExportRoundtripInformation set to true will preserve these elements
HtmlSaveOptions options = new HtmlSaveOptions
{
    ExportRoundtripInformation = true,
    PrettyFormat = true
};

// These elements will have tags that will start with "-aw", such as "-aw-import" or "-aw-left-pos"
doc.Save(ArtifactsDir + "HtmlSaveOptions.RoundTripInformation.html", options);
See Also