SaveOptionsSaveFormat Property

Specifies the format in which the document will be saved if this save options object is used.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.10.0


public abstract SaveFormat SaveFormat { get; set; }

Property Value

Type: SaveFormat


Shows how to specify saving options while converting a document to .epub.
Document doc = new Document(MyDir + "Rendering.docx");

// Specify encoding for a document that we will save with a SaveOptions object.
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.SaveFormat = SaveFormat.Epub;
saveOptions.Encoding = Encoding.UTF8;

// By default, an output .epub document will have all the contents in one HTML part.
// A split criteria allows us to segment the document into several HTML parts.
// We will set the criteria to split the document at heading paragraphs.
// This is useful for readers which cannot read HTML files greater than a certain size.
saveOptions.DocumentSplitCriteria = DocumentSplitCriteria.HeadingParagraph;

// Specify that we want to export document properties.
saveOptions.ExportDocumentProperties = true;

doc.Save(ArtifactsDir + "HtmlSaveOptions.Doc2EpubSaveOptions.epub", saveOptions);

ExpandedSee Also