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

Free Support Forum - aspose.com

Using aspose.word instead of ms.word on DDE or OLE

I have a program using visual pdf print to convert any file into pdf format automatic.(I don’t sure the method called DDE or OLE). How colud I replace ms.word to aspose.word? Thanks.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your interest in Aspose.Words. Currently there are two ways to convert Word document to PDF using Aspose.Words.

1. Direct conversion (without using Aspose.Pdf). Here is code:

Document doc = new Document("in.doc");

doc.SaveToPdf("out.pdf");

2. Another option is using Aspose.Words+Aspose.Pdf (old method). Here is code:

Document doc = new Document("in.doc");

//Save in intermediate AsposePdf format

MemoryStream aPdfStream = new MemoryStream();

doc.Save(aPdfStream, SaveFormat.AsposePdf);

//Create Aspose.Pdf.Pdf document

Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();

pdf.BindXML(aPdfStream, null);

//Save pdf

pdf.Save("out.pdf");

Best regards.