Function: pdf-info-getattachments

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

Signature

(pdf-info-getattachments &optional DO-SAVE FILE-OR-BUFFER)

Documentation

Return all document level attachments.

If DO-SAVE is non-nil, save the attachments data to a local file, which is then owned by the caller, see below.

This function returns a list of alists, where every element contains the following keys. All values, except for id, may be nil, i.e. not present.

id - A symbol uniquely identifying this attachment.
filename - The filename of this attachment.
description - A description of this attachment.
size - The size in bytes.
modified - The last modification date.
created - The date of creation.
checksum - A MD5 checksum of this attachment's data.
file - The name of a tempfile containing the data (only present if
              DO-SAVE is non-nil).

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-getattachments (&optional do-save file-or-buffer)
  "Return all document level attachments.

If DO-SAVE is non-nil, save the attachments data to a local file,
which is then owned by the caller, see below.

This function returns a list of alists, where every element
contains the following keys.  All values, except for id, may be
nil, i.e. not present.

id          - A symbol uniquely identifying this attachment.
filename    - The filename of this attachment.
description - A description of this attachment.
size        - The size in bytes.
modified    - The last modification date.
created     - The date of creation.
checksum    - A MD5 checksum of this attachment's data.
file        - The name of a tempfile containing the data (only present if
              DO-SAVE is non-nil)."

  (pdf-info-query
   'getattachments
   (pdf-info--normalize-file-or-buffer file-or-buffer)
   (if do-save 1 0)))