Liking cljdoc? Tell your friends :D

pdfplumber.core

Public API for pdfplumber-clj: open PDFs and extract text, words, characters, geometric objects, and tables as plain Clojure data.

Public API for pdfplumber-clj: open PDFs and extract text, words, characters,
geometric objects, and tables as plain Clojure data.
raw docstring

annotsclj

(annots source)
(annots source opts)

Page annotations. See pdfplumber.objects/annots.

Page annotations. See `pdfplumber.objects/annots`.
sourceraw docstring

attachmentsclj

(attachments doc)
(attachments doc opts)

Document attachments and optional decoded data. See pdfplumber.attachments/attachments.

Document attachments and optional decoded data. See
`pdfplumber.attachments/attachments`.
sourceraw docstring

charsclj

(chars source)
(chars source opts)

Vector of character maps. Accepts a document handle or a cropped page view. See pdfplumber.text/chars.

Vector of character maps. Accepts a document handle or a cropped page view.
See `pdfplumber.text/chars`.
sourceraw docstring

cropclj

(crop source bbox)
(crop source bbox opts)

Derived page crop with partial-object clipping.

Derived page crop with partial-object clipping.
sourceraw docstring

crop-pageclj

(crop-page doc opts)

A cropped page view (restricts extraction to a bbox). See pdfplumber.page/crop-page.

A cropped page view (restricts extraction to a bbox). See
`pdfplumber.page/crop-page`.
sourceraw docstring

curvesclj

(curves source)
(curves source opts)

Painted curve objects. See pdfplumber.objects/curves.

Painted curve objects. See `pdfplumber.objects/curves`.
sourceraw docstring

dedupe-charsclj

(dedupe-chars source)
(dedupe-chars source opts)

Extract and deduplicate chars. See pdfplumber.text/dedupe-chars.

Extract and deduplicate chars. See `pdfplumber.text/dedupe-chars`.
sourceraw docstring

edgesclj

(edges source)
(edges source opts)

Normalized page edges. See pdfplumber.objects/edges.

Normalized page edges. See `pdfplumber.objects/edges`.
sourceraw docstring

export-fdfclj

(export-fdf doc dest)

Export AcroForm data to a path, File, or OutputStream and return the destination.

Export AcroForm data to a path, File, or OutputStream and return the destination.
sourceraw docstring

extract-tableclj

(extract-table source)
(extract-table source opts)

Extract a single table. Accepts a document handle or a cropped page view. See pdfplumber.table/extract-table.

Extract a single table. Accepts a document handle or a cropped page view. See
`pdfplumber.table/extract-table`.
sourceraw docstring

extract-tablesclj

(extract-tables source)
(extract-tables source opts)

Extract tables as a vector. Accepts a document handle or a cropped page view. See pdfplumber.table/extract-tables.

Extract tables as a vector. Accepts a document handle or a cropped page view.
See `pdfplumber.table/extract-tables`.
sourceraw docstring

extract-textclj

(extract-text source)
(extract-text source opts)

Advanced text extraction. See pdfplumber.text/extract-text.

Advanced text extraction. See `pdfplumber.text/extract-text`.
sourceraw docstring

extract-text-linesclj

(extract-text-lines source)
(extract-text-lines source opts)

Positional text lines. See pdfplumber.text/extract-text-lines.

Positional text lines. See `pdfplumber.text/extract-text-lines`.
sourceraw docstring

extract-text-simpleclj

(extract-text-simple source)
(extract-text-simple source opts)

Fast doctop/char-gap text extraction. See pdfplumber.text/extract-text-simple.

Fast doctop/char-gap text extraction. See
`pdfplumber.text/extract-text-simple`.
sourceraw docstring

extract-wordsclj

(extract-words source)
(extract-words source opts)

Advanced word extraction. See pdfplumber.text/extract-words.

Advanced word extraction. See `pdfplumber.text/extract-words`.
sourceraw docstring

field-valuesclj

(field-values doc)

Map of terminal field names to values. See pdfplumber.form/field-values.

Map of terminal field names to values. See `pdfplumber.form/field-values`.
sourceraw docstring

