yWorks / jsPDF

JavaScript PDF generation to work with SVG
MIT License
56 stars 23 forks source link

jsPDF setPage() not working for html(), always renders html source in first page with xOffset and yOffset 0 #19

Closed VKB2612 closed 5 years ago

VKB2612 commented 5 years ago

Hi,

I need to add panel contents to each page in PDF (header panel). I am using the new html() method to do this. I am trying to set the current page using setPage() function but the output PDF has all the header panels in first page with xOffset and yOffset 0 and hence overlapped on each other.

jsPDF v2.0.0 Please refer fiddle: https://jsfiddle.net/7gf35uay/5/

The header panel is coming twice but in page 1. It should be present in each page once. Also is there any way to set xOffset and yOffset to html() like in options. The options does not have these properties defined in the function definition.

As fromHTML(), addHTML() and html2pdf() are deprecated, using html() which is working fine with CSS and everything apart from this issue. Any help would be highly appreciated. Thank you. Regards

yGuy commented 5 years ago

Please try to come up with a smaller repro and be sure to check whether this is actually an issue with our jsPDF fork, or (more likely) an issue with the original jsPDF, in which case I would like you to redirect to their issue tracker.

VKB2612 commented 5 years ago

Hi,

As I am using the version of jsPDF fork that supports svg2pdf conversion which is our requirement, I thought this is the right support forum. Now it is clear that the issue exists with html() functionality of original jsPDF, I will raise an issue in their issue tracker. Thanks.