diff --git a/project.clj b/project.clj index f7295bd0..6dcf2947 100644 --- a/project.clj +++ b/project.clj @@ -22,7 +22,7 @@ [nilenso/honeysql-postgres "0.2.4"] [cljs-http "0.1.44"] [clj-http "3.7.0"] - [clj-pdf "2.2.31"] + [clj-pdf "2.2.33"] [org.clojure/core.async "0.3.465"] [fogus/ring-edn "0.3.0"] [buddy/buddy-auth "2.1.0"] diff --git a/src/clj/auto_ap/routes/checks.clj b/src/clj/auto_ap/routes/checks.clj index 8e61ee95..e09a0041 100644 --- a/src/clj/auto_ap/routes/checks.clj +++ b/src/clj/auto_ap/routes/checks.clj @@ -31,7 +31,7 @@ (defn make-check-pdf [check] (let [output-stream (ByteArrayOutputStream.)] (pdf/pdf - [{:left-margin 10 :right-margin 0 :top-margin 0 :bottom-margin 0} + [{:left-margin 10 :right-margin 0 :top-margin 0 :bottom-margin 0 :size :letter} (let [{:keys [paid-to company check date amount memo] {vendor-name :name :as vendor} :vendor} check df (DecimalFormat. "#,###.00") word-amount (num->words amount) @@ -152,7 +152,7 @@ (defn merge-pdfs [keys] (let [merged-pdf-stream (java.io.ByteArrayOutputStream.) uuid (str (UUID/randomUUID))] - (apply pdf/collate (concat [merged-pdf-stream] (->> keys + (apply pdf/collate (concat [{:size :letter} merged-pdf-stream] (->> keys (map #(s3/get-object (:data-bucket env) %)) (map :input-stream)))) (s3/put-object :bucket-name (:data-bucket env)