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

DeprecationWarning #1504

Open
usernameisunvaible opened this issue Mar 19, 2024 · 3 comments
Open

DeprecationWarning #1504

usernameisunvaible opened this issue Mar 19, 2024 · 3 comments

Comments

@usernameisunvaible
Copy link

usernameisunvaible commented Mar 19, 2024

Code sample

 doc.image(path.join(__dirname, '../../../../assets/myLogo.png'), 390, 20, { width: 180 });

Bug Report

I got a Deprecation warning when i put an image on my pdf

this line cause me this error:
(node:127) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

When the file extension is .jpg there is no error.

  • pdfkit version: 0.14.0
  • Node version: 20.11.0
  • Operating System: macOS 14.3.1

Run in a lambda with serverless offline

@blikblum
Copy link
Member

I cannot reproduce here
Can you test with just released 0.15.0?

@usernameisunvaible
Copy link
Author

I tried with 0.15.0, still have the error.
I use typescript and "@types/pdfkit": "^0.13.4",

@blikblum
Copy link
Member

blikblum commented Apr 5, 2024

Please provide a online example using https://repl.it/@blikblum/minimal-pdfkit

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

No branches or pull requests

2 participants