[reportlab-users] Size of Barcodes in Reportlab

Jürgen Geuter tante at the-gay-bar.com
Mon Nov 17 15:39:52 EST 2008


I am trying to generate barcodes with reportlab and it works quite well:
---- example code -----
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4,landscape
from reportlab.graphics.barcode import code39
from reportlab.lib.units import mm

c = canvas.Canvas("/tmp/barcode.pdf", pagesize=landscape(A4))
barcode = code39.Extended39("123456")


This draws a correct barcode to the position I wanted it printed, but
it's too small. The barcode's size is not influenced by the font or the
current line width, I tried setting the "height" and "width" attributes
of my barcode before calling "drawOn". Nothing would change the
barcode's size.
I just need it bigger so our scanners can properly read it (there is
some dirt involved sometimes and the scanners are not always perfect so
in this case, size _does_matter :)

Thanks in Advance

Jürgen Geuter

ICQ #81510866 - http://the-gay-bar.com - jabber tante at jabber.org
Occam's Razor:
-"Entia non sunt multiplicanda praeter necessitatem."-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20081117/aabc3064/attachment.pgp>

More information about the reportlab-users mailing list