| ImageEn, unit iexUserInteractions |
|
DeletePagesFromPDF
DeletePagesFromPDF
Declaration
function DeletePagesFromPDF(const FileName: string; PgIndex: Integer): Boolean; overload;
function DeletePagesFromPDF(const FileName: string; PgIndex, PgCount: Integer): Boolean; overload;
function DeletePagesFromPDF(const FileName: string; Pages: array of Integer): Boolean; overload;
Description
Delete pages from a PDF file.
The pages to delete are specified by a
PgIndex or the
Pages array. If a null value is specified, the method fails.
PgIndex is used to delete a single page.
Pages is an array of page indexes, e.g. [0, 2, 4, 5, 6]. NOTE: The values must be ordered!
Note:
◼These methods require the
PDFium PlugIn
◼Password protected PDF files are not supported
Examples
// Delete first page from a document
DeletePagesFromPDF( 'C:\Document.pdf', 0 );
// Delete pages from the document
DeletePagesFromPDF( 'C:\Document.pdf', [ 3, 4, 8, 9 ]);
See Also
◼ImportPagesIntoPDF
◼IEPDFPageCount