html() function always starts on first page
See original GitHub issueHello. Does jsPDF.html method can draw <table>
in pdf?
And how can i with html() draw in not first page of pdf?
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
How to run a function when the page is loaded? - Stack Overflow
Place your JavaScript functions or or library calls inside the "Start()" method below, so they are triggered as soon as the script says...
Read more >first - CSS: Cascading Style Sheets - MDN Web Docs
The :first CSS pseudo-class, used with the @page at-rule, represents the first page of a printed document. (See :first-child for general ...
Read more >WebD2: Common HTML Tags - University of Washington
Every web page must start with a DOCTYPE declaration. It has to be the very first item on the very first line of...
Read more >HTML Block and Inline Elements - W3Schools
A block-level element always starts on a new line, and the browsers automatically add some space (a margin) before and after the element....
Read more >page-break - Properties - CSS-Tricks
The page-break-inside property adds a page-break inside the element to which it is applied. Syntax. page-break-after : auto | always | avoid | ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
While issue not fixed, i use offset by y coord:
Ah, you’re right. There seems to be a bug in jsPDF. The
context2d.autoPaging
property is set to true (which is probably good for most use cases): https://github.com/MrRio/jsPDF/blob/cef97fb34eda41a8704c9f3983e680919a328ce4/src/modules/html.js#L451-L454However, the autoPaging mechanism doesn’t respect the starting page. See e.g. here:
https://github.com/MrRio/jsPDF/blob/cef97fb34eda41a8704c9f3983e680919a328ce4/src/modules/context2d.js#L1675-L1681
A workaround would be to first call
html
with only one page and the afterwards add another page withinsertPage
before the first page.