Function: pdf-cache-renderpage-text-regions

pdf-cache-renderpage-text-regions is a natively compiled function defined in pdf-cache.el.

Signature

(pdf-cache-renderpage-text-regions PAGE WIDTH SINGLE-LINE-P &rest SELECTION)

Documentation

Render PAGE according to WIDTH, SINGLE-LINE-P and SELECTION.

See also pdf-info-renderpage-text-regions and pdf-cache-renderpage.

Source Code

;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-cache.el
(defun pdf-cache-renderpage-text-regions (page width single-line-p
                                               &rest selection)
  "Render PAGE according to WIDTH, SINGLE-LINE-P and SELECTION.

See also `pdf-info-renderpage-text-regions' and
`pdf-cache-renderpage'."
  (if pdf-cache-image-inihibit
      (apply #'pdf-info-renderpage-text-regions
             page width single-line-p nil nil selection)
    (let ((hash (sxhash
                 (format "%S" (cons 'renderpage-text-regions
                                    (cons single-line-p selection))))))
      (or (pdf-cache-get-image page width width hash)
          (let ((data (apply #'pdf-info-renderpage-text-regions
                             page width single-line-p nil nil selection)))
            (pdf-cache-put-image page width data hash)
            data)))))