Problems converting a doc to pdf via aspose.word to aspose.pdf


#1

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.


#2

Dear jhoward88,

Thank you for considering Aspose.

I will add support for list in table. This feature will be available in several days.


#3

Dear jhoward88,

Thank you for considering Aspose.

List in table cell is now supported. Please download hot fix here.

As to your second problem, I will contact the Aspose.Word team to adjust the output XML.


#4

Better support for lists is included in Aspose.Word 1.7.1


#5

Hi Roman, Tommy,
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.
Thanks for your help,
Jerry

#6

Dear Jerry,

Thank you for considering Aspose.

I have fixed this bug. Please download hot fix here.


#7

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.

Thanks for your help,
Jerry


#8

Dear Jerry,

Thank you for considering Aspose.

I have fixed this bug. Please download hot fix here.


#9

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.

Regards,
Jerry


#10

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.