Hi,
We have licensed version of java aspose-pdf (v19.12) which we use to convert PDF to word. It is working fine for smaller pdfs. We have a usecase to convert PDF of size 30mb to word, but it is emitting StackOverflow error.
InputStream myInputStream = new ByteArrayInputStream(inputPDFData);
Document document = new Document(myInputStream);
DocSaveOptions saveOption = new DocSaveOptions();
saveOption.setMode(DocSaveOptions.RecognitionMode.Textbox);
saveOption.setRelativeHorizontalProximity(2.5f);
saveOption.setRecognizeBullets(true);
saveOption.setFormat(DocSaveOptions.DocFormat.DocX);
ByteArrayOutputStream docxOutputStream = new ByteArrayOutputStream ();
try {
document.save(docxOutputStream, saveOption);
} catch (Exception e) {
e.printStackTrace();
}
byte[] byteFile = new RibbonCreator().create(docxOutputStream.toByteArray());
if (debug == true && targetWrite != null) {
FileUtils.writeByteArrayToFile(new File(Output.docx"), byteFile);
}
myInputStream.close();
document.close();
docxOutputStream.close();