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

Free Support Forum - aspose.com

Doc to pdf using ASPOSE.pdf

I still get this error "Error 2 Type 'Aspose.Words.Word' is not defined"

I have included Aspose.Words and Aspose.Pdf in my Project references so I am not sure what is going on.

Any other ideas or suggestions?

Thanks!


This message was posted using Email2Forum by AdeelTaseer.

Hi,

Thank you for considering Aspose.

I am not able to reproduce this error with the following code. Please use Aspose.Words.Document instead of Aspose.Words.Word. Please check with the below code and also let me knew which version of Aspose.Pdf and Aspose.Words you are using.

Aspose.Words.Document doc = new Aspose.Words.Document(@“C:\Source Word doc.doc”);
doc.Save(@“C:\Source Word doc.doc.xml”, SaveFormat.AsposePdf);

Pdf pdf = new Pdf();
pdf.BindXML(@“C:\Source Word doc.doc.XML”, null);

pdf.IsTruetypeFontMapCached = true;
pdf.TruetypeFontMapPath = Path.GetTempPath();
pdf.Save(@“C:\Source Word doc.doc.pdf”);

Thanks.