Created
October 31, 2014 14:42
-
-
Save jonathanj/f5a419717c782a827b0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn fill-fields | |
"" | |
[input-path fields] | |
(let [output-path (File/createTempFile "fill-fields" ".pdf")] | |
(with-open [input (neon-input-stream input-path) | |
output (neon-output-stream output-path)] | |
(let [reader (PdfReader. input) | |
stamper (PdfStamper. reader output)] | |
(doseq [[k v] fields] | |
(.setField stamper k v)))) | |
output-path)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment