Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

barby

> 编程语言
Open source

The Ruby barcode generator

855 stars0 likes3 views
WebsiteGitHub

About

The Ruby barcode generator

Barby

Barby is a Ruby library that generates barcodes in a variety of symbologies.

Its functionality is split into barcode and "outputter" objects:

  • [Barby::Barcode objects] symbologies turn data into a binary representation for a given symbology.
  • [Barby::Outputter] outputters then takes this representation and turns it into images, PDF, etc.

You can easily add a symbology without having to worry about graphical representation. If it can be represented as the usual 1D or 2D matrix of lines or squares, outputters will do that for you.

Likewise, you can easily add an outputter for a format that doesn't have one yet, and it will work with all existing symbologies.

For more information, check out the Barby wiki.

New require policy

Barcode symbologies are no longer required automatically, so you'll have to require the ones you need.

If you need EAN-13, require 'barby/barcode/ean_13'. Full list of symbologies and filenames below.

Example

…

Supported symbologies

ruby
require 'barby/barcode/'
Name Filename Dependencies
Code 25 code_25 ─
├─ Interleaved code_25_interleaved ─
└─ IATA code_25_iata ─
Code 39 code_39 ─
└─ Extended code_39 ─
Code 93 code_93 ─
Code 128 (A, B, and C) code_128 ─
└─ GS1 128 gs1_128 ─
Codabar codabar ─
EAN-13 ean_13 ─
├─ Bookland bookland ─
└─ UPC-A ean_13 ─
EAN-8 ean_8 ─
UPC/EAN supplemental, 2 & 5 digits upc_supplemental ─
QR Code qr_code rqrcode
DataMatrix (dmtx) data_matrix dmtx
PDF417 pdf_417 JRuby

Outputters

ruby
require 'barby/outputter/_outputter'
filename dependencies
ascii ─
cairo cairo
html ─
pdfwriter ─
png chunky_png
prawn prawn
rmagick rmagick
svg ─

Formats supported by outputters

  • Text (mostly for testing)
  • PNG, JPEG, GIF
  • PS, EPS
  • SVG
  • PDF
  • HTML

For more information, check out the Barby wiki.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言