sema-docs 1.23.0

Canonical structured documentation for Sema builtins/special forms; powers LSP hover/completion and REPL apropos
Documentation
---
name: "pdf/metadata"
module: "pdf"
section: "Metadata"
---

Return a map of PDF metadata fields. Always includes `:pages`; other fields (`:title`, `:author`, `:subject`, `:creator`, `:producer`) are included when present in the PDF.

```sema
(pprint (pdf/metadata "document.pdf"))
; => {:author "John Doe"
;     :creator "LibreOffice Writer"
;     :pages 5
;     :producer "LibreOffice"
;     :title "Quarterly Report"}

;; Access individual fields
(get (pdf/metadata "document.pdf") :title)
; => "Quarterly Report"

(get (pdf/metadata "document.pdf") :pages)
; => 5
```