DAGetPageBox

直接访问功能、页面属性

描述

返回指定页面边界矩形的一个尺寸

返回值是从页面左下角测量的点坐标

语法

Delphi

Function TPDFlib.DAGetPageBox(FileHandle, PageRef, BoxIndex, Dimension: Integer): Double;

ActiveX

Function PDFlib::DAGetPageBox(FileHandle As Long, PageRef As Long, BoxIndex As Long, Dimension As Long) As Double

DLL

double DLDAGetPageBox(int InstanceID, int FileHandle, int PageRef, int BoxIndex, int Dimension);

参数

FileHandle由 DAOpenFile、DAOpenFileReadOnly 或 DAOpenFromStream 函数返回的句柄
PageRefDAFindPage 或 DANewPage 函数返回的页面引用
BoxIndex1 = MediaBox 2 = CropBox 3 = BleedBox 4 = TrimBox 5 = ArtBox
Dimension0 = 左边缘;1 = 顶部;2 = 宽度;3 = 高度;4 = 右边缘;5 = 底部 int BoxIndex, int Dimension)

返回值

以点为单位返回请求的边界尺寸。BoxIndex 或 Dimension 超出范围,或文件句柄、页面引用无效时返回 0。