Contains information about a page in a PDF file.
[SerializableAttribute()]
public struct PDFFilePage : System.ValueType
<SerializableAttribute()>
Public Structure PDFFilePage
Inherits System.ValueType
[SerializableAttribute()]
public value class PDFFilePage : public System.ValueType
The PDFFilePage structure is used as the type of the PDFFile.Pages collection.
To get the pages collection, populate a PDFFile object with the name of a valid PDF file and optional password and then use the PDFFile.Load method. When this returns, the PDFFile.Pages property will contain a list of PDFFilePage with each item corresponding to a page in the PDF file.
Each item in the PDFFile.Pages collection corresponds to a page in the PDF file. So item at index 0 is the properties of page 1, item at index 1 is the properties of page 2 and so on. Even though the PDFFilePage structure contains the PageNumber property that specifies the number of the page, this information is for convenience only, the PDFFile.Load will always populate the collection in the correct order from first page to last page.
The PDFFilePage structure contains the width and height of the page in PDF units which is read from the PDF file directly. PDF page units are in 1/72 of an inch, so a page size of 612 by 792 corresponds to 8.5 by 11 inches (612/72 by 792/72). For more information, refer to PDF Coordinate System.
You can get the total number of pages in a PDF file with two ways:
Use PDFFile.Load to load the PDF file into the PDFFile object and use PDFFile.Pages.Count. Using the PDFFile.Load method will also read the size of each page as well as populating PDFFile.DocumentProperties with the properties of the file.
A faster way is to call PDFFile.GetPageCount directly. This method is faster than calling PDFFile.Load since it will not parse the page sizes nor the document properties. Just set the filename and optional password and call the method.
The values of the PDFFilePage structure are used as read only by the PDFFile object. The toolkit will only return objects of type PDFFilePage from the PDF document.
The PDFFilePage does not contain any information about a PDF page other than its size. To get the objects, bookmarks, images, links of a page, use the PDFDocument class and its collection of PDFDocumentPage items.
For an example, refer to PDFFile.Pages.
Products |
Support |
Feedback: PDFFilePage Structure - Leadtools.Pdf |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.