docs-barcode

command module
v0.0.0-...-78d2bd3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 7 Imported by: 0

README

Code 128 barcode sheet generator

This is a simple command line utility to generate a PDF of Code 128 barcodes, arranged so that they align to the random label sheets I bought online. I apply these barcode labels to personal docs before I scan them into paperless-ngx.

Build

go build

Generating a PDF requires a font. This tool uses Roboto Mono, and the font file is embedded into the docs-barcode binary for easy portability.

Example

./docs-barcode --next 123 --prefix FOOBAR --pages 2 --output foobar.pdf

This outputs a file like foobar.pdf.

Docs

$ ./docs-barcode
Must specify barcode prefix
Usage of ./docs-barcode:
  -debug-outline
    	draw outline of label
  -next int
    	next barcode number (default -1)
  -output string
    	output filename (default "not set")
  -pages int
    	number of pages to generate (default 1)
  -prefix string
    	barcode prefix (default "not set")

The sheet dimensions are hardcoded to the ones I have on hand. They're not adjustable at the command line (and adjusting them requires too many options). If you need to adjust them to a new type of sheet, you'll need to modify the relevant lines in main.go directly and rebuild.

The app always generates full sheets, since I want to maximize use of the sheets I have.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL