public class

PdfUtils

extends Object
java.lang.Object
   ↳ com.pspdfkit.utils.PdfUtils

Class Overview

Collection of useful methods for working with PDF documents.

Summary

Public Constructors
PdfUtils()
Public Methods
static RectF boundingBoxFromLines(List<List<PointF>> lines, float lineWidth)
Calculates the bounding box from lines (specified in PDF coordinates).
static RectF createPdfRectUnion(List<RectF> pdfRects)
Creates a union of a list of pdfRects.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PdfUtils ()

Public Methods

public static RectF boundingBoxFromLines (List<List<PointF>> lines, 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.

public static RectF createPdfRectUnion (List<RectF> pdfRects)

Creates a union of a list of pdfRects. The provided pdfRects 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.