From 8b2debaba240d20ac5f30a9ba076eb532a2396c7 Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Sun, 30 May 2021 01:08:13 +0530 Subject: `pdf-info-renderpage`: Use the width of the page as passed in. `pdf-view-image-size` passes in the width of the current page to `pdf-info-renderpage` during an isearch. Use this as-is, instead of multiplying it with the `pdf-util-frame-scale-factor`. This is a potential fix for the bug raised by PR #13. I'm not sure if this was a bug earlier as well, but was masked since the code-path did not execute for `png` images. I will treat this as a temporary change until I can better understand the original reasons behind putting it in. Since I don't have access to a Mac running `emacs-mac` , I have tested it by hard-coding `pdf-util-frame-scale-factor` to 2 on my local setup, and everything seems to be working correctly. --- lisp/pdf-info.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/pdf-info.el b/lisp/pdf-info.el index 0c345a2..8f16cfd 100644 --- a/lisp/pdf-info.el +++ b/lisp/pdf-info.el @@ -1594,7 +1594,7 @@ Return the data of the corresponding PNG image." 'renderpage (pdf-info--normalize-file-or-buffer file-or-buffer) page - (* width (pdf-util-frame-scale-factor)) + width (let (transformed) (while (cdr commands) (let ((kw (pop commands)) -- cgit v1.0