boazsegev / combine_pdf

A Pure ruby library to merge PDF files, number pages and maybe more...
MIT License
734 stars 155 forks source link

metrics for x/y coordinates #187

Closed RailsCod3rFuture closed 3 years ago

RailsCod3rFuture commented 3 years ago

Hello, I am using GIMP for finding the coordinates on my pdf fields. Oddly, they're off by a large margin. Do you have a method or approach that gives you the exact position of a form element on the pdf?

boazsegev commented 3 years ago

Hi @RailsCod3rFuture ,

Thank you for opening this issue.

Just to make sure - are you aware that PDF XY coordinates start at the bottom left of the page and build up (unlike most graphical applications that list coordinates from the top left, building down)...?

Kindly, Bo.

P.S.

Personally I perform dynamic computations for the X/Y coordinates according to my needs. This might waste CPU cycles (as the same computation its performed for each request), but it allows me to easily change the desired effect.

RailsCod3rFuture commented 3 years ago

Alright. Thanks.