`pagesplit` and dynamic width/height not producing expected results
See original GitHub issueAre you using the latest version of jsPDF?
I have been unable to resolve it using Version 1.2.61.
Have you tried using jspdf.debug.js?
Yes, I still have been unable to get different results.
Steps to reproduce
I’ve tried several different combinations, that * do not work*:
- Non-working Example 1
pdf.addHTML(document.body, {
pagesplit: true
}, function(dispose) {
pdf.save('FieldStack-PracticeMetrics-' + new Date() + '.pdf');
});
Result:
FieldStack-PracticeMetrics-Thu Mar 10 2016 10-30-38 GMT-0500 (EST) 2.pdf
- Non-working Example 2
pdf.addHTML(document.body, {
pagesplit: true,
height: document.body.offsetHeight,
width: document.body.offsetWidth
}, function(dispose) {
pdf.save('FieldStack-PracticeMetrics-' + new Date() + '.pdf');
});
Result:
FieldStack-PracticeMetrics-Thu Mar 10 2016 10-34-38 GMT-0500 (EST).pdf
Possible Related Issues
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
`pagesplit` and dynamic width/height not producing expected ...
Have you tried using jspdf.debug.js? Yes, I still have been unable to get different results. Steps to reproduce. I've tried several different ...
Read more >jspdf get page count: ` pagesplit ` and dynamic width/height ...
Adding page numbers to footer using fromHTML · Issue #274 ... 2 Jun 2014 ... I am looking for a way to insert...
Read more >jsPDF multi page PDF with HTML renderer - Stack Overflow
I have the same working issue. ... Automatically not split data to multi pages. ... toDataURL("image/png"); width = onePageCanvas.width; height ...
Read more >Docuflex 11.3 - Oracle Help Center
IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS ... Docuflex 11.3 does not support dynamic composition of scripts that flow from...
Read more >Advanced operation instructions
You may print no more than three copies of this manual for your own use. ... As a result, Raymarine cannot accept liability...
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 Free
Top 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
@joshuapowell how you calculate the scale factor?
Please dont mess with the scaleFactor. Despite its name, the scaleFactor is used internally for converting the measurements and positions from the given system to px. E.g. if you initiate the jsPDF with mm, then jsPDF converts all the positions from mm to pt and image width and height from mm to pt. Or was it px?
So actually jsPDF needs an resolution setting for images and not a scaleFactor manipulation.