PageCount

PdfLoadOptions.PageCount property

Gets or sets the number of pages to read. Default is MaxValue which means all pages of the document will be read.

public int PageCount { get; set; }

Examples

Shows how to skip images during loading PDF files.

PdfLoadOptions options = new PdfLoadOptions();
options.SkipPdfImages = isSkipPdfImages;
options.PageIndex = 0;
options.PageCount = 1;

Document doc = new Document(MyDir + "Images.pdf", options);
NodeCollection shapeCollection = doc.GetChildNodes(NodeType.Shape, true);

if (isSkipPdfImages)
    Assert.AreEqual(shapeCollection.Count, 0);
else
    Assert.AreNotEqual(shapeCollection.Count, 0);

See Also