Git Product home page Git Product logo

Comments (30)

simonbengtsson avatar simonbengtsson commented on September 24, 2024

I found a bug just now that means that the overflowColumns option has to be specifued in order for linebreak to work. I will fix it as son as possible, but in the mean time you can simply specify it.

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

If i specify overflow columns, It does not increase the height of row dynamically, but it increases the cell width which causes my table to extend out of the page :(

How can i achieve something similar to the last table shown in longData example considering i dnt have the json data, I have html data.

I even tried putting the same scenario in from html example of yours, But that does not work too for the overflow thing , what can i do to get it work, probably that would be same case with my html data.

from jspdf-autotable.

simonbengtsson avatar simonbengtsson commented on September 24, 2024

I just published a fix in the latest version 1.3.1. Let me know if it works for you now!

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

Awesome its working.. Just one more thing the table headers are not wrapped still. Anything i have missed? How to get that working?

from jspdf-autotable.

simonbengtsson avatar simonbengtsson commented on September 24, 2024

Sweet! Header linebreaks are not supported right now unfortunately.

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

Is there any workaround for that. I mean "th" is quite similar to "td", I need to have the header row visible properly. Let me know if there is anything i can play with to get this working. I would really appreciate.

from jspdf-autotable.

ankur2728 avatar ankur2728 commented on September 24, 2024

It is wonderful. That worked. But again linebreaks on headers are not working. Please let me know any workaround. I am using th has header. Can use td instead of th. Will it work.? Please assist.

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

Tried using td instead of th. Does not work. It seems the first row is always taken as columns.

Putting the headers in simply a row works but then it needs to have some formatting options to set background color to differentiate it from normal rows. But again there is no way to remove the default header that is to have just the data not the columns.

from jspdf-autotable.

simonbengtsson avatar simonbengtsson commented on September 24, 2024

You can style the first row using the renderCell option. And I think setting the headers parameter to false will disable/hide the header row.

from jspdf-autotable.

ankur2728 avatar ankur2728 commented on September 24, 2024

Hi Ruhi,

Please do let me know if that workaround works. And possibly if you can share the code. Thanks in advance.

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

Tried setting columns parameter to false, The header is still displayed and header text become 0..1..2...3..4 :(

Any workaround for this. Just wanted to remove the header completely.

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

Somehow i removed the header by setting its width and height to 0 from renderHeaderCell.

But there are two problems still:

  1. How to achieve having header row on everypage if i want to use first row as header?
  2. How to renderCell for background color for only top row in all the pages?

The best preferred solution would be to have line break option for header too. Other workaround require too much of extra work.

from jspdf-autotable.

simonbengtsson avatar simonbengtsson commented on September 24, 2024

Then I think the easiest way would be to change the plugin code. It wouldn't be too hard, but I won't be able to do it for a few days probably. If you end up doing it, be sure to send a pull request!

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

Unfortunately I am pretty new in Javascript. I have figured out that printHeader is the function i may have to modify, but it looks quite hard to play around with the code being not an expert in it. I would try but can you tell me by what time you could come with a fix for this?

from jspdf-autotable.

simonbengtsson avatar simonbengtsson commented on September 24, 2024

Okey! Some day this week, hopefully tonight, worst case sunday.

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

Cool, I would better wait for it and i wish you do not have to go for the worst case :). Thanks a lot for responding so quickly to this.

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

Ankur,
Are you also working over the header text wrapping issue. Let me know if you find a fix for this. It is kind of urgent for me.

from jspdf-autotable.

ankur2728 avatar ankur2728 commented on September 24, 2024

Ruhi,

I can solve this, but problem is time. I have left it as it is and working on other tasks. But i have to solve this till this friday. If we do not get the fix then i will look into this on friday or saturday in worst case.

Thanks
Ankur Garg

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

Thanks Ankur,

The same case is with me. Need to get this fixed by Friday. But since i am not an expert in javascript, It would be tricky for me to modify the plugin code. Let me know if you are able to find a fix.

Meanwhile i would also wait for Simon's fix.

from jspdf-autotable.

ankur2728 avatar ankur2728 commented on September 24, 2024

Okay. But i must say this is a wonderful plugin. I tried many others as well. Just looking for this final fix. But did you try any of plugins or normal jspdf in IE 11. In IE11 none is working. Not able to download the file in IE11. Simons, please let me know if you have ever tried to save pdf in IE11

Thanks

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

No, My requirement is little different. I am a mobile developer so i am using it one of my iPad application.

from jspdf-autotable.

simonbengtsson avatar simonbengtsson commented on September 24, 2024

A fix for linebreak in headers is up in the latest version! Sorry for the delay. Let me know if that works for you.

@ankur2728 I have tried it in IE, but not for a while. Please post an issue if it is not working for you. My plan is to support IE10+.

from jspdf-autotable.

ankur2728 avatar ankur2728 commented on September 24, 2024

Hi,

Thanks for fix.I will try that out.

Thanks
Ankur Garg

from jspdf-autotable.

ankur2728 avatar ankur2728 commented on September 24, 2024

And to apply linebreak on header. Is there anything we need to do.

from jspdf-autotable.

ankur2728 avatar ankur2728 commented on September 24, 2024

Thanks its working. Wonderful. You have been very supportive. This is a really wonderful plugin. Recommended

from jspdf-autotable.

simonbengtsson avatar simonbengtsson commented on September 24, 2024

Thanks!

from jspdf-autotable.

ruhijain avatar ruhijain commented on September 24, 2024

Awesome!! That works :) Thanks a lot for the quick update. Keep up the good work.

from jspdf-autotable.

sureeebabu avatar sureeebabu commented on September 24, 2024

how can i disable header jspdf autotable

from jspdf-autotable.

AadiHarsha avatar AadiHarsha commented on September 24, 2024

Hello, Could you please suggest while exporting HTML data table to PDF remove specific column like Action below.
remove edit action column

from jspdf-autotable.

AadiHarsha avatar AadiHarsha commented on September 24, 2024

Tried to customize below but not working.
$('#btnPDFReport').on('click', function () {
$("#dataTable").tableHTMLExport({
type: 'pdf',
filename: 'ExportToPDF.pdf',
ignoreColumns: 'Action',
//ignoreColumns: 'Action.ignore',
// ignoreRows: '.ignore'
});

from jspdf-autotable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.