Free Support Forum - aspose.com

Exception when converting this document from word to pdf

The attached word document will trigger an exception when opened with apose word and saved to pdf format. This is the very simple code used:


Document theSourceFile = null;


theSourceFile = new Document(theFileName, LoadFormat.FormatAuto, null);


MemoryStream theMemoryStream = new MemoryStream();


theSourceFile.Save(theMemoryStream, SaveFormat.FormatAsposePdf);




I have no idea what the problem is.

The problem is caused by list autonumbering scheme in table's first column.

Try to change it to a simplier form as a workaround, while we shall try to fix the problem.

To be more exact, the problem was caused by list level 3 starting immediately after list level 1 and list label using numbers for all list levels (1.1.a). List number for level 2 was not internally initialized. I fixed this and it will go out in Aspose.Word 3.5 at the end of January.

If you want a workaround, make sure that when you use list numbers such as 1.1.1, you don't have gaps in list levels. E.g. level 2 starts after level 1, level 3 starts after level 2 and so on.