A Clojure library that splits and merges PDFs.
split
splits a pdf, saves the individual pages to disk, and
returns a lazy sequence of the file-names (string)
(:require [pdfsplit.split :refer [split]])
(split "path/to/file.pdf")
Given a multi-page pdf "file.pdf", the indiviudal pages are saved next to "file.pdf" as file_0.pdf, file_1.pdf and so on.
merge-pdfs
merges arbitraily many source PDFs into one target PDF
(:require [pdfsplit.merge :refer [merge-pdfs]])
(merge-pdfs "path/to/target.pdf" "path/to/source1.pdf" "path/to/source2.pdf" "path/to/source3.pdf")