jsPDF icon indicating copy to clipboard operation
jsPDF copied to clipboard

Only one page is created with html2pdf

Open VictorSage opened this issue 10 years ago • 6 comments

I have a long and wide html page. I would like to print it to pdf with the CSS I've applied. I tried your html2pdf function and notice the following:

1: only one page is created and cut the top left corner of my page. 2: Font is slightly different than the original page.

Any clue on how to show multiple pages and how to make the webpage fit into one page wide?

Thank you for submitting an issue to jsPDF. Please read carefully.

Are you using the latest version of jsPDF? Yes Have you tried using jspdf.debug.js? Nope Steps to reproduce Pass a wide/long page or dom to html2pdf

Ideally a link too. Try fork this http://jsbin.com/rilace/edit?html,js,output

What I saw Only one page is created and only shows top-left part of the page.

What I expected Showing multiple pages and be able to fit into page width or set page width.

VictorSage avatar Oct 17 '16 19:10 VictorSage

I have the same problem, even for the example https://cdn.rawgit.com/MrRio/jsPDF/master/examples/html2pdf/showcase_supported_html.html it seems it does not work.

@VictorSage Did you find any documentation other than https://cdn.rawgit.com/MrRio/jsPDF/master/examples/html2pdf/showcase_supported_html.html?

maxsieben avatar Oct 20 '16 10:10 maxsieben

Nope. I did not make much progress on it.

VictorSage avatar Oct 20 '16 15:10 VictorSage

Still a problem here. Did anyone solved this? Any workaround?

alex7r avatar Jul 12 '17 19:07 alex7r

Facing the same issue

svankamamidi avatar Oct 30 '17 10:10 svankamamidi

this html2pdf seems to be unsupported code. So you should look for alternatives and should not hope for any support/bugfixing.

Uzlopak avatar Oct 30 '17 11:10 Uzlopak

We are working on a new html2pdf plugin, which will be based on html2canvas and our context2d plugin (like the solution of html2pdf). This should lead to more reliable results for your projects. And it will give us the time to focus on the core functionality of pdf-generation because we will not use our energy for writing/supporting/extending 2 html plugins. If you still want to use addHTML or fromHTML you can still use jsPDF 1.4.1.

Best Regards

Uzlopak avatar Sep 07 '18 06:09 Uzlopak