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-pdf source opts)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). An optional {:password string} options map
supplies the password for an encrypted PDF. The password is ignored when
source is already an open PDDocument. The caller owns closing the result;
prefer pdfplumber.core/with-pdf.
Throws ex-info carrying :pdfplumber/error:
:invalid-input (unsupported source or missing file),
:encrypted-pdf (password-protected when no password is supplied or the
supplied password is incorrect),
: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). An optional `{:password string}` options map
supplies the password for an encrypted PDF. The password is ignored when
`source` is already an open `PDDocument`. The caller owns closing the result;
prefer `pdfplumber.core/with-pdf`.
Throws `ex-info` carrying `:pdfplumber/error`:
`:invalid-input` (unsupported source or missing file),
`:encrypted-pdf` (password-protected when no password is supplied or the
supplied password is incorrect),
`: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 with media, crop, and active bounding boxes, dimensions, rotation, and 1-based page numbers.
Vector of page maps with media, crop, and active bounding boxes, dimensions, rotation, and 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 |