The Ultimate Java PDF Library SDK

Seamless PDF Integration for Java

Download Trial Purchase

How to Extract Text from PDF files

Learn About JPedal Text Extraction


The links below provide links to Javadocs with example source code for extracting text from PDF files.

PDF to Text Extraction Options

Because the PDF was originally designed as a display format, it does not generally contain formatted text, just blocks of unconnected text in a possibly random order. JPedal provides the ability to extract these text blocks and heuristics to merge them into useful content.

If you are creating PDFs, we recommend you create PDFs which contain structured/marked Content. This additional option includes extra metadata in the PDF so text can be perfectly extracted.

Coordinates Used

The three extraction methods all extract PDF text in a given rectangle, the required format of the coordinates of this rectangle are x1, y1 (top left hand corner), and x2, y2 (bottom right). The page origin is bottom left (opposite to Java).

IDRSolutions Limited 1999-2016