So, this kind-of works. Both Artefact and Barcode repositories are not writable, so here is an artefact package that depends on barcode. ean13Test: aStream "drawing an EAN13" | pdfdoc aPage barcode sequence | barcode := BarcodeEAN13 value: '2109876543210'. sequence := barcode binarySequence. pdfdoc := PDFDocument new. aPage := PDFPage new. sequence withIndexDo: [:each :index | each = $1 ifTrue: [ aPage add: (PDFLineElement from: (20+index) pt @ 50 pt to: (20+index) pt @ 20 pt). ] ]. pdfdoc add: aPage. pdfdoc styleSheet drawColor: (PDFColor r: 0 g: 0 b: 0). pdfdoc exportTo: aStream
Very cool !!! Le 20 juin 2013 à 13:41, Stephan Eggermont a écrit :
So, this kind-of works. Both Artefact and Barcode repositories are not writable, so here is an artefact package that depends on barcode.
ean13Test: aStream "drawing an EAN13"
| pdfdoc aPage barcode sequence | barcode := BarcodeEAN13 value: '2109876543210'. sequence := barcode binarySequence. pdfdoc := PDFDocument new. aPage := PDFPage new. sequence withIndexDo: [:each :index | each = $1 ifTrue: [ aPage add: (PDFLineElement from: (20+index) pt @ 50 pt to: (20+index) pt @ 20 pt). ] ]. pdfdoc add: aPage. pdfdoc styleSheet drawColor: (PDFColor r: 0 g: 0 b: 0). pdfdoc exportTo: aStream
<Artefact-Barcodes.st><ean13Test.pdf>
Hello, We just added Stephan and Torsten to Artefact contributors so they should be able to commit. Therefore we don't find the account of Gary Chambers on Smalltalk Hub. Do you have one? Thanks in advance for your contribution to Artefact. 2013/6/20 Stephan Eggermont <stephan@stack.nl>
So, this kind-of works. Both Artefact and Barcode repositories are not writable, so here is an artefact package that depends on barcode.
ean13Test: aStream "drawing an EAN13"
| pdfdoc aPage barcode sequence | barcode := BarcodeEAN13 value: '2109876543210'. sequence := barcode binarySequence. pdfdoc := PDFDocument new. aPage := PDFPage new. sequence withIndexDo: [:each :index | each = $1 ifTrue: [ aPage add: (PDFLineElement from: (20+index) pt @ 50 pt to: (20+index) pt @ 20 pt). ] ]. pdfdoc add: aPage. pdfdoc styleSheet drawColor: (PDFColor r: 0 g: 0 b: 0). pdfdoc exportTo: aStream
-- *Guillaume Larcheveque*
participants (3)
-
Guillaume Larcheveque -
Olivier Auverlot -
Stephan Eggermont