Convert Reporting Services DOC DOCX Word Document to PDF using VB .NET and Open PDF in Adobe Reader

Hi,

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 ?

Hi
Pierre-Yves,

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.

Ok,

For my code this is very simple :

Dim docPvClient As Aspose.Words.Document = New Document("doc1.pdf", LoadFormat.Docx, "")
docPvClient.Save(docName, SaveFormat.AsposePdf)

For the document, you can see the attach document (in docx).

And I use the version 5.2.0.0 of Aspose.Words.

Thanks you.

Hi Pierre-Yves,

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.

https://releases.aspose.com/words/net/
In case of any ambiguity, please let me know.

Ok,

thank you. I can’t test it now because my licence is expired.

Hi Pierre-Yves,

Thanks for your details. You can request a 30-Day Temporary License. For more description, please follow up the link.

https://purchase.aspose.com/temporary-license

In case of any ambiguity, please let us know.

Hi there,

Thanks for your inquiry.

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.

Thanks,

Hi,

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.

Hi,

And a big thank you ! It work, I took a temporary licence and It work.

So my probleme was a version probleme.

Thank you.

Hi,

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.