CopyPageRangesA

Extraction, Page manipulation

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to CopyPageRanges and string arguments are interpreted using the current SetAnsiMode code page

Use this function to copy one or more pages from one document to another

The pages are copied in sequential order and duplicates are not allowed. To extract pages in a different order to the source document or with duplicate pages the CopyPageRangesEx function can be used

Syntax

Delphi

Function DLCopyPageRangesA(InstanceID, DocumentID: Integer; RangeList: PAnsiChar): Integer;

DLL

int DLCopyPageRangesA(int InstanceID, int DocumentID, const char * RangeList);

Parameters

DocumentIDThe ID of the document to copy the pages from 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
RangeList

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