I have an issue with ASPOSE.PDF when converting pdf to doc/docx.
Document pdf2wordDocument = new Document();
While initializing the Document object as soon as my project runs helps ( it reduces the process time with 15-25sec ) the conversion is still very slow.
pdf2wordDocument = new Document(outputDocDir + fileNameWithExtension); // this takes 15-25 sec - FIXED with initialization of Document object at startup
String documentExtension = saveOptions.getFormat() == 0 ? "doc" : "docx";
String outputFile = outputDocDir + fileName + "." + documentExtension;
log.info("New file to be converted -> " + outputFile + " Converting...");
pdf2wordDocument.save(outputFile, saveOptions); // This takes 65-75 seconds
pdf2wordDocument.close();
I tried both increasing the memory in MEMMIN and MEMMAX and removing the restriction all together – this has no effect on the conversion speed.
Both delays are not present when I compiled a standalone app that only converts the files. However, when implemented in the project there is a huge delay of over a minute for 4-page PDF (the limit of the Trial version of the library)
Does anyone have a clue as how to speed up the pdf2wordDocument.save()?