I am looking to use Aspose.Words and Aspose.Pdf to convert Word documents to Pdf. I have downloaded the demos for testing and run the Visual Studio 2005 c# test code below (code1).
The first document I tried to convert returned the error: 'object reference not set to an instance of an object'. (Bus.doc)
The second document had a few issues with formatting (in particular the header) (Coroners Case2.doc).
I have included the word documents and pdf files created from my example as an attachment to this post.
I just need to be confident that your product will successfully convert all documents and do a good job before I purchase it.
The demo versions of Aspose I used were:
Aspose.pdf : 184.108.40.206
Aspose.words : 220.127.116.11
Hope to hear from you soon.
private void ConvertDocToPdf(string filename)
// Open the document.
Document doc = new Document(filename);
// ... You can merge data/manipulate document content here.
// Save the document in the Aspose.Pdf.Xml format.
string xmlFile = Server.MapPath("~/temp") + "/convert.xml";
// Read the document into Aspose.Pdf.
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
// Instruct to delete temporary image files.
pdf.IsImagesInXmlDeleteNeeded = true;
// This seems to speed up Aspose.Pdf if you convert multiple files in one session.
pdf.IsTruetypeFontMapCached = true;
pdf.TruetypeFontMapPath = System.IO.Path.GetTempPath();
// Produce the PDF file.
pdf.Save(Server.MapPath("~/media") + "/" + System.IO.Path.GetFileNameWithoutExtension(filename) + ".pdf");