Skip to content
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

Some pages are blank when try to open with adobe. #3740

Closed
jaidevjk opened this issue Jun 5, 2024 · 3 comments
Closed

Some pages are blank when try to open with adobe. #3740

jaidevjk opened this issue Jun 5, 2024 · 3 comments

Comments

@jaidevjk
Copy link

jaidevjk commented Jun 5, 2024

Issue Statement : After downloading the pdf from jspdf , it is opening in other apps and browsers but not in adobe reader

1.Example - let say a pdf generated using jspdf has 7 pages , it opens in browser, all 7 pages are visible and displayed properly , but if we open same pdf in adobe reader , some of the pages will be empty and totally blank.
we will get a popup saying " An Error exists on this page. Acrobat may not display the page correctly. Please contact the person who created this file".

Looking for a solution,I hope i will get the proper soltion in a short time.

Thank You .....


image

@jaidevjk
Copy link
Author

jaidevjk commented Jun 7, 2024

Looking for a help.....regarding the issue #3740

@febkosq8
Copy link

febkosq8 commented Jul 11, 2024

I created a demo to show the issue with Adobe opening any pdf generated by jspdf. Hopefully someone will be able to tell me where I am going wrong.

Current issues I am facing in Adobe Acrobat :

  • Page fails to load
  • Link to a page does not work

This sounds like the same issue that my comment in #3428 shows. I don't think this is going to be fixed given the state of this lib.

I discovered a workaround which works like 50% of the time.
I found that having \n causes the pdf to fail for sure. However if I add a space before \n, it helps a lot in the frequency of errors.

Before you send your text to doc.splitTextToSize(content, maxContentWidth), do a content = content.replace(/\n/g, " \n") and then send it.

Copy link

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.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants