PdfPageEditor.GetPageBoxSize

PdfPageEditor.GetPageBoxSize 方法

返回文档中指定框的大小。

public Rectangle GetPageBoxSize(int page, string pageBoxName)
参数类型描述
pageInt32页面索引。文档页面从 1 开始编号。
pageBoxNameString框类型名称。有效值为:“art”,“bleed”,“crop”,“media”,“trim”。

返回值

包含请求框的矩形。

示例

以下示例演示如何获取第 1 页的媒体框:

PdfPageEditor editor = new PdfPageEditor();
editor.BindPdf("sample.pdf");
System.Drawing.Rectangle rect = editor.GetBoxSize(1, "media");

另请参阅