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

Free Support Forum - aspose.com

Table rowspan differs from PDF and Docx output

I’m trying to generate a table with some vertical merged cells by setting the CellFormat.VerticalMerge property. When the document is saved as docx the table is as expected:

But when the document is saved as pdf there’s a difference:

I also created a matrix of the CellFormat.VerticalMerge property value, but as far as I can see it matches with the expected table in the docx:

Is there anything I have to do before saving the document as docx?

@zwenvanerkelens Could you please attach your output DOCX and PDF document along with sample code that will allow us to reproduce the problem? We will check the issue and provide you more information.

example.docx (13.8 KB)
example.pdf (43.3 KB)

Unfortunately I can’t share the code and I want to try explain what the code does, before I create some sample code.

As the image above illustrates the code combines multiple rows into a table. When creating a new table the second row must be prepended with a new cell that is merged with cell “Column 1.0”.
To create a new cell I do the following:

row.PrependChild(new Cell(documentBase)
    CellFormat = { VerticalMerge = CellMerge.Previous }

Will this help?

@zwenvanerkelens Thank you for additional information. I have managed to reproduce the problem on my side. For a sake of correction it has been logged as WORDSNET-24625. We will keep you informed and let you know once it is resolved.

1 Like