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
Description: Binary data
ean13Test.pdf
Description: Adobe PDF document
