pdf2json icon indicating copy to clipboard operation
pdf2json copied to clipboard

Coordinates to millimeters

Open lopezdonaque opened this issue 4 years ago • 1 comments

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.?

lopezdonaque avatar May 18 '21 17:05 lopezdonaque

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.

austenstrine avatar Jun 27 '24 04:06 austenstrine