ImageEn, unit iexUserInteractions

TIEPdfViewerInteraction.ExportPages

TIEPdfViewerInteraction.ExportPages


Declaration

function ExportPages(const DestFilename: String; const Pages: array of Integer): Boolean; overload;
function ExportPages(const DestFilename: String; const ExportRange: string): Boolean; overload;
function ExportPages(const DestFilename: String; const PgIndex, PgCount: Integer): Boolean; overload;
function ExportPages(DestStream: TStream; const Pages: array of Integer): Boolean; overload;
function ExportPages(DestStream: TStream; const ExportRange: string): Boolean; overload;
function ExportPages(DestStream: TStream; const PgIndex, PgCount: Integer): Boolean; overload;


Description

Export pages from the current document to a new PDF file.
Specify a destination filename or a stream.
If the existing file exists, it will be overwritten.

The pages to export are specified by ExportRange or the Pages array. If a null value is specified, ALL pages are exported.
ExportRange is a string, e.g. "1,3,5-7". IT IS ONE-BASED.
Pages is an array of page indexes, e.g. [0, 2, 4, 5, 6]. IT IS ZERO-BASED.
PgIndex, PgCount specifies a range of page indexes, e.g. 0 to 6. IT IS ZERO-BASED.

The following will have the same effect:

ImageEnView1.PdfViewer.ExportPages( 'C:\Document.pdf', '1,3,5-7' );
ImageEnView1.PdfViewer.ExportPages( 'C:\Document.pdf', [0, 2, 4, 5, 6] );


Result will be true if the export succeeds.


Examples


// Export the first three pages
ImageEnView1.PdfViewer.ExportPages( 'C:\Document.pdf', [0,1,2] );

// Which is the same as:
ImageEnView1.PdfViewer.ExportPages( 'C:\Document.pdf', '1-3' );


See Also

- ImportPages
- DeletePages
- MovePages