FixedPageSaveOptionsPageIndex Property |
Gets or sets the 0-based index of the first page to save.
Default is 0.
Namespace:
Aspose.Words.Saving
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntaxpublic int PageIndex { get; set; }Public Property PageIndex As Integer
Get
Set
public:
property int PageIndex {
int get ();
void set (int value);
}member PageIndex : int with get, set
Property Value
Type:
Int32
ExamplesConverts just one page (third page in this example) of the document to PDF.
Document doc = new Document(MyDir + "Rendering.docx");
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