I have licence for Aspose Words. On desctiption page of Aspose Words there is written that I can export Document to PDF. But in code there is no PDF member of SaveFormat enum. There is only AsposePdf which is not working in Adobe Reader. How to export word document to PDF which users can open using standard PDF reading software?
Aspose.Words.Document d = new Document(Server.MapPath("aaa.doc"));
d.Save(Server.MapPath("aaa.pdf"),SaveFormat.AsposePdf);
Hi Maciej,
Thanks for your inquiry. Yes, Aspose.Words supports the MS Word document to PDF conversion. Please read Aspose.Words LoadFormat and SaveFormat form following documentation links.
https://reference.aspose.com/words/net/aspose.words/loadformat
https://reference.aspose.com/words/net/aspose.words/saveformat/
Please check the following documentation links for detail:
https://docs.aspose.com/words/net/convert-a-document-to-pdf/
https://docs.aspose.com/words/net/loading-saving-and-converting/
Document doc = new Document(MyDir + "in.docx");
doc.Save(MyDir + "AsposeOut.PDF");
Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.
Hi,
Sorry it is not working. Following code still saves document in some strange format. When I view the file I can see the XML structure which is not valid PDF format structure.
And I can not open it in normal Adobe Reader.
Hi Maciej,
Could you please attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.