How to call pdf2txtocr software from Java source code to convert from Non Searchable PDF files to Searchable PDFs?

Recently we bought a license of pdf2txtocr software to convert from Non Searchable to Searchable PDFs.

There are two issues. Please let us know how to fix these issues,

1. I am trying to run the below command.

pdf2txtocr.exe -ocr -ocrmode 1 -res 72 C:\pdf2txtocrcmd\_test\Test3.pdf C:\pdf2txtocrcmd\_test\Test3_ouput.PDF

Output PDF generated is not searchable.
But with the trial/free version, same command worked to convert to searchable PDFs.

2. We are trying to run the command in the Java program. It is not coming out of program after the execution.

Customer
--------------------------------

VeryPDF PDF to Text OCR Converter Command Line
http://www.verypdf.com/app/pdf-to-text-ocr-converter/index.html

image
>>1. I am trying to run the below command.
>>pdf2txtocr.exe -ocr -ocrmode 1 -res 72 C:\pdf2txtocrcmd\_test\Test3.pdf C:\pdf2txtocrcmd\_test\Test3_ouput.PDF
>>Output PDF generated is not searchable.
>>But with the trial/free version, same command worked to convert to searchable PDFs.

Could please send to us your sample PDF file for debug purpose? after we check your sample PDF file, we will figure out a solution to you asap.

>>2. We are trying to run the command in the Java program. It is not coming out of program after the execution.

You may run following Java code to try again, could you see "Conversion done." message in the console after conversion is done?

public class Command
{
    public static void main(String[] args) throws java.io.IOException, InterruptedException
    {
        String strCmd = "C:\pdf2txtocrcmd\pdf2txtocr.exe
                              -ocr -ocrmode 1 -res 72 C:\pdf2txtocrcmd\_test\Test3.pdf
                                C:\pdf2txtocrcmd\_test\Test3_ouput.PDF";

        Process p = Runtime.getRuntime().exec(strCmd);
        System.out.println("Waiting for conversion ...");
        p.waitFor();
        System.out.println("Conversion done.");
    }
}

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!