Function: pdf-info-addannot

pdf-info-addannot is a natively compiled function defined in pdf-info.el.

Signature

(pdf-info-addannot PAGE EDGES TYPE &optional SELECTION-STYLE FILE-OR-BUFFER &rest MARKUP-EDGES)

Documentation

Add a new annotation to PAGE with EDGES of TYPE.

FIXME: TYPE may be one of text, markup-highlight, ... . FIXME: -1 = 24 See pdf-info-getannots for the kind of value of this function returns.

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-addannot (page edges type
                               &optional selection-style file-or-buffer
                               &rest markup-edges)
  "Add a new annotation to PAGE with EDGES of TYPE.

FIXME: TYPE may be one of `text', `markup-highlight', ... .
FIXME: -1 = 24
See `pdf-info-getannots' for the kind of value of this function
returns."
  (pdf-info-assert-writable-annotations)
  (when (consp file-or-buffer)
    (push file-or-buffer markup-edges)
    (setq file-or-buffer nil))
  (apply
   #'pdf-info-query
   'addannot
   (pdf-info--normalize-file-or-buffer file-or-buffer)
   page
   type
   (pdf-info--selection-style selection-style)
   (mapconcat 'number-to-string edges " ")
   (mapcar (lambda (me)
             (mapconcat 'number-to-string me " "))
           markup-edges)))