-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Multi-page PDFs cause page errors in Adobe Reader, when created with .html() #3428
Comments
I had the same problem @r3-gabriel did you find any solution? |
I have not had more time to investigate - the descriped workaround worked good enough to address the issue in the short term. To clarify how the workaround is implemented:
Because the workaround fixes the issue, I assume that .html() does not register pages correctly when more than 1 is generated. |
Same problem here, thanks for the workaround @r3-gabriel. Hope this gets fixed... |
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant. |
Bump, still relevant. |
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant. |
Bump, still relevant. |
I am also rendering a multi-page PDF and am also experiencing this issue but due to images. When images are removed then the error goes away. I have tried multiple image formats. |
@r3-gabriel wow, thank you for the workaround, you just saved my day. |
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant. |
Bump, still relevant. |
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant. |
Bump, still relevant. |
Using I created a PDF with images and tables (AutoTable) and have the same issue. As others mentioned, Chrome PDF viewer works fine but Adobe seems to hate the file. |
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant. |
Still relevant. |
Hello, I had the same problem and was able to fix it by calling initially addPage and setPage and passing 0 to setPage. const pdf = new jsPDF('p', 'px', [page.width, page.height]); |
Didn't work for me. I tried to change my code to the following but I still got the same error when I opened in Adobe Acrobat. const doc = new jsPDF({
orientation: "portrait",
unit: "pt",
format: "a4",
putOnlyUsedFonts: true,
floatPrecision: "smart",
});
doc.addPage(); //new
doc.setPage(0); //new |
I created a demo to show the issue with Adobe opening any pdf generated by jspdf. Current issues I am facing in Adobe Acrobat :
|
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant. |
Still relevant. |
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant. |
Still relevant. |
I have the same problem. Still relevant. |
I have read and understood the contribution guidelines.
When creating a PDF document via .html() with autoPaging enabled, Adobe Reader reports errors from the second page onward (jsPDF 2.5.1 / html2canvas 1.4.1).
The issue does not occur in PDF viewers in Chrome or Firefox. I´ve created a CodePen that reproduces this issue.
I also found a workaround: If I know the number of pages that the autoPaging will generate with .html(), I add those pages manually beforehand - this will result in a PDF file that works in Adobe Reader without issue. CodePen with workaround.
Because of this, I assume that autoPaging in .html() does not properly manage pages, which triggers the error.
The text was updated successfully, but these errors were encountered: