I have a bit of test code that converts a doc from Word to pdf format: something like:
Dim word As word = New word Dim doc As Document = word.Open(MapPath(".") + “…\Documents\test01.doc”) Dim pdf1 As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf doc.Save(MapPath(".") + “…\Documents\test01.xml”, SaveFormat.FormatAsposePdf) pdf1.BindXML(MapPath(".") + “…\Documents\test01.xml”, Nothing) pdf1.Save(MapPath(".") + “…\Documents\test01.pdf”)
It works fine except if I have a list within a table cell in my original document I get the error: Unknown sub element in Cell element. The element name is Heading. This occurs when the BindXmL method is executed.
A second problem is that a nested list will not indent the nested part. For instance 1. Line One * bullet line one. 2. Line 2
comes out as 1. Line One * bullet line one. 2. Line 2 in the pdf.
Sorry to bring you problems, but I need these list features if I am to use the Aspose products.
I downloaded your latest fixes for aspose.pdf (hotfix) and aspose.word (17.1) that you mentioned in answer to this issue.
These helped, but there are still serious problems. I have emailed you a zip file containing the input .doc, the .xml that Aspose word produced, and the final .pdf output. Check them out. Text overflows the tables and some text that should be in the last table is now at the beginning of the document.
Hi Tommy, Your fix did fix the lines that were overflowing the table. That’s good. But some bulleted lines still appear totally outside the table. You can use the same files I sent before to check this.
The contents of the cell that follows “Action” in the last table actually gets duplicated twice in the resulting pdf. Once at the top of the document and once following the table. Very odd.
Dear Tommy, Much better! This is getting very close. One small problem remains: When a table is continued across a page break, the first cell of the last row is on the previous page and the contents of the second cell is on the next page. So the row gets oddly split across the page.
For me this shows up in the example I sent you in the second table. The “Action” row gets split this way. Our documents have many tables that this would happen to so it is still important to us.
We are looking into this. Tommy reckons Aspose.Word outputs some list margins incorrectly, but I’m struggling to understand how list margins can result in the cell being rendered onto one page, while the text of the cell rendered onto another.