Java PDF Reader/Writer Library/Component/API

Create, manipulate (read and write), disassemble PDF files easily.

OCR PDF Files with Asprise Java PDF Reader (with Text Extract)/Writer Library and Asprise OCR Engine

Sample code:

import com.asprise.util.pdf.PDFReader;
import com.asprise.util.ocr.OCR;

PDFReader reader = new PDFReader(new File("my.pdf"));
reader.open(); // open the file.
int pages = reader.getNumberOfPages();

for(int i=0; i < pages; i++) {
   BufferedImage img = reader.getPageAsImage(i);

   // recognizes both characters and barcodes
   String text = new OCR().recognizeAll(image);
   System.out.println("Page " + i + ": " + text);
}

reader.close(); // finally, close the file.

For more details on Asprise PDF library, please read Developer's Guide or view the Javadoc.

For more deitals on Asprise OCR engine, please visit this page.


< < Go back to product page