Here's an example with the following CSS rules for a four-column table: table For example, adding a width specification to your table td, table th style rules. To mimic this basic behavior in Html2PDF, you could simply add equivalent widths to your cells explicitly. (For example, a 4-column table has all cells at 25%) However, it doesn't support the CSS you're using so the markup would require a little tweaking to go that route. TCPDF's native writeHTML will set each column to be the same width absent any specifications otherwise. (And due to some odd behavior with the width attribute in Html2PDF, use CSS to set the widths.) It implements it's own, and it's implementation won't grow the columns automatically to fill 100% of the space.Īs such, in Html2PDF, not only do you need to set 100% width on the table, but you need to set percentage widths for each of the cells. Html2PDF doesn't use TCPDF's HTML parser/render system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |