-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug exporting invisible column to PDF #19
Comments
I'm getting the same behavior. Apparently bug is caused by fnCalcColRatios function, which calculates invisible column width as 0:
Not sure what the good fix would be though, to get proper width we need to render the column, i.e. make it visible. |
Hmmm - tricky one. Note sure what the correct thing to do is either. Possibly calculate the widths based on the content of the headers ( |
Any update on this? |
Sorry no. I've not had time to work on it yet. |
A hack, super easy, super fast, "at least it looks better than terrible" workaround until someone figures out something better: iWidth = aoCols[i].nTh.offsetWidth;
if (!iWidth && typeof iDTTTDefaultHiddenColumnWidth !== 'undefined') {
iWidth = iDTTTDefaultHiddenColumnWidth;
} then we set the variable in the global scope to have a reasonable default (we have one table per page, we tune to that specific table). Even simpler could be I know, I know, it's hideous and horrible, I'm not suggesting this as a change to the mainline. It has the advantage of getting us up and running again without rolling our own PDF generator, I figured I'd pass it along to other desperate coders. :-) |
I found a bug where a column with property
"bVisible":false
is not properly exported to PDF. I have written a sample HTML page, see https://gist.github.com/4599023. Unfortunately you have to run the HTML page from a local webserver because of Flash security restrictions. (It seams the .swf must be served from the same webserver as the HTML file, opening the file with the browser wan't work. I also wrote a jsFiddle with the same problem, perhaps because of the iframe).The example contains a table with 4 columns, the 3rd column is hidden with
"bVisible":false
. I would like export all 4 columns, TableTools has been configured with:The exported PDF has the 4th column merged into the 3rd.
The text was updated successfully, but these errors were encountered: