GetPageBoxSize

PdfPageEditor.GetPageBoxSize method

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

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

返回值

包含请求框的矩形。

例子

下面的例子演示了如何获取第一页的媒体框:

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

也可以看看