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

Coordinates to millimeters #232

Open
lopezdonaque opened this issue May 18, 2021 · 1 comment
Open

Coordinates to millimeters #232

lopezdonaque opened this issue May 18, 2021 · 1 comment

Comments

@lopezdonaque
Copy link

Hi, how can I convert relative coordinates to millimeters or other unit?
Which units are you using for page height, text x, text y. etc.?

@austenstrine
Copy link

austenstrine commented Jun 27, 2024

https://github.com/modesty/pdf2json/blob/master/lib/pdfunit.js
Right now the units are not actually relative - I'm thinking of adding in options for getting the relative units and doing a PR.

In any case, you should be able to reverse engineer the relative units based on the formulas he uses in this class.

The units, being relative, can then be set to whatever you want based on how "zoomed in" you want the document to be.

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