Skip to content

DeprecationWarning  #1504

@david-benistant

Description

@david-benistant

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions