Hopding / pdf-lib

Create and modify PDF documents in any JavaScript environment
https://pdf-lib.js.org
MIT License
6.6k stars 635 forks source link

TypeError: pdf_lib__WEBPACK_IMPORTED_MODULE_2__.PDFDocument.registerFontkit is not a function #1638

Open pensionbox-piyush opened 1 month ago

pensionbox-piyush commented 1 month ago

What were you trying to do?

i am trying to add a custom font but getting this error in Next.js 14.1.3. Screenshot from 2024-06-15 12-42-16 Screenshot from 2024-06-15 12-42-28

How did you attempt to do it?

FIle Code snippets: Screenshot from 2024-06-15 12-43-58 Screenshot from 2024-06-15 12-44-09

What actually happened?

My package.json : Screenshot from 2024-06-15 12-44-56

What did you expect to happen?

setting up an custom fonts facing errors

How can we reproduce the issue?

You can reproduce it by simply following the code snippets

Version

1.17.1

What environment are you running pdf-lib in?

Browser

Checklist

Additional Notes

No response