At work we use LTO-2 and LTO-3 tape-robots, which use barcodes to identify tapes. However, these barcodes can be very expensive and hard to come by. This made me look for a method to create the barcodes myself.
I’ve put my web-based version on a new page: Barcode Generator
I found Terry Burton’s ‘postscriptbarcode‘. Which is capable of creating the required ‘Type 39’ barcodes.
After mucking about in postscript (which is not something I do with pleasure…) for a while I got a decent working layout/method to create my barcodes. It can be automated even more, but I only need 1 or 2 sheets of barcodes, so I’ll leave this as an exercise for the reader :).
- Download ‘postscriptbarcode‘, and extract barcode_with_sample.ps from it
- Remove the lines (near the end) between ‘Helvetica findfont’ and ‘showpage’
- Replace the lines with the output of genbarcodes.sh (included below)
- Preview the file in evince or a viewer of choice
- Print the postscript file, preferably on sticker-paper, cut and stick on tapes
The required barcode-lines can be generated with the following simple bash script:
for hor in 30 220 410
while [ $ver -ge 40 ];
printf -v FNR “(%06dL3)” $NR
echo “$hor $ver moveto $FNR (includetext height=0.55) code39 barcode”
Replace ‘BASE’ with the number where you want to start numbering, it is incremented by 1 for each barcode, and the barcodes are formatted with the number, filled to 6 digits, appended with ‘L3’. The coordinates are for A4 format paper.
The resulting pdf example of the above script.