diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-01-09 12:04:00 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-01-09 12:04:00 +0100 |
commit | afc6f0a4de593d7164341006a7dfc5e1add977aa (patch) | |
tree | 29881bb94ad9b4f457fbf37c5bfa6f75256b96bb /tex/context/base/mkiv/libs-imp-zint.mkxl | |
parent | 244d921e51a1cfdc57ebe313a2e561d579a78150 (diff) | |
download | context-afc6f0a4de593d7164341006a7dfc5e1add977aa.tar.gz |
2020-01-09 11:26:00
Diffstat (limited to 'tex/context/base/mkiv/libs-imp-zint.mkxl')
-rw-r--r-- | tex/context/base/mkiv/libs-imp-zint.mkxl | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/libs-imp-zint.mkxl b/tex/context/base/mkiv/libs-imp-zint.mkxl new file mode 100644 index 000000000..d7436a4a4 --- /dev/null +++ b/tex/context/base/mkiv/libs-imp-zint.mkxl @@ -0,0 +1,61 @@ +%D \module +%D [ file=m-zint, +%D version=2010.12.07, +%D title=\CONTEXT\ Extra Modules, +%D subtitle=Zint Barcode Generator, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D Using \type {zint} seems to be the easiest way to generate +%D (PDF417) barcodes so therefore we now have this module. There +%D are proper (also windows) binaries at: +%D +%D \starttyping +%D http://www.zint.org.uk +%D \stoptyping +%D +%D There is a bit more code than needed as we want to be able to +%D feed names. + +\registerctxluafile{libs-imp-zint}{} + +\unprotect + +\definefont[usedzintfont][dejavusansmono at 10bp] + +\unexpanded\def\barcode[#1]% [alternative=,text=] + {\bgroup + \usedzintfont + \getdummyparameters + [\c!alternative=,\c!text=,#1]% + \scale + [#1]% + {\ctxlua{utilities.zint.execute{code="\dummyparameter\c!alternative",text=\!!bs\dummyparameter\c!text\!!es}}}% + \egroup} + +\protect + +\continueifinputfile{libs-imp-zint.mkxl} + +\starttext + +% \dorecurse{1000}{ + \startTEXpage + \barcode[alternative=PDF417,text={Hans Hagen}]% + \blank + \barcode[alternative=PDF417,text={Ton Otten}]% + \blank + \barcode[alternative=ISBN,text=9789490688011]% + \blank + \barcode[alternative=isbn,text=9789490688011,width=3cm]% + \stopTEXpage +% } + +\stoptext + + |