fuxialexander / org-pdftools

A custom org link type for pdf-tools
GNU General Public License v3.0
336 stars 36 forks source link

Fix height handling #92

Open jun0 opened 1 year ago

jun0 commented 1 year ago

Hi, the height parameter of org-pdftools link seems to be treated incorrectly: C-c C-o jumps to a point that's way too high (i.e. way too close to the top of the page). There's code in org-pdftools-open-pdftools that converts the height (given as a fraction of page height) to number of lines before giving it to image-set-window-vscroll, but image-set-window-vscroll wants the input specified in pixels, not lines. This PR removes the conversion to lines.

rdiaz02 commented 1 year ago

Out of curiosity: do you have a pdf and note where this happens? I've never experienced this, and wanted to make sure I understood before adding your changes to my fork of the repo. Thanks!