CopyPageRangesEx

Extraction, Page manipulation

Description

Use this function to copy one or more pages from one document to another. It is functionality identical to the CopyPageRanges function but adds an option to allow the page list to contain duplicate page numbers and a different page order to the original document.

Syntax

Delphi

function TPDFlib.CopyPageRangesEx(DocumentID: Integer; Const RangeList: WideString; Options: Integer): Integer;

ActiveX

Function PDFlib::CopyPageRangesEx(DocumentID As Long, RangeList As String, Options As Long) As Long

DLL

int DLCopyPageRangesEx(int InstanceID, int DocumentID, wchar_t * RangeList, int Options);

Parameters

DocumentIDThe ID of the document to copy the pages from
RangeListThe pages to extract, for example "10,15,18-20,25-35". Invalid characters in the string will be ignored.
Options0 = Identical behaviour to the CopyPageRanges function. The page list is sorted and duplicate page numbers are ignored. 1 = Do not sort the page list and allow duplicate page numbers

Return values

0The specified DocumentID was not valid or was the same as the selected document, or the RangeList was invalid
1The pages were successfully copied from the specified document to the selected document