Package com.pspdfkit.utils
Class PdfUtils
-
- All Implemented Interfaces:
public class PdfUtils
Collection of useful methods for working with PDF documents.
-
-
Constructor Summary
Constructors Constructor Description PdfUtils()
-
Method Summary
Modifier and Type Method Description static RectF
createPdfRectUnion(List<RectF> pdfRects)
Creates a union of a list of pdfRects
.static RectF
boundingBoxFromLines(List<List<PointF>> lines, @FloatRange(from = 0.0) float lineWidth)
Calculates the bounding box from lines (specified in PDF coordinates). -
-
Method Detail
-
createPdfRectUnion
@NonNull() static RectF createPdfRectUnion(List<RectF> pdfRects)
Creates a union of a list of
pdfRects
. The providedpdfRects
have to be in the PDF coordinate space. Examples for rects used with this method are pageRects, or the getBoundingBox.- Parameters:
pdfRects
- List of PDF rects on which to apply the union.
-
boundingBoxFromLines
@NonNull() static RectF boundingBoxFromLines(List<List<PointF>> lines, @FloatRange(from = 0.0) float lineWidth)
Calculates the bounding box from lines (specified in PDF coordinates).
- Parameters:
lines
- List of lines, where line is defined by the list of points in PDF coordinates.lineWidth
- Line width in PDF points.- Returns:
A rect defining the bounding box around the specified lines, including the width in calculations.
-
-
-
-