Document loading and the error model. The PDFBox parse boundary lives here; higher namespaces work with the returned PDDocument handle.
Document loading and the error model. The PDFBox parse boundary lives here; higher namespaces work with the returned PDDocument handle.
(metadata doc)Document metadata as a map. Always includes :page-count; document-info
fields (:title :author :subject :keywords :creator :producer
:creation-date :modification-date) are included only when present. Dates
are ISO-8601 strings.
Document metadata as a map. Always includes `:page-count`; document-info fields (`:title` `:author` `:subject` `:keywords` `:creator` `:producer` `:creation-date` `:modification-date`) are included only when present. Dates are ISO-8601 strings.
(open-pdf source)Open a PDF and return a PDFBox PDDocument handle. Accepts a path String,
java.io.File, byte[], or java.io.InputStream (an already-open
PDDocument is returned as-is). The caller owns closing it; prefer
pdfplumber.core/with-pdf.
Throws ex-info carrying :pdfplumber/error:
:invalid-input (unsupported source or missing file),
:encrypted-pdf (password-protected),
:parse-failed (not a readable PDF).
Open a PDF and return a PDFBox `PDDocument` handle. Accepts a path `String`, `java.io.File`, `byte[]`, or `java.io.InputStream` (an already-open `PDDocument` is returned as-is). The caller owns closing it; prefer `pdfplumber.core/with-pdf`. Throws `ex-info` carrying `:pdfplumber/error`: `:invalid-input` (unsupported source or missing file), `:encrypted-pdf` (password-protected), `:parse-failed` (not a readable PDF).
(page doc n)The page map for 1-based page number n. Throws ex-info
:pdfplumber/error :page-not-found (with :page and :page-count) when out
of range.
The page map for 1-based page number `n`. Throws `ex-info` `:pdfplumber/error :page-not-found` (with `:page` and `:page-count`) when out of range.
(pages doc)Vector of page maps (:page-number :width :height :rotation :bbox),
in document order with 1-based page numbers.
Vector of page maps (`:page-number` `:width` `:height` `:rotation` `:bbox`), in document order with 1-based page numbers.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |