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

Fix invalid string length when saving large PDF #3646

Closed
wants to merge 2 commits into from

Conversation

laucheukhim
Copy link

Fixes #1724. This fixes the invalid string length error when saving a large PDF.

Based on #3625 by @shiina-mash1ro, I have rewritten the output of buildDocument() following the existing convention, and expanded on the case for blob in addition to array buffer.

#3625 bypassed the string limit with an array buffer, but there is still a limit to how big an array buffer can be. This further increases the limit for blob by not putting everything in the same array buffer, allowing the creation of a much bigger PDF when saving as blob.

I have updated the test cases and reference PDFs for this change.

@spookyuser
Copy link

ily

@leviznull
Copy link

I left a temporary solution for anyone that needs a working fix now before a fix is merged.

#1724 (comment)

@laucheukhim
Copy link
Author

@HackbrettXXX Sorry to bother you, but you are the only one active in this repository. This is a valid fix to saving large PDF. Can you help merge this, instead of letting it be closed by the stale bot?

@markive
Copy link

markive commented Oct 14, 2024

bump 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid String Length When Saving PDF
4 participants