Table of Contents

Class FreeSpaceFinder

Namespace
MiPdf.Content
Assembly
MiPdf.dll

Finds empty areas of a page, e.g. to place a signature or a stamp where it does not cover content. Occupied are text (word boxes), images, painted vector graphics (bounding boxes) and – optionally – annotations. The result consists of maximal free rectangles (they may overlap), largest first.

public static class FreeSpaceFinder
Inheritance
FreeSpaceFinder
Inherited Members

Methods

Find(PdfPage, double, double, bool)

Maximal free rectangles of at least minWidth x minHeight points within the crop box of page, largest first.

public static IReadOnlyList<PdfRectangle> Find(PdfPage page, double minWidth, double minHeight, bool includeAnnotations = true)

Parameters

page PdfPage

The page to analyze.

minWidth double

Minimum width of a free rectangle in points.

minHeight double

Minimum height of a free rectangle in points.

includeAnnotations bool

Treat the rectangles of annotations as occupied (popup and hidden annotations are ignored).

Returns

IReadOnlyList<PdfRectangle>

Find(PdfRectangle, IEnumerable<PdfRectangle>, double, double)

Maximal free rectangles inside area that do not intersect any occupied rectangle.

public static IReadOnlyList<PdfRectangle> Find(PdfRectangle area, IEnumerable<PdfRectangle> occupied, double minWidth, double minHeight)

Parameters

area PdfRectangle
occupied IEnumerable<PdfRectangle>
minWidth double
minHeight double

Returns

IReadOnlyList<PdfRectangle>