Function: pdf-info-charlayout
pdf-info-charlayout is a natively compiled function defined in
pdf-info.el.
Signature
(pdf-info-charlayout PAGE &optional EDGES-OR-POS FILE-OR-BUFFER)
Documentation
Return the layout of characters of PAGE in/at EDGES-OR-POS.
Returns a list of elements (CHAR . (LEFT TOP RIGHT BOT)) mapping character to their corresponding relative bounding-boxes.
EDGES-OR-POS may be a region (LEFT TOP RIGHT BOT) restricting the returned value to include only characters fully contained in it. Or a cons (LEFT . TOP) which means to only include the character at this position. In this case the return value contains at most one element.
Source Code
;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-info.el
(defun pdf-info-charlayout (page &optional edges-or-pos file-or-buffer)
"Return the layout of characters of PAGE in/at EDGES-OR-POS.
Returns a list of elements \(CHAR . \(LEFT TOP RIGHT BOT\)\) mapping
character to their corresponding relative bounding-boxes.
EDGES-OR-POS may be a region \(LEFT TOP RIGHT BOT\) restricting
the returned value to include only characters fully contained in
it. Or a cons \(LEFT . TOP\) which means to only include the
character at this position. In this case the return value
contains at most one element."
;; FIXME: Actually returns \(CHAR . LEFT ...\).
(unless edges-or-pos
(setq edges-or-pos '(0 0 1 1)))
(when (numberp (cdr edges-or-pos))
(setq edges-or-pos (list (car edges-or-pos)
(cdr edges-or-pos)
-1 -1)))
(pdf-info-query
'charlayout
(pdf-info--normalize-file-or-buffer file-or-buffer)
page
(mapconcat #'number-to-string edges-or-pos " ")))