Class PdfInfo
Provides methods to retrieve PDF document metadata and structural information.
public static class PdfInfo
- Inheritance
-
PdfInfo
- Inherited Members
Examples
Example: Get basic PDF information
using LMKit.Document.Pdf;
int pages = PdfInfo.GetPageCount("report.pdf");
var metadata = PdfInfo.GetMetadata("report.pdf");
Console.WriteLine($"Title: {metadata.Title}, Pages: {pages}");
Remarks
The PdfInfo class inspects PDF Attachment instances or file paths and returns metadata, page dimensions, permissions, and document properties without modifying the file.
Methods
- GetMetadata(Attachment)
Returns the metadata of a PDF attachment.
- GetMetadata(string)
Returns the metadata of a PDF file.
- GetPageCount(Attachment)
Returns the number of pages in a PDF attachment.
- GetPageCount(string)
Returns the number of pages in a PDF file.
- GetPageInfo(Attachment, int)
Returns size and orientation information for a specific page.
- GetPageInfo(string, int)
Returns size and orientation information for a specific page.
- GetPermissions(Attachment)
Returns the permission flags of a PDF attachment.
- GetPermissions(string)
Returns the permission flags of a PDF file.