←Select platform

LastPageNumber Property

Summary

Number of the last page to be loaded from the document.

Syntax
C#
VB
C++
Java
public int LastPageNumber { get; set; } 
Public Property LastPageNumber() As Integer 
   Get 
   Set 
public:  
   property int LastPageNumber 
   { 
      int get() 
      void set(int value) 
   } 
public int getLastPageNumber() 
public void getLastPageNumber(int value) 

Property Value

The 1-based number of the last page to be converted from the input document. Default value is 0.

Remarks

The factory will automatically uses 1 for FirstPageNumber and -1 (last page) for LastPageNumber if the values are left as the default of 0 or set to -1.

Use FirstPageNumber and LastPageNumber to load a document containing a desired subset of the pages found in the original file. After loading is successful, the document is treated as if contains only the specified number of pages when it is viewed or when it is converted.

When loading succeeds, the document will store the page numbers set in read-only properties OriginalFirstPageNumber and OriginalLastPageNumber (and the original number of pages in OriginalPageCount) accessed through LEADDocument.Pages.

For example, if the factory is loading a PDF document with 10 pages, and FirstPageNumber and LastPageNumber was set to 2 and 5 respectively, then the result document will contain 4 pages (pages 2 through 5) and Pages will have OriginalFirstPageNumber set to 2, OriginalLastPageNumber set to 5 and OriginalPageCount set to 10.

Example

For an example, refer to DocumentFactory.LoadFromFile or DocumentFactory.LoadFromUri.

Requirements

Target Platforms

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document Assembly