Function: pdf-view-set-slice-from-bounding-box
pdf-view-set-slice-from-bounding-box is an interactive and natively
compiled function defined in pdf-view.el.
Signature
(pdf-view-set-slice-from-bounding-box &optional WINDOW)
Documentation
Set the slice from the page's bounding-box.
WINDOW defaults to selected-window if not provided.
The result is that the margins are almost completely cropped,
much more accurate than could be done manually using
pdf-view-set-slice-using-mouse.
See also pdf-view-bounding-box-margin.
Key Bindings
pdf-view-mode-map s b
Source Code
;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-view.el
(defun pdf-view-set-slice-from-bounding-box (&optional window)
"Set the slice from the page's bounding-box.
WINDOW defaults to `selected-window' if not provided.
The result is that the margins are almost completely cropped,
much more accurate than could be done manually using
`pdf-view-set-slice-using-mouse'.
See also `pdf-view-bounding-box-margin'."
(interactive)
(let* ((bb (pdf-cache-boundingbox (pdf-view-current-page window)))
(slice (pdf-view--bounding-box-to-slice bb)))
(apply 'pdf-view-set-slice
(append slice (and window (list window))))))