Linebreaks in header working but height of header not increasing
Linebreak is allowing Headers to break in the next line but height of the header does not increase. Please let me know the urgent fix. If it requires much time to fix, then please let me know how can i set the width of each column. I am using HTML table to export it into pdf. Please assist as soon as possible.
Thanks
It works in the example I set up here. Can you post the code you are using where it doesn't work? To set custom column widths you would have to loop over the columns extracted by the autoTableHtmlToJson function and create an array of objects on this format:
var columns = [
{title: "ID", key: "id", width: 100},
{title: "Name", key: "name", width: 200},
...
];
Hi..i am.able to download file in IE11. Headers height is not increasing in ie 11 . It is working in chrome and firefox. As the resuly broken characters are hiding. So thinking of adjusting with custom width.
Thanks
Nothing special in code..simple html table with no css applied..used simple code given in your samples
Hi, I agree with ankur2728: the line height calculation of headers doesn't always work correctly. Reason: splitTextToSize() takes the current font style into account, when it decides to split a text line. The default output function for header cells (renderHeaderCell) uses a bold font style, which also needs to be set before calculating the rowHeight value. This effect only occures if the text would fit into the cell when a normal font style is set, but does not fit when the style is set to bold. See also changes in pull request https://github.com/someatoms/jsPDF-AutoTable/pull/46
This should now be fixed in version 2.0.