Use this function to extract one or more non-consecutive pages from a document to a new document.
function TDebenuPDFLibrary1511.ExtractPageRanges(RangeList: WideString): Integer;
RangeList As String) As Long
int DPLExtractPageRanges(int InstanceID, wchar_t * RangeList)
|RangeList||The pages to extract, for example "10,15,18-20,25-35". Invalid characters and duplicate page numbers in the string will be ignored. Reversed page ranges such as "5-1" will be accepted. The list of pages will be sorted resulting in the pages being extracted in numerical order.|
|0||The page extraction did not succeed. The original document remains as the selected document.|
|1||The page extraction was successful. The new document containing the selected pages is now the selected document.|