public interface

PdfPage

com.pspdfkit.api.PdfPage

Class Overview

Represents an instance of a page from a PDF Document. See getPage(int) to retrieve a page from a document.

Summary

Public Methods
abstract PdfPageInfo getPageInfo()
Retrieve information about the page.
abstract List<TextBlock> getTextLines()
Retrieves all the text on the page split into a list of TextBlock representing each line of text and its coordinates.
abstract BufferedImage renderPage(int width, int height)
Render a page to a bitmap at the size of the page request.
abstract BufferedImage renderPage()
Render a page to a bitmap with the dimensions found in getBoundingBox()

Public Methods

public abstract PdfPageInfo getPageInfo ()

Retrieve information about the page.

Returns

public abstract List<TextBlock> getTextLines ()

Retrieves all the text on the page split into a list of TextBlock representing each line of text and its coordinates. Text lines end with CRLF (`\r\n`).

Returns
  • A list of TextBlock representing the lines of text and their coordinates on the page. Returns an empty list if there is no readable text on the page.

public abstract BufferedImage renderPage (int width, int height)

Render a page to a bitmap at the size of the page request.

Parameters
width Width of the rendered image.
height Height of the rendered image.
Returns

public abstract BufferedImage renderPage ()

Render a page to a bitmap with the dimensions found in getBoundingBox()

Returns