[barcode] Deciphering command line options

Brendon Oliver brendon.oliver@gmail.com
Tue Jun 16 03:23:59 CEST 2009


Hi all,

[apologies if this appears twice on the list... I seem to be having
trouble sending via my gmail a/c from work just at the moment]

I'm trying to print a sheet of sticky labels which will be used to label tape
cartridges, but I just cannot fathom how the -t, -g and -m options interact.

The label sheets we have are 15 rows x 3 cols for a total of 45 labels per
sheet (Avery code DL45 fwiw).  I've been using barcode for quite a while, but
I've never been able to get the layout "just right" so that I can print a full
sheet.  What tends to happen is that the barcode images eventually go out of
alignment after the 3rd row and start overprinting on the label cut lines.

I'll try to describe the sheet and label dimensions so maybe somebody can
help.  (I did get some assistance from a fellow, I think in Western Australia
over a year or so ago, but I've lost track of the emails.  He'd done some work
to try and make this sort of label sheet easier to produce, but at the moment,
I'm using the bog-standard barcode 0.98 distribution on Gentoo).

Label sheet = A4 size,

Label cells = (w) 51mm x (h) 15mm

Horizontal gap between cells across the row: 14mm
Vertical gap between cells in a column: 3mm

The label "area" is pretty much centered on the page: 14mm margin left &
right; top/bottom margins are 15mm (although I've noticed some sheets are cut
a bit different, and have a 14~14.5mm top margin).

So we have horizontally:
14mm [51mm label] 14mm [51mm label] 14mm [51mm label] 14mm

(which is actually 209mm although A4 page width is generally 210mm I believe)

Vertically:
15mm (top margin)
[15mm label]
3mm
... repeat x14 rows...
15mm (bottom margin)

I hope this all makes sense.

I thought maybe rounding might be an issue, so recently I've converted all my
measurements to points using 1mm = 2.857142857 points

The closest I've had to getting the result I want is using:

-e code39 -c -u 'mm' -p 210x297 -t 3x15+0+0-0-7 -g 45x12+17+10 -m 3,2

.. but really, I don't "get" the difference between the margins with -t & -g
and then how -m comes into the picture.  The doco suggests that -m is used to
change the default 10pt margin that is used within each label cell, but
attempting to remove this by specifying '-m 0,0' seems not to work. Ideally, I
want the barcode to fill as much of the label cell as possible.

Which gives me about 14 rows of usable labels.  However the barcode reader in
our new tape library seems to have trouble reading about 1/2 the labels
printed. I'm guessing that maybe this is because the printed barcode is a bit
smaller than when I was getting 9 rows of usable labels off a sheet.

Hope someone can help / make suggestions.

Thanks & regards,

- Brendon.


More information about the barcode mailing list