Skip to content

Instantly share code, notes, and snippets.

@blackawa
Created December 27, 2019 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blackawa/075e4b89e1245b27cdae959768be3826 to your computer and use it in GitHub Desktop.
Save blackawa/075e4b89e1245b27cdae959768be3826 to your computer and use it in GitHub Desktop.
pdfbox.clj
(ns main
(:require [clojure.java.io :as io])
(:import [org.apache.pdfbox.pdmodel PDDocument]
[org.apache.pdfbox.text PDFTextStripper]))
(defn extract-string [src]
(with-open [doc (->> src PDDocument/load)]
(->> doc (.getText (PDFTextStripper.)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment