Is it possible to generate with Tess4j the byte[] of a PDF with OCR instead of a physical file?
I need to make PDF files searchable via OCR, it works but I would like to avoid this step.
Tesseract tessInst = new Tesseract();
tessInst.setDatapath("C:\\Tess4J");
List<RenderedFormat> list = new ArrayList<RenderedFormat>();
list.add(RenderedFormat.PDF);
tessInst.createDocuments(inputFile.getPath(), "C:\\a\\b\\b\\Tess4J\\filename", list); // i dont want to create this, i just need a byte[]!
Thx!
No, Tesseract does not support it. TessPDFRendererCreate
expects a string for file path as input.