Create a gist now

Instantly share code, notes, and snippets.

@matstani /core.clj
Last active Dec 24, 2015

What would you like to do?
(ns try-itext.core
(:import [com.itextpdf.text
Document PageSize Paragraph Font
pdf.PdfWriter pdf.BaseFont]
[ FileOutputStream])
(defn create-pdf []
(with-open [pdf-doc (Document. PageSize/A4 50 50 50 40)]
(doto pdf-doc
(PdfWriter/getInstance (FileOutputStream. "test.pdf"))
(.add (Paragraph. "こんにちは、世界!"
(Font. (BaseFont/createFont
(defn -main
[& args]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment