Skip to content

Commit

Permalink
release 2.2.17 with ability to set color for line separator
Browse files Browse the repository at this point in the history
  • Loading branch information
yogthos committed Mar 8, 2017
1 parent a50990f commit 7bca510
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject clj-pdf "2.2.16"
(defproject clj-pdf "2.2.17"
:description "PDF generation library"
:url "https://github.com/yogthos/clj-pdf"

Expand Down
5 changes: 3 additions & 2 deletions src/clj/clj_pdf/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,9 @@
(doto (new DottedLineSeparator) (.setGap (float gap)))
(new DottedLineSeparator))
(new LineSeparator))]
(doto lineSeparator (if (and r g b) (.setLineColor (new Color r g b)))
(.setOffset -5))))
(if (and r g b) (.setLineColor lineSeparator (new Color r g b)))
(.setOffset lineSeparator -5)
lineSeparator))

(defn- reference [meta reference-id]
(if-let [item (get @*cache* reference-id)]
Expand Down
Binary file modified test/chapter.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion test/clj_pdf/test/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

(defn eq? [doc1 doc2]
;uncomment to generate test data
(spit (str "test" java.io.File/separator doc2) (fix-pdf (doc-to-str doc1)))
#_(spit (str "test" java.io.File/separator doc2) (fix-pdf (doc-to-str doc1)))
(is (= (fix-pdf (doc-to-str doc1)) (fix-pdf (slurp (str "test" java.io.File/separator doc2))))))

(deftest page-numbers
Expand Down
Binary file modified test/header.pdf
Binary file not shown.
Binary file modified test/heading.pdf
Binary file not shown.
Binary file modified test/nofooter.pdf
Binary file not shown.
Binary file modified test/pages1.pdf
Binary file not shown.
Binary file modified test/pages2.pdf
Binary file not shown.
Binary file modified test/paragraph.pdf
Binary file not shown.
Binary file modified test/section.pdf
Binary file not shown.
Binary file modified test/spacer.pdf
Binary file not shown.
Binary file modified test/table.pdf
Binary file not shown.

0 comments on commit 7bca510

Please sign in to comment.