Load documents and handle errors. PDFBox parses documents here. Higher namespaces use the returned PDDocument handle.
Load documents and handle errors. PDFBox parses documents here. Higher namespaces use 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
use 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 use ISO-8601 strings.
(open-pdf source)(open-pdf source opts)Open a PDF and return a PDFBox PDDocument handle. It accepts a path String,
java.io.File, byte[], or java.io.InputStream (an already-open
PDDocument is returned as-is). An optional {:password string} map supplies
the password for an encrypted PDF. The function ignores the password when
source is an open PDDocument. The caller closes the result. Use
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. It accepts a path `String`,
`java.io.File`, `byte[]`, or `java.io.InputStream` (an already-open
`PDDocument` is returned as-is). An optional `{:password string}` map supplies
the password for an encrypted PDF. The function ignores the password when
`source` is an open `PDDocument`. The caller closes the result. Use
`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 |