Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 839 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 839 Bytes

barcode Build Status Clojars Project

Dead simple barcode generator for Clojure based on Java barbecue library.

Installation

Add the following dependency to your project.clj file:

[ondrs/barcode "0.1.0"]

Usage

(def barcode (generate :code128 "010123456789012815051231")) ;; create a Barcode instance

;; adjust the barcode to your wishes
(doto barcode
  (.setDrawingText false)
  (.setBarHeight 3000)
  (.setBarWidth 200)
  (.setResolution 300))

(write! barcode "ean-128.png") ;; and write it into the file

(write! barcode an-output-stream :png) ;; or you can use an instance of OutputStream 

That's it!