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

Free Support Forum - aspose.com

Error converting word document to pdf or image

I am unable to convert a document the error i get is:

Exception Message: Cannot convert ‘261’.
Stack Trace:
at ?.?.?(Hashtable ?, Object ?, Object ?)
at ?.?.?(? ?, ? ?)
at Aspose.Words.Document.SaveToPdf(Int32 pageIndex, Int32 pageCount, Stream stream, PdfOptions options)
at Aspose.Words.Document.SaveToPdf(Int32 pageIndex, Int32 pageCount, String fileName, PdfOptions options)

This is a simple test document that is almost empty. A header with a table and some bookmarks and a small body with plain text.I havn’t seen this error on other documents that are more complex. Anybody that has seen error before?



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

Thanks for your request. It seems, this problem is already resolved in the current codebase. The fix will be included into the next hotfix, which will be released within few weeks. You will be notified. As a workaround please try using the following code and let me know how it goes on your side:

Document doc = new Document(@"Test001\in.doc");

foreach (Section section in doc.Sections)


section.PageSetup.FirstPageTray = PaperTray.DefaultBin;

section.PageSetup.OtherPagesTray = PaperTray.DefaultBin;



Hope this helps.

Best regards,


that works as a workaround.


The issues you have found earlier (filed as 11758) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.