From 833317588baead2fd43af4841a6f5dc6e54b0329 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Fri, 19 Feb 2016 16:15:11 -0200 Subject: [PATCH] =?UTF-8?q?Remove=20arquivo=20desnecess=C3=A1rio=20para=20?= =?UTF-8?q?gera=C3=A7=C3=A3o=20de=20c=C3=B3digo=20de=20barras?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/barcode.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 sapl/barcode.py diff --git a/sapl/barcode.py b/sapl/barcode.py deleted file mode 100644 index fd879c8f9..000000000 --- a/sapl/barcode.py +++ /dev/null @@ -1,29 +0,0 @@ -from reportlab.graphics.barcode import createBarcodeDrawing -from reportlab.graphics.shapes import Drawing -from reportlab.lib.units import mm - - -class BarcodeDrawing(Drawing): - - def __init__(self, text_value, *args, **kw): - barcode = createBarcodeDrawing( - 'Code128', - value=text_value, - barHeight=10 * mm, - humanReadable=True) - Drawing.__init__(self, barcode.width, barcode.height, *args, **kw) - self.add(barcode, name='barcode') - - -# def barcode(request): -# #instantiate a drawing object -# import barcode -# d = barcode.BarcodeDrawing("HELLO WORLD") -# binaryStuff = d.asString('gif') -# return HttpResponse(binaryStuff, 'image/gif') - -if __name__ == '__main__': - # use the standard 'save' method to save barcode.gif, barcode.pdf etc - # for quick feedback while working. - BarcodeDrawing("HELLO WORLD").save( - formats=['gif', 'pdf'], outDir='.', fnRoot='barcode')