I would like to save a document in a Pdf format with Aspose.Words.
The document was generated with reporting services in doc format and save in docx with Aspose.
Then I insert some picture in it and I want to save the document in Pdf but when I try to open it next, I have this error :
“Adobe Reader could not open doc1.pdf because the file type is not supported or the file is corrupted…”
When I saved it, I put SaveFormat.AsposePdf. What format this is ? Is this normal Pdf ? Why this isn’t aveFormat.Pdf ?
Thanks for your inquiry. Can you please share your input / output documents along with code snippet to narrow down the problem. Please also share Aspose.Words version.
Thanks for your inquiry. While using latest Aspose.Words v.10.8, i could not reproduce this error. Moreover i will suggest you to use latest Aspose.Words. I have attached output Pdf file.
Code snippet:
Dim doc As New Document(“c:/temp/PvRecette_15_1.docx”)
doc.Save("c:/temp/PvRecette_15_1Out.pdf", SaveFormat.Pdf)
Please follow up the link to download latest Aspose.Words.
Just to clarify, you are using an old version which still used Aspose.Words + Aspose.Pdf to convert word files to PDF. A long time ago we started using our own in-built renderer which allowed for much greater fidelity. This is now the SaveFormat.Pdf format. The SaveFormat.AsposePdf has been completely removed from the latest versions.
I actually use an old version of Aspose.Words but I don’t use Aspose.Pdf.
And indeed, in the new version of Aspose.Words there isn’t SaveFormat.AsposePdf anymore. It is replaced by SaveFormat.Pdf instead.
Thanks for your details. It is great to hear that your issue has been resolved. You are always welcome and please feel free to ask if you have any query in future.
We always welcome constructive response from our customers.