ImageEn, unit iexUserInteractions

DeletePagesFromPDF


Declaration

function DeletePagesFromPDF(const Filename: String; PageIndex: 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 PageIndex or the Pages array. If a null value is specified, the method fails.
PageIdx 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


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