CopyPageRanges

擷取、頁面操作

描述

此函式用來把一或多個頁面從一份文件複製到另一份。

頁面按順序複製,不允許重複。想以不同於來源文件的順序擷取或包含重複頁面,可使用 CopyPageRangesEx 函式

語法

Delphi

Function TPDFlib.CopyPageRanges(DocumentID: Integer; Const RangeList: WideString): Integer;

ActiveX

Function PDFlib::CopyPageRanges(DocumentID As Long, RangeList As String) As Long

DLL

int DLCopyPageRanges(int InstanceID, int DocumentID, const wchar_t * RangeList);

參數

DocumentID要複製頁面的來源文件 ID 要擷取的頁面,例如 "10,15,18-20,25-35"。字串中的無效字元與重複頁碼會被忽略。反向頁面範圍(如 "5-1")可以接受。頁面清單會排序,頁面因此按數字順序擷取。
RangeList

傳回值

0指定的 DocumentID 無效、與所選文件相同,或 RangeList 無效
1頁面已成功從指定文件複製到所選文件