PdfPageEditor.GetPageBoxSize

PdfPageEditor.GetPageBoxSize method

Returns size of specified box in document.

public Rectangle GetPageBoxSize(int page, string pageBoxName)
ParameterTypeDescription
pageInt32Page index. Document pages are numbered from 1.
pageBoxNameStringBox type name. Valid values are: “art”, “bleed”, “crop”, “media”, “trim”.

Return Value

Rectangle which contains requested box.

Examples

The following example demonstrates how to get media box of the 1st page:

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

See Also