I am facing some issues in conversion from pdf to word
It is taking too long for larger files. For example for a file of size 6.6 MB that I uploaded it took approximately 5 minutes. This is the code I used
Document document = new Document(file.getInputStream());
DocSaveOptions saveOption = new DocSaveOptions();
document.save(convertedFileName, saveOption);
document.close();
This is the file I used Sample_File_6_6MB.pdf (6.3 MB)
The converted docx file doesn’t show proper format in libre office. It shows proper in XPS
We have been able to notice several minutes time for the conversion and a ticket ith ID PDFJAVA-39003 has been logged in our issue management system for further investigations. About proper formatting, would you please share generated word document along with screenshots of problems so that we may investigate further.
Another ticket with ID PDFJAVA-39005 has been logged to investigate formatting differences and we will let you know once any update will be available in this regard.
We have investigated the ticket and got 100-110 seconds conversion time with Java and 90 seconds conversion time with .NET API. The document contains 158 pages with graphics and images on almost every page, and we think this is an acceptable time for such a document.
Also, we can recommend to decrease image resolution in conversion options to speed-up conversion:
//default value is 300, decreasing value to 150 makes conversion faster on 10-20%
saveOption.setImageResolutionX(150);
saveOption.setImageResolutionY(150);
In case you still experience any issue, please share your complete environment details i.e. OS Name and Version, JDK Version, Application Type, etc. with us.
The problem with formatting occurs after conversion in DOC format. We recommend using the following option to convert in DOCX format and then it shows the proper format in Libre office under Linux.
The issue with .doc (not .docx) is not Aspose.PDF bug, but LibreOffice issue for Linux edition with doc format. The converted document can be opened in other viewers that supports DOC format without any format issues.
We have tested the following viewers:
LibreOffice for Windows, LibreOffice for MacOS, Apache OpenOffice, Microsoft Office, File Viewer Plus, etc.