|
| PdfPage | GetPage (int pageNumber) |
| | Loads and returns a specific page in the PDF document. More...
|
| |
| PdfPage | AddPage () |
| | Appends a new page to the PDF document. More...
|
| |
| PdfPage | AddPage (PdfPage sourcePage) |
| | Appends a copy of an existing page to the document. The page may belong to another PDF document. More...
|
| |
| PdfPage | InsertPage (int index) |
| | Insert a new page at the specified index. More...
|
| |
| PdfPage | InsertPage (int index, PdfPage sourcePage) |
| | Insert a copy of an existing page at the specified index. The page may belong to another PDF document. More...
|
| |
| void | DeletePage (int pageNumber) |
| | Deletes a specific page from the PDF document. Can only delete pages that have not yet been saved. More...
|
| |
| void | DeletePage (PdfPage page) |
| | Deletes a specific page from the PDF document. Can only delete pages that have not yet been saved. More...
|
| |
|
void | Save () |
| | Saves the document using its current file name.
|
| |
| void | Save (string fileName, PdfDocument source=null) |
| | Saves the current document to the provided path. More...
|
| |
| void | Save (Stream stream, PdfDocument source=null) |
| | Saves the current document to the provided stream. More...
|
| |
| void | BeginSave (string fileName) |
| | Starts saving the document to a specified file. Together with SavePage and EndSave, this method allows incremental saving of PDF documents, reducing the memory and resource consumption. More...
|
| |
| void | BeginSave (Stream stream) |
| | Start saving the document to a specified file. Together with SavePage and EndSave, this method allows incremental saving of PDF documents, reducing memory and resource consumption. More...
|
| |
| void | SavePage (PdfPage page) |
| | Saves a specific page. Together with BeginPage and EndPage, this method allows incremental saving of PDF documents, reducing memory and resource consumption. More...
|
| |
|
void | SavePages () |
| | Saves all unsaved pages. Together with BeginPage and EndPage, this method allows incremental saving of PDF documents, reducing memory and resource consumption.
|
| |
| void | EndSave (PdfDocument source=null) |
| | Completes writing the PDF document and closes the file. Together with BeginPage and SavePage, this method allows incremental saving of PDF documents, reducing memory and resource consumption. More...
|
| |
|
void | Close () |
| | Closes the current PDF document.
|
| |
|
void | Dispose () |
| | Disposes the current PDF document.
|
| |
| List< PdfImagePage > | GetAllImages () |
| | Get images used on all document pages. More...
|
| |
|
| static PdfDocument | Create (PdfOptions options=null) |
| | Creates a new empty PDF document. More...
|
| |
| static PdfDocument | Load (string fileName, string password=null) |
| | Loads a PDF document from the specified file. More...
|
| |
| static PdfDocument | Load (Stream stream, string password=null) |
| | Loads a PDF document from the specified stream. More...
|
| |
| static int | GetVersion (string fileName) |
| | Gets the version number of a PDF file. More...
|
| |
| static int | GetVersion (Stream stream) |
| | Gets the version number of a PDF stream. More...
|
| |
| static int | GetPageCount (string fileName) |
| | Get the number of pages in the specified PDF file. More...
|
| |
| static int | GetPageCount (Stream stream) |
| | Get the number of pages in the specified PDF stream. More...
|
| |
| static FileFormat | GetFileFormat (string fileName, out int pageCount) |
| | Gets the file format and the number of pages in a document. More...
|
| |
| static void | ConvertToPdf (string sourceFile, string pdfFile) |
| | Converts a source file to a PDF file. More...
|
| |
|
|
string | FileName [get, set] |
| | File name of the PDF document.
|
| |
|
int | Version [get, set] |
| | PDF file version as a two digit number (major and minor).
|
| |
|
int | PageCount [get] |
| | Gets the number of pages in the document.
|
| |
|
PdfInfo | Info [get] |
| | Gets the PDF document information.
|
| |
|
PdfOptions | PdfOptions [get] |
| | The options for generating new PDF files.
|
| |
|
PdfSecurity | Security [get, set] |
| | Security options for PDF encryption.
|
| |
|
List< PdfImagePage > | Images [get] |
| | Gets the list of image pages used in the PDF document.
|
| |
|
List< PdfFont > | Fonts [get] |
| | Gets the list of fonts used in the PDF document.
|
| |
|
PdfBookmark | Bookmarks [get] |
| | Gets the collection of bookmarks for this document.
|
| |
|
PdfViewerPreferences | ViewerPreferences [get] |
| | Gets the viewer preferences when this document is opened.
|
| |
|
bool | IsTagged [get] |
| | Gets a flag to indicate whether the document is a tagged PDF.
|
| |
|
PdfPageMode | PageMode [get, set] |
| | Gets or sets the page mode (i.e. how the document is initially displayed).
|
| |
|
LayoutMode | PageLayout [get, set] |
| | Gets or sets the page layout used when document is opened.
|
| |
This class represents a PDF document in memory.
| static void Opait.Pdf.PdfDocument.ConvertToPdf |
( |
string |
sourceFile, |
|
|
string |
pdfFile |
|
) |
| |
|
static |
Converts a source file to a PDF file.
The following file formats are supported:
PDF: No conversion is performed. The operation becomes a file copy.
Images: JPEG, PNG, Bitmap and multi-page TIFF files are converted to PDF
Microsoft Office: Word, Excel, PowerPoint and Visio files are converted to PDF if Office is installed.
Text: ASCII and EBCDIC files with or without ASA carriage control characters are converted to PDF.
- Parameters
-
| sourceFile | The source file to convert. |
| pdfFile | The converted PDF file. |