How to extract text from PDF using PDFExtStream using Java

1.6k views Asked by At

Text is not extracted from Sample.pdf file by using pdftextstream-2.6.3.jar

String filePath = "D:\\inbox\\temp\\Sample.pdf";
File document = new File(filePath);
StringBuffer pdfText = new StringBuffer(1024);
com.snowtide.pdf.OutputTarget tgt = new com.snowtide.pdf.OutputTarget(pdfText);
PDFTextStream stream = new PDFTextStream(document);
stream.pipe(tgt);
stream.close();
1

There are 1 answers

2
cemerick On BEST ANSWER

Earlier today, we released PDFxStream v3.1.2. This is a bugfix release that includes a fix for the issue you encountered here.

In the future, please do get in touch with us directly if you have any difficulties, at [email protected]; we do everything we can to support our customers and users.