Class PdfRedactionArea
A rectangular region of one page whose content must be permanently removed. The geometry is carried by an IBounds in page points with the origin at the top-left corner of the page, matching the geometry returned by PdfSearch matches and layout text elements. The area implements IBounds itself, so it can be passed anywhere a bounds is expected.
public sealed class PdfRedactionArea : IBounds
- Inheritance
-
PdfRedactionArea
- Implements
- Inherited Members
Examples
using LMKit.Document.Pdf;
using LMKit.Graphics.Geometry;
// Redact a 200 x 40 pt region near the top of the first page.
var area = new PdfRedactionArea(pageIndex: 0, Rectangle.FromSize(left: 72, top: 96, width: 200, height: 40));
Constructors
- PdfRedactionArea(int, IBounds)
Initializes a redaction area from a page index and a bounding box.
Properties
- Bottom
Gets the vertical position of the bottom edge of the bounds.
- Bounds
Gets the normalized bounding box of the area in top-left origin page points.
- Height
Gets the total vertical extent of the bounds (Bottom minus Top).
- Left
Gets the horizontal position of the left edge of the bounds.
- MidX
Gets the horizontal midpoint of the bounds.
- MidY
Gets the vertical midpoint of the bounds.
- PageIndex
Gets the zero-based page index the area belongs to.
- Right
Gets the horizontal position of the right edge of the bounds.
- Top
Gets the vertical position of the top edge of the bounds.
- Width
Gets the total horizontal extent of the bounds (Right minus Left).
Methods
- FromRegion(TextRegion)
Builds redaction areas from a matched text region, one area per contributing text element so the redaction hugs the matched glyphs. Falls back to the region's bounding box when the region carries no elements.