Free Support Forum - aspose.com

Converting from MS Word to PDF?

We’re building a new web application that will allow a user to upload a MS Word file, stored it in the file system, and then create an equilvalent PDF file and store it too.

Does your PDF component let you convert from Word to PDF?

How easy is it? Just one function call? Do you have sample code that does this?

Thanks!

Dear DeanJG,

Thank you for considering Aspose.

You can use Aspose.Word + Aspose.Pdf to convert Word document to Pdf. It is very easy, here is an example:

[c#]
Document doc = new Document(“input.doc”);
doc.Save(“input.xml”,SaveFormat.FormatAsposePdf);

Pdf pdf = new Pdf();
pdf.BindXML(“input.xml”,null);
pdf.Save(“output.pdf”);

[VisualBasic]
Dim doc As Document = new Document(“input.doc”)
doc.Save(“input.xml”,SaveFormat.FormatAsposePdf)

Dom pdf As Pdf = new Pdf
pdf.BindXML(“input.xml”,Nothing)
pdf.Save(“output.pdf”)

What about Java?

Hi,

Word to Pdf functionality is not currently supported in Java version.

Thanks.