CSS applied on divs inside table cell not reflecting in pdf

Hi,

We are using version 21.3.0 of aspose.word to generate pdf from html string. We need to use div inside table cell. CSS applied on div is not reflected in the generated PDF. Need your help to solve this issue. doc.zip (69.9 KB)
Attached are sample html and generated pdf from that html. Please refer 3rd and 4th row (last cell) of the first table.

@snpatil actually this is the expected behavior. Aspose.Words API don’t support the use of divs in the way that you are trying to use and this is on purpose, because Aspose.Words try to replicate how MS Word process the documents and if you perform the same operation using MS Word you will receive the same output. The use of divs inside a cell is not represented as new cells in MS Word.

Please use the following html code instead: SampleHtml.zip (4.7 KB)

Okay. Thanks a lot!

1 Like