We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Conversion PDF to DOC is not correct

Hi,
i'm trying Aspose PDF for Java because i want integrate it on my swing application but the conversion from PDF to DOC/ODT is not good for me.
I Attach a original PDF and correspondents DOC and DOCX.

Thank's

Hi Stefano,


Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for Java 10.8.0 while using following code snippet and I am unable to notice any issue. For your reference, I have also attached the output generated over my end.

It appears that the problem is occurring when using API in trial mode. Can you please try requesting a 30 days temporary license to test the API without any limitations. Get a temporary license

[Java]

// load source PDF file<o:p></o:p>

com.aspose.pdf.Document doc = new com.aspose.pdf.Document("c:/pdftest/Avviso1.pdf");

// save output in DOCX format

doc.save(“c:/pdftest/Avviso1.docx”,
com.aspose.pdf.SaveFormat.
DocX);

Hi,

thank’s for your response but with your same code, Temporary license, same pdf file and Aspose.Pdf for Java 10.8.0 i have an corrupt Docx attached…why?
Instead the DOC is correct.

So how can convert PDF in ODT format?
Hi,
i tried PDF to DOC conversion with another PDF file and i have this incorrect result.

stefano81:
thank’s for your response but with your same code, Temporary license, same pdf file and Aspose.Pdf for Java 10.8.0 i have an corrupt Docx attached…why?
Instead the DOC is correct.
Hi Stefano,

Thanks for sharing the resource files. I have observed that DOCX file is corrupted and DOC file opens fine. Please note that I used Eclipse Juno application with JDK 1.7 running over Windows 7 (x64) and the DOCX file generated over my end opens fine. Can you please share some details regarding your working environment so that we can again test the scenario using that configuration.
stefano81:
So how can convert PDF in ODT format?
Aspose.Pdf for Java only offers the conversion from PDF to DOC/DOCX. However it does not offer the feature to convert PDF file to ODT format. In order to accomplish this requirement, you need to first convert PDF file to DOCX format using Aspose.Pdf for Java and then use Aspose.Words for Java to convert DOCX file to ODT format. For more information, please visit Loading, Saving and Converting

stefano81:
Hi,
i tried PDF to DOC conversion with another PDF file and i have this incorrect result.
Hi Stefano,

Please share the resource PDF file so that I can test this scenario.

Hi,

i use Eclipse Mars with JDK 1.8.0_45 over Windows 7 (x64).

Hi,

attach PDF file and DOC and DOCX generated.

Hi Stefano,


Thanks for sharing the resource files.

During my testing using Aspose.Pdf for Java 10.8.0 where I have used following code snippet with JDK 1.8_20 on Windows 7 (x64), I did not notice any issue and resultant file opens without any problem. Can you please share some additional details (Windows Local settings etc) and code snippet which you are using.

[Java]

com.aspose.pdf.Document document = new
com.aspose.pdf.Document(
“C:\pdftest\protocolli.pdf”);<o:p></o:p>

document.save(“C:\pdftest\protocolli_output.docx”,
com.aspose.pdf.SaveFormat.
DocX);

Hi,

this is my code:

com.aspose.pdf.Document docPdf = new com.aspose.pdf.Document(“G:\download\JasperReports\test\protocolli.pdf”);
// save output in DOCX format
docPdf.save(“G:\download\JasperReports\test\protocolli.docx”, com.aspose.pdf.SaveFormat.DocX);

My Windows Local settings is Italian (Italy).

Hi Stefano,


Thanks for sharing the details.

I have tried viewing the DOCX file which you have shared in earlier post and have observed that an error message appears when viewing the document. However during my testing where I have set Regional & Language settings as Italian (Italy) over Windows 7 (x64), the resultant file opens without any error message. However I have observed some formatting issues (row border overlaps table cells contents). For the sake of correction, I have logged this problem
as PDFNEWJAVA-35275 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.