Bounding Boxes

Bounding boxes in PDF annotations are used to define the location and size of an annotation within a PDF document. PDF annotations are visual elements that can be added to a PDF page to provide additional information or interactivity. Bounding boxes are rectangular regions that enclose the annotated content.

A bounding box is represented by four values: the X coordinate of the left edge, the Y coordinate of the top edge, the width, and the height. These values define the position and dimensions of the bounding box in the coordinate system of the PDF page.

The coordinate system used is based on a grid where the origin (0, 0) is defined by the SetOrigin method. It uses a member of the PdfOrigin enumeration as its parameter. The direction of the X and Y axes changes depending on which member of the PdfOrigin enumeration is used. However, the axes are always directed toward the PDF page.

The measurement unit used to specify the bounding box is defined using the SetMeasurementUnit method. It uses a member of the PdfMeasurementUnit enumeration as its parameter.