filterclj

source

filter-pageclj

(filter-page source pred)
(filter-page source pred opts)

Derived view filtered by an object predicate.

Derived view filtered by an object predicate.
sourceraw docstring

find-tableclj

(find-table source)
(find-table source opts)

Find the first rich Table map. See pdfplumber.table/find-table.

Find the first rich Table map. See `pdfplumber.table/find-table`.
sourceraw docstring

find-tablesclj

(find-tables source)
(find-tables source opts)

Find rich Table maps. See pdfplumber.table/find-tables.

Find rich Table maps. See `pdfplumber.table/find-tables`.
sourceraw docstring

flattenclj

(flatten doc)

Flatten AcroForm fields into page content and return the document handle.

Flatten AcroForm fields into page content and return the document handle.
sourceraw docstring

form-fieldsclj

(form-fields doc)

Vector of terminal AcroForm fields. See pdfplumber.form/form-fields.

Vector of terminal AcroForm fields. See `pdfplumber.form/form-fields`.
sourceraw docstring

horizontal-edgesclj

(horizontal-edges source)
(horizontal-edges source opts)

Horizontal page edges. See pdfplumber.objects/horizontal-edges.

Horizontal page edges. See `pdfplumber.objects/horizontal-edges`.
sourceraw docstring

(hyperlinks source)
(hyperlinks source opts)

URI link annotations. See pdfplumber.objects/hyperlinks.

URI link annotations. See `pdfplumber.objects/hyperlinks`.
sourceraw docstring

imagesclj

(images source)
(images source opts)

Vector of drawn image objects. Accepts a document handle or a cropped page view. See pdfplumber.objects/images.

Vector of drawn image objects. Accepts a document handle or a cropped page
view. See `pdfplumber.objects/images`.
sourceraw docstring

import-fdfclj

(import-fdf doc source)

Import FDF data from bytes, an InputStream, or a path and return the document handle.

Import FDF data from bytes, an InputStream, or a path and return the document handle.
sourceraw docstring

linesclj

(lines source)
(lines source opts)

Painted line objects. See pdfplumber.objects/lines.

Painted line objects. See `pdfplumber.objects/lines`.
sourceraw docstring

metadataclj

(metadata doc)

Document metadata map. See pdfplumber.document/metadata.

Document metadata map. See `pdfplumber.document/metadata`.
sourceraw docstring

objectsclj

(objects source)
(objects source opts)

Vector of page object maps (lines, rects, curves, images). Accepts a document handle or a cropped page view. See pdfplumber.objects/objects.

Vector of page object maps (lines, rects, curves, images). Accepts a document
handle or a cropped page view. See `pdfplumber.objects/objects`.
sourceraw docstring

objects-by-typeclj

(objects-by-type source)
(objects-by-type source opts)

Object maps grouped by type. See pdfplumber.objects/objects-by-type.

Object maps grouped by type. See `pdfplumber.objects/objects-by-type`.
sourceraw docstring

open-pdfclj

(open-pdf source)
(open-pdf source opts)

Open a PDF, returning a document handle. See pdfplumber.document/open-pdf. Pass {:password string} as an optional second argument for encrypted PDFs. The caller must close it (or use with-pdf).

Open a PDF, returning a document handle. See `pdfplumber.document/open-pdf`.
Pass `{:password string}` as an optional second argument for encrypted PDFs.
The caller must close it (or use `with-pdf`).
sourceraw docstring

outlineclj

(outline doc)

Nested document outline. See pdfplumber.outline/outline.

Nested document outline. See `pdfplumber.outline/outline`.
sourceraw docstring

outside-bboxclj

(outside-bbox source bbox)
(outside-bbox source bbox opts)

Derived view containing only objects outside a bbox.

Derived view containing only objects outside a bbox.
sourceraw docstring

pageclj

(page doc n)

Page map for 1-based page number n. See pdfplumber.document/page.

Page map for 1-based page number `n`. See `pdfplumber.document/page`.
sourceraw docstring

page-image?clj

(page-image? x)

True when x is a PageImage. See pdfplumber.image/page-image?.

True when `x` is a PageImage. See `pdfplumber.image/page-image?`.
sourceraw docstring

page-reducibleclj

(page-reducible source extractor)
(page-reducible source extractor opts)

Reducible page stream from an extractor function. See pdfplumber.reducible/page-reducible.

Reducible page stream from an extractor function. See
`pdfplumber.reducible/page-reducible`.
sourceraw docstring

page-structure-treeclj

(page-structure-tree doc n)

Logical structure associated with 1-based page n. See pdfplumber.structure/page-structure-tree.

Logical structure associated with 1-based page `n`. See
`pdfplumber.structure/page-structure-tree`.
sourceraw docstring

page-view?clj

(page-view? x)

True when x is a cropped page view. See pdfplumber.page/page-view?.

True when `x` is a cropped page view. See `pdfplumber.page/page-view?`.
sourceraw docstring

pagesclj

(pages doc)

Vector of page maps. See pdfplumber.document/pages.

Vector of page maps. See `pdfplumber.document/pages`.
sourceraw docstring

permissionsclj

(permissions doc)

Encryption and access-permission flags. See pdfplumber.permissions/permissions.

Encryption and access-permission flags. See
`pdfplumber.permissions/permissions`.
sourceraw docstring

rectsclj

(rects source)
(rects source opts)

Painted rectangle objects. See pdfplumber.objects/rects.

Painted rectangle objects. See `pdfplumber.objects/rects`.
sourceraw docstring

reducible-annotsclj

(reducible-annots source)
(reducible-annots source opts)

Page-at-a-time reducible annotation stream. See pdfplumber.reducible/reducible-annots.

Page-at-a-time reducible annotation stream. See
`pdfplumber.reducible/reducible-annots`.
sourceraw docstring

reducible-charsclj

(reducible-chars source)
(reducible-chars source opts)

Single-pass reducible character stream. See pdfplumber.reducible/reducible-chars.

Single-pass reducible character stream. See
`pdfplumber.reducible/reducible-chars`.
sourceraw docstring

reducible-curvesclj

(reducible-curves source)
(reducible-curves source opts)

Page-at-a-time reducible painted-curve stream. See pdfplumber.reducible/reducible-curves.

Page-at-a-time reducible painted-curve stream. See
`pdfplumber.reducible/reducible-curves`.
sourceraw docstring

reducible-imagesclj

(reducible-images source)
(reducible-images source opts)

Page-at-a-time reducible drawn-image stream. See pdfplumber.reducible/reducible-images.

Page-at-a-time reducible drawn-image stream. See
`pdfplumber.reducible/reducible-images`.
sourceraw docstring

reducible-linesclj

(reducible-lines source)
(reducible-lines source opts)

Page-at-a-time reducible painted-line stream. See pdfplumber.reducible/reducible-lines.

Page-at-a-time reducible painted-line stream. See
`pdfplumber.reducible/reducible-lines`.
sourceraw docstring

reducible-objectsclj

(reducible-objects source)
(reducible-objects source opts)

Page-at-a-time reducible object stream. See pdfplumber.reducible/reducible-objects.

Page-at-a-time reducible object stream. See
`pdfplumber.reducible/reducible-objects`.
sourceraw docstring

reducible-rectsclj

(reducible-rects source)
(reducible-rects source opts)

Page-at-a-time reducible painted-rectangle stream. See pdfplumber.reducible/reducible-rects.

Page-at-a-time reducible painted-rectangle stream. See
`pdfplumber.reducible/reducible-rects`.
sourceraw docstring

reducible-wordsclj

(reducible-words source)
(reducible-words source opts)

Page-at-a-time reducible word stream. See pdfplumber.reducible/reducible-words.

Page-at-a-time reducible word stream. See
`pdfplumber.reducible/reducible-words`.
sourceraw docstring

refresh-appearancesclj

(refresh-appearances doc)

Regenerate AcroForm field appearance streams and return the document handle.

Regenerate AcroForm field appearance streams and return the document handle.
sourceraw docstring

(search source pattern)
(search source pattern opts)

Positional regex or literal search. See pdfplumber.text/search.

Positional regex or literal search. See `pdfplumber.text/search`.
sourceraw docstring

set-valuesclj

(set-values doc values)

Set AcroForm field values and return the document handle.

Set AcroForm field values and return the document handle.
sourceraw docstring

signaturesclj

(signatures doc)

Digital-signature metadata and document-coverage signals. See pdfplumber.signature/signatures.

Digital-signature metadata and document-coverage signals. See
`pdfplumber.signature/signatures`.
sourceraw docstring

signed?clj

(signed? doc)

True when the document contains a signature dictionary. See pdfplumber.signature/signed?.

True when the document contains a signature dictionary. See
`pdfplumber.signature/signed?`.
sourceraw docstring

structure-treeclj

(structure-tree doc)

Tagged-PDF logical structure as nested element maps, or [] when the PDF is untagged. See pdfplumber.structure/structure-tree.

Tagged-PDF logical structure as nested element maps, or `[]` when the PDF is
untagged. See `pdfplumber.structure/structure-tree`.
sourceraw docstring

table->mapsclj

(table->maps table-data)
(table->maps table-data opts)

Convert an extracted table or raw rows to header-keyed maps. See pdfplumber.table/table->maps.

Convert an extracted table or raw rows to header-keyed maps. See
`pdfplumber.table/table->maps`.
sourceraw docstring

textclj

(text source)
(text source opts)

Reconstructed text string. Accepts a document handle or a cropped page view. See pdfplumber.text/text.

Reconstructed text string. Accepts a document handle or a cropped page view.
See `pdfplumber.text/text`.
sourceraw docstring

text-mapclj

(text-map source)
(text-map source opts)

Text and its source-char mapping. See pdfplumber.text/text-map.

Text and its source-char mapping. See `pdfplumber.text/text-map`.
sourceraw docstring

to-imageclj

(to-image source)
(to-image source opts)

Render a page or cropped page view as a PageImage for visual debugging. Accepts a document handle or a cropped page view. Thread the result through the overlay/save verbs in pdfplumber.image (draw-rect, draw-line, outline-words, debug-tablefinder, save, ...). See pdfplumber.image/to-image.

Render a page or cropped page view as a PageImage for visual debugging.
Accepts a document handle or a cropped page view. Thread the result through
the overlay/save verbs in `pdfplumber.image` (`draw-rect`, `draw-line`,
`outline-words`, `debug-tablefinder`, `save`, ...). See
`pdfplumber.image/to-image`.
sourceraw docstring

vertical-edgesclj

(vertical-edges source)
(vertical-edges source opts)

Vertical page edges. See pdfplumber.objects/vertical-edges.

Vertical page edges. See `pdfplumber.objects/vertical-edges`.
sourceraw docstring

with-pdfcljmacro

(with-pdf [binding source & [opts]] & body)

Open source, bind the document handle to binding, evaluate body, and always close the document on exit (including on exception).

(with-pdf [doc "statement.pdf"]
  (text doc {:page 1}))

(with-pdf [doc "statement.pdf" {:password "hunter2"}]
  (text doc {:page 1}))
Open `source`, bind the document handle to `binding`, evaluate `body`, and
always close the document on exit (including on exception).

    (with-pdf [doc "statement.pdf"]
      (text doc {:page 1}))

    (with-pdf [doc "statement.pdf" {:password "hunter2"}]
      (text doc {:page 1}))
sourceraw docstring

within-bboxclj

(within-bbox source bbox)
(within-bbox source bbox opts)

Derived view containing only wholly enclosed objects.

Derived view containing only wholly enclosed objects.
sourceraw docstring

word-mapclj

(word-map source)
(word-map source opts)

Words and their contributing chars. See pdfplumber.text/word-map.

Words and their contributing chars. See `pdfplumber.text/word-map`.
sourceraw docstring

wordsclj

(words source)
(words source opts)

Vector of word maps. Accepts a document handle or a cropped page view. See pdfplumber.text/words.

Vector of word maps. Accepts a document handle or a cropped page view. See
`pdfplumber.text/words`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close