DACapturePage

直接访问功能、页面操作

描述

此函数会从最初通过 DAOpenFile 打开的文档中 "捕获" 指定页面。随后可使用 DADrawCapturedPage 函数将捕获的页面绘制到任何其他页面。这对于合并不同页面,或将多个原始页面放置到另一页面上(拼版)很有用

捕获页面后,该页面将从文档中移除。若要使页面保留在文档中,必须创建一个空白页面并将捕获的页面绘制到该空白页面上

页面的 "媒体框" 用作捕获页面的边界矩形,若应改用页面的 "裁剪框",可使用 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 函数返回的句柄
PageRefDAFindPage 或 DANewPage 函数返回的页面引用

返回值

0指定的 FileHandle 或 PageRef 无效
Non-zero可与 DADrawCapturedPage 函数一起使用的 ID