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

saveAsBuffer() returns a Uint8Array instead of a Buffer #93

Closed
t0m4-null opened this issue Aug 26, 2022 · 1 comment · Fixed by #94
Closed

saveAsBuffer() returns a Uint8Array instead of a Buffer #93

t0m4-null opened this issue Aug 26, 2022 · 1 comment · Fixed by #94
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@t0m4-null
Copy link

Since v4.0.0 (and pdf-lib replacing pdfjs), saveAsBuffer() method returns a Uint8Array instead of a Buffer.

So, to fix it, I had to replace await merger.saveAsBuffer() with Buffer.from(await merger.saveAsBuffer())

@mojoaxel mojoaxel added bug Something isn't working good first issue Good for newcomers labels Aug 26, 2022
@mojoaxel
Copy link
Collaborator

@t0m4-null Yeah, that is a bug, introduced by #84

I'll provide a fix, soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants