Function: pdf-view-fit-page-to-window

pdf-view-fit-page-to-window is an interactive and natively compiled function defined in pdf-view.el.

Signature

(pdf-view-fit-page-to-window)

Documentation

Fit PDF to window.

Choose the larger of PDF's height and width, and fits that dimension to window.

Key Bindings

pdf-view-mode-map P

Source Code

;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-view.el
;; * ================================================================== *
;; * Scaling
;; * ================================================================== *

(defun pdf-view-fit-page-to-window ()
  "Fit PDF to window.

Choose the larger of PDF's height and width, and fits that
dimension to window."
  (interactive)
  (setq pdf-view-display-size 'fit-page)
  (image-set-window-vscroll 0)
  (image-set-window-hscroll 0)
  (pdf-view-redisplay t))