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

Need a method to get the DPI of a PDF Page #1637

Open sayo96 opened 1 month ago

sayo96 commented 1 month ago

What are you working on?

I'm parsing a pdf using pdf-lib and then placing the parsed fields on a background image. It would be very helpful if I can find the DPI of the page as it would help me convert the pdf points, width and height of a pdf field from points to pixels

Additional Notes

I have been trying a lot to get the DPI but the documentation around it is not clear. Please help