ImageSaveOptionsPageIndex Property

Gets or sets the 0-based index of the first page to render. Default is 0.

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

Property Value

Type: Int32
Remarks

This property has effect only when rendering document pages. This property is ignored when rendering shapes to images.

Examples
Shows how to save specific document page as image file.
Document doc = new Document(MyDir + "Rendering.docx");

ImageSaveOptions saveOptions = new ImageSaveOptions(SaveFormat.Gif)
{
    PageIndex = 1 // Define which page will save
};

doc.Save(ArtifactsDir + "ImageSaveOptions.SaveIntoGif.gif", saveOptions);
Examples
Converts a page of a Word document into a TIFF image and uses the CCITT compression.
Document doc = new Document(MyDir + "Rendering.docx");

ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Tiff)
{
    TiffCompression = TiffCompression.Ccitt3,
    PageIndex = 0,
    PageCount = 1
};

doc.Save(ArtifactsDir + "Rendering.SaveToTiffCompression.tiff", options);
See Also