DACapturePage

直接存取功能、頁面操作

Description

此函式會從原先以 DAOpenFile 開啟的文件「擷取」指定頁面。擷取的頁面之後可用 DADrawCapturedPage 函式畫到任何其他頁面,適合組合不同頁面,或把多個原始頁面放到同一頁(拼版)

頁面擷取後就會從文件移除。想讓頁面留在文件裡,必須先建立空白頁,再把擷取的頁面畫到空白頁上

擷取頁面的邊界矩形採用該頁的 "media box";若應改用 "crop box",請改用 DACapturePageEx 函式

語法

Delphi

Function TPDFlib.DACapturePage(FileHandle, PageRef: Integer): Integer;

ActiveX

Function PDFlib::DACapturePage(FileHandle As Long, PageRef As Long) As Long

DLL

int DLDACapturePage(int InstanceID, int FileHandle, int PageRef);

參數

FileHandle由 DAOpenFile、DAOpenFileReadOnly 或 DAOpenFromStream 函式傳回的控制代碼
PageRef由 DAFindPage 或 DANewPage 函式傳回的頁面參照

傳回值

0指定的 FileHandle 或 PageRef 無效
Non-zero可搭配 DADrawCapturedPage 函式使用的 ID