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

Free Support Forum - aspose.com

Save Document as PDF with Asopose Words?

I am trying to save a document as a PDF but am having difficulty. The help files say to save the file as an xml then convert it to PDF with the following:

' Save the document in Aspose.Pdf.Xml format.
doc.Save("MyDocument.xml", SaveFormat.AsposePdf)
' Read the document in Aspose.Pdf.Xml format into Aspose.Pdf.
Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf()
pdf.BindXML("MyDocument.xml", Nothing)
' Instruct to delete temporary image files.
pdf.IsImagesInXmlDeleteNeeded = True
' Produce the PDF file.
pdf.Save(BidDocPathName + ".pdf")

This implies that the Aspose.pdf component is required? Is this correct? The website lists PDF as one of the supported formats for Aspose word. One would think that you could create a file in a supported format without spending an additional $600 or am I missing something?

Thanks for your request. Both Aspose.Words and Aspose.Pdf are required for Doc to Pdf conversion. Aspose.Words creates intermediate XML file that is used by Aspose.Pdf for creating Pdf document.
Best regards.

Ok. Thanks for the info.

While evaluating the tool, it’s quite misleading to provide a function like this:
doc.Save(“out.pdf”, SaveFormat.AsposePdf)
Looks like it should create a PDF, but it’s corrupt.

Thanks for your request. Aspose.Words doesn’t save document directly to Pdf format. AsposePdf is an intermediate format. It is XML that is used by Aspose.Pdf for creating PDF document. See the following link to learn how to convert Doc to Pdf.
Best regards.