clj-pdf

How to serve the stream pdf with ring

╄→尐↘猪︶ㄣ 提交于 2019-12-22 04:49:14
问题 I'm trying to serve a clj-http generated document directly via ring/compojure. I thought ring.util/piped-output-stream would work, but it seems I'm not understanding something here... This: (defn laminat-pdf-t [natno] (piped-input-stream (fn [output-stream]) (pdf [ {:title (str "Omanimali-Kuscheltierpass" natno) :orientation :landscape :size :a6 :author "Omanimali - Stefanie Tuschen" :register-system-fonts true } ;; [:svg {} (clojure.java.io/file ;; (str "/einbuergern/" natno "/svg" ))] [

How to serve the stream pdf with ring

我只是一个虾纸丫 提交于 2019-12-05 05:52:53
I'm trying to serve a clj-http generated document directly via ring/compojure. I thought ring.util/piped-output-stream would work, but it seems I'm not understanding something here... This: (defn laminat-pdf-t [natno] (piped-input-stream (fn [output-stream]) (pdf [ {:title (str "Omanimali-Kuscheltierpass" natno) :orientation :landscape :size :a6 :author "Omanimali - Stefanie Tuschen" :register-system-fonts true } ;; [:svg {} (clojure.java.io/file ;; (str "/einbuergern/" natno "/svg" ))] [:paragraph "Some Text"] ] output-stream))) (defn laminat-pdf "generate individualized cuddly toy passport