Skip to content
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

Cell border is not printed when a cell has rowspan which breaks page. #480

Closed
rong4188 opened this issue Apr 5, 2019 · 18 comments
Closed

Comments

@rong4188
Copy link
Contributor

rong4188 commented Apr 5, 2019

image

When a rowspan breaks through a page, the first several rows with rowspan cells in the second page has no border.

@simonbengtsson
Copy link
Owner

Interesting, do you have any minimal sample code to reproduce this with?

@simonbengtsson
Copy link
Owner

Is this the same as can be observed currently in the row and colspan example?

@rong4188
Copy link
Contributor Author

rong4188 commented Apr 5, 2019

@simonbengtsson yes I think so. When a rowspan cell breaks through page, the method doc.rect is called when rendering the cell. Then after a new page is added, it won't call doc.rect again to print cell border because it doesn't have any information about the cell which has already been rendered in the last page. it seems that some extra information and calculation would be needed when cell height > page remaining space.

rong4188 pushed a commit to rong4188/jsPDF-AutoTable that referenced this issue Apr 12, 2019
rong4188 pushed a commit to rong4188/jsPDF-AutoTable that referenced this issue Apr 12, 2019
@Fr4gger
Copy link

Fr4gger commented Apr 29, 2019

Hello. Thanks for the great work with this plugin. Is there a solution yet for this issue? I've encountered this when there are columns breaking to a new page with a colspan of a large number. Thanks in advance.

@rong4188
Copy link
Contributor Author

@Fr4gger I am just using the version I modified as above commits at the moment, but it doesn't seem to be merged so far. it is not a complicated fix so probably you can just go through the commits and modify your local code to see if it works for you.

@okon3
Copy link

okon3 commented Apr 30, 2019

@rong4188 Your pull requests are both closed

@Fr4gger
Copy link

Fr4gger commented Apr 30, 2019

@rong4188 Thanks for the suggestion. I am trying this right now. I'll let you know the results. One question though, do I need to compile the code again? If so, how can I do that? Currently I am pointing to jspdf.plugin.autotable.js, should I point to /src instead? Thanks in advance.

@rong4188
Copy link
Contributor Author

@okon3 yep the PR is closed by bot. there is nothing I can do at the moment.

@rong4188
Copy link
Contributor Author

@Fr4gger you can simply try to find the nearby code piece in jspdf.plugin.autotable.js then modify it as the PR, just to see if it works for you.

@Fr4gger
Copy link

Fr4gger commented May 15, 2019

@rong4188 thanks for your help. Unfortunately after changing the code with the lines you added the result is the same. It is not working for me. Do you know if there is any kind of solution planned to be released in order to fix this issue in the near future? This is the result I am getting with tables using rowspan:

Screen Shot 2019-05-15 at 2 23 42 PM

As you see, in the second page the first row borders disappear. Any help would be greatly appreciated. Thanks in advance.

@rong4188
Copy link
Contributor Author

@Fr4gger Hi, I just open another pull request includes the jspdf.plugin.autotable.js. can you just download it and give a shot?

@Fr4gger
Copy link

Fr4gger commented May 16, 2019

@rong4188 Thanks for opening the PR for me to test. Unfortunately I am getting the same error.

Screen Shot 2019-05-16 at 9 01 13 AM

Thanks anyway. I hope the issue could be solved in the future.

@rong4188
Copy link
Contributor Author

@Fr4gger hmm, do you have a working site that I can have a look at it? or a minimal example with your data?

@Fr4gger
Copy link

Fr4gger commented May 17, 2019

@rong4188 Unfortunately there is no instance available that isn't local yet for our project. But I created a little example in jsfiddle containing the data which I am using to build the table, and the html built table using the data. The js container only has a variable with the data and it is not used to build the table, but the result in the html container is the table which is breaking when trying to export to PDF.

https://jsfiddle.net/Thunderlight/j389prsy/8/

@simonbengtsson
Copy link
Owner

Should be fixed in v3.1.3

@csarellano
Copy link

Hey @simonbengtsson just to let you know that this error shows up again in release v3.2.0. With the latest version v3.2.4 I am getting something like this in the second page.

image

In version v3.1.3 everything is ok besides that cell without background. The next image is the second page with the same data as the table above.

image

@simonbengtsson
Copy link
Owner

Interesting! Can you create a new issue with some sample code?

@Supanutw
Copy link

Supanutw commented Apr 4, 2022

@rong4188
how to merge row
Screen Shot 2565-04-04 at 12 27 09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants