DocumentSave Method (Stream, SaveOptions)
Saves the document to a stream using the specified save options.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public SaveOutputParameters Save(
	Stream stream,
	SaveOptions saveOptions
)

Parameters

stream
Type: System.IOStream
Stream where to save the document.
saveOptions
Type: Aspose.Words.SavingSaveOptions
Specifies the options that control how the document is saved. Can be null. If this is null, the document will be saved in the binary DOC format.

Return Value

Type: SaveOutputParameters
Additional information that you can optionally use.
Examples
Converts just one page (third page in this example) of the document to PDF.
[C#]

Document doc = new Document(MyDir + "Rendering.doc");

using (Stream stream = File.Create(ArtifactsDir + "Rendering.SaveToPdfStreamOnePage.pdf"))
{
    PdfSaveOptions options = new PdfSaveOptions();
    options.PageIndex = 2;
    options.PageCount = 1;
    doc.Save(stream, options);
}
See Also