poundifdef / go-remarkable2pdf

Go library to parse and render Remarkable lines files
GNU Affero General Public License v3.0
39 stars 0 forks source link

Converted pdf not to scale #2

Open qwert2003 opened 3 years ago

qwert2003 commented 3 years ago

The conversion rm to pdf a) does scale up the drawing b) scale slightly different in x and y direction

A rectangle 120mm x 120mm (rm) gets scaled to width 165mm x height 160mm (pdf)

I guess a) is intentional. It would be nice though to have the option to keep the original size. Scaling differently the width and height, b), should be avoided in my opinion.

render.go: x-direction: 1404 / 8.5'' = 165.2 dpi y-direction: 1872 / 11'' = 170.2 dpi reMarkable device: 226.85 dpi

Note: tested with rm-convert

poundifdef commented 3 years ago

Interesting observation. I think that because 8.5/11 = 0.77, and 1404/1872 = 0.75, there is a slight difference. I think that if instead we trimmed off 0.25" of usable space on the PDF (assumed the x had a width of 8.25") then it would preserve the ratio.