diff options
author | Norbert Preining <norbert@preining.info> | 2022-08-24 03:01:23 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-08-24 03:01:23 +0000 |
commit | 2fcb60fa8843870d9f3a90987498e5b775402258 (patch) | |
tree | 7db6e32b73c582239b1080a4c5272c8ec51c21d5 /graphics/pstricks | |
parent | 0fab672d8f0c2d456fafd111ea77c2123075d653 (diff) |
CTAN sync 202208240301
Diffstat (limited to 'graphics/pstricks')
14 files changed, 18526 insertions, 5098 deletions
diff --git a/graphics/pstricks/contrib/pst-barcode/Changes b/graphics/pstricks/contrib/pst-barcode/Changes index 2582a40fc2..29e44574e8 100644 --- a/graphics/pstricks/contrib/pst-barcode/Changes +++ b/graphics/pstricks/contrib/pst-barcode/Changes @@ -1,4 +1,72 @@ ----- pst-barcode.tex +0.19 2022-08-23 - The parse option was extended to perform replacement + of control character names such as ^NUL and ^RS with their ASCII value. + - The horizontal alignment of text in matrix symbols was fixed. + - Various fixes were made for the encoding of Data Matrix, DotCode and Micro QR Code symbols. + - The encoding of QR Code symbols was optimised. + - The encoding of Rectangular Micro QR Code symbols was aligned with the final release of the specification. + - The linear render now uses filled polygons rather than stroked lines. + - Code 93 Extended was amended to not shift encode "$%+/" symbols. + - Support was added for USPS FIM E marks. + - Support for AI (715) was added to the GS1 linter. + - Ultracode tile colours are now defined as RGB rather than CMYK. New tile colour patterns are defined for the upcoming revision. + - A bug in the encoding of certain Aztec Code symbols was fixed. + - A bug in the encoding of certain Dotcode symbols was fixed. + - A bug in the encoding of QR Code symbols containing Kanji compression was fixed. + - The rMQR encoding was optimised, potentially resulting in smaller symbols. + - The colours for Ultracode symbols were changed to RGB values rather than CMYK. + - The metrics for Ultracode symbols was updated and a raw mode was added. + - Linting of GS1 AI (4308) was fixed. + - Linting of the check character pair for AI (8013) was added. + - Linting for GS1 coupon AIs (8110) and (8112) was added. + - Linting for GS1 AI syntax data was expanded and fixed. + - A convenience encoder for GS1 DotCode was added. + - GS1 Composite Component symbols were fixed. + - Linting was added to GS1 Composite Components. + - Linting for GS1 AI syntax data was added. + - A bug in the compact encoding methods 0110X for GS1 DataBar Expanded formats was fixed. + - The parse and parsefnc options are now processed by a single routine that allows their escape patterns to coexist in the input data. + - Bugs in ECI processing with PDF417 and MicroPDF417 were fixed. + - A bug in the seperator pattern for GS1 DataBar Expanded Stacked Composite was fixed. + - A bug in leaving punctuation mode in Aztec Code was fixed. + - An inefficiency in the QR Code encoding was fixed. + - ECI support was added to Code One. + - A bug in Data Matrix for ECI checks at end of data was fixed. + - ECI support was added to Data Matrix, Aztec Code, QR Code, PDF417, MicroPDF417, Maxicode and DotCode. + - GS1 DataBar Limited was updated to include a righthand whitespace guard. + - Code 32 was fixed to avoid overwriting the provided barcode string. + - A new encoder for Swiss QR Code was added. + - The Codablock F encoding was optimised potentially resulting in smaller symbols. + - The GS1 DataBar Stacked, GS1 DataBar Stacked Omnidirectional and GS1 DataBar Expanded Stacked separator patterns were fixed. + - A bug in GS1-128 that sometimes prevented encoding with a Composite Component was fixed. + - Bugs in GS1 Composite Component encoding were fixed. + - The GS1 QR Code encoder was fixed. + - Changes were required to the package build script due to new defaults in recent versions of GhostScript. + - Preliminary support for the Rectangular Micro QR Code symbology was added. + - The encoders were amended to workaround a non-standard operator on Harlequin RIPs. + - A distict encoder was added for Data Matrix Rectangular Extension. + - The Data Matrix encoder was enhanced to include the ISO formats for DMRE. + - A crash with a certain encoding of data in GS1 Databar Expanded based symbologies was fixed. + - A bug in the Code 128 encoder when composite component linkage flags were used with data terminating in mode C was fixed. + - An encoder for the Royal Mail Mailmark symbology was added. + - The performance of the renmatrix renderer was slightly optimised. + - The performance of the renmatrix renderer was significantly improved. + - A recent regression in the Data Matrix encoder was fixed. + - The Data Matrix encoder was fixed to avoid certain cases where switching between C40, Text and X12 encoding might latch repeatedly. + - Preliminary support for the JAB Code symbology was added. + - The raw option was added to the Data Matrix encoder. + - The base size of Ultracode symbols was increased. + - Support for symbols composed of dots was added to the renmatrix renderer. + - The DotCode encoder was amended to use the dotty matrix feature. + - A bug in the DotCode encoder's handling of FNC3 message separator characters was fixed. + - The DotCode encoder was fixed to support optimised handling of "FNC1 in First" for leading numeric input. + - The performance of the Channel Code encoder was improved. + - The base symbol size of the DotCode encoder was increased. + - The DotCode encoder was enhanced to fix weaknesses with the mask evaluation algorithm. + - The Channel Code encoder checksum calculation for channels 4 and 7 was fixed. + - Fixed end of data region encoding error with EDIFACT encoding in Data Matrix. + - Preliminary support for the Ultracode symbology was added. + - The renmatrix renderer was improved to support colour symbols. 0.18 2017-08-22 - changed fonts to URW nimbus - fix bug in pst-barcode.pro 0.17 2017-08-05 - new font file to embed the Type 1 fonts @@ -35,6 +103,18 @@ ----- pst-barcode.pro +2022-08-21 - bug fixes and optimisations for QR Code, Micro QR Code, Data + Matrix, DotCode, Aztec Code, GS1 Composite Components, GS1 + DataBar, Code 32, Codablock F, GS1-128, Channel Code and Code 93. + - new barcodes for Swiss QR Code, Rectangular Micro QR Code, Data + Matrix Rectanguar Extension, Royal Mail Mailmark and FIM E marks, + GS1 Digital Link QR Code, GS1 Digital Link Data Matrix. + - validation of GS1 AI syntax data and GS1 Digital Link URIs. + - ECI support for all supported symbologies. + - parsing of named escape sequences for ASCII control characters, + e.g. ^NUL and ^RS. + - linear render uses filled polygons rather than stroked lines. + - matrix render performance improvements. 2017-08-22 - fix bug with Times 2017-04-12 - some new barcodes 2016-04-21 - some new barcodes diff --git a/graphics/pstricks/contrib/pst-barcode/doc/images/barcode.jpg b/graphics/pstricks/contrib/pst-barcode/doc/images/barcode.jpg Binary files differnew file mode 100644 index 0000000000..bce5444f64 --- /dev/null +++ b/graphics/pstricks/contrib/pst-barcode/doc/images/barcode.jpg diff --git a/graphics/pstricks/contrib/pst-barcode/doc/images/datamatrix-4.eps b/graphics/pstricks/contrib/pst-barcode/doc/images/datamatrix-4.eps new file mode 100644 index 0000000000..27c381c7e7 --- /dev/null +++ b/graphics/pstricks/contrib/pst-barcode/doc/images/datamatrix-4.eps @@ -0,0 +1,389 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: 0 0 162 18 +%%Creator: Online Barcode Generator 2019-10-29. https://the-burtons.xyz/barcode-generator/ +%%CreationDate: 2019-10-31 15:36:08 +%%Pages: 1 +%%LanguageLevel: 2 +%%DocumentData: Clean7Bit +%%EndComments +%%BeginProlog +%%BeginResource: Category uk.co.terryburton.bwipp 0.0 2019102900 30005 33214 +%%BeginData: 7 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +P1OerF_-`n01TSk ATDK p010/ iAS5q %H '6m E30Ia ,!KmJH +23Ji?3%mj@F*(i. @qA VbE+L \DATV m" @r# drB 9KiQ +P'&Es@:O(aA79M! @<ls? E+ OHE04 AmA@ <l s?E +OH\< K_S [F_`U >D_? +-CEcQG7F`MSBDD# CBBlJ $S4 tf9 3FCf *' Ed8 d<AS,X oA TD@'Df p)1 +AWh2!hZ~> +% Category/uk.co.terryburton.bwipp 0.0 2019102900 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp raiseerror 0.0 2019102900 39086 38828 +%%BeginData: 9 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT _@s)g 4ASuU /@ :O( eDJ() 6Eckq9 +F(KH4@:O(eDJ+B\ </: R<23J D%Ea` [' AS# n&D fU1I +,\;":DfV")04f0E DfTQ0 Ao EhrP' A6`E cQ )=P !1O1E cQ) =DIIB nP!5 + %R,\;":DfRL@Df '?"DI eoM P'A 6`Ec Q) =05 b?FATD g0 EZfIEF _-_ +\P+mAf%[&V$Ea`[ 'AS#n &Df V"# P %64 gCG '+8 /p(ZFE d; ,:Ecc5 ;/n +0$=E,Zq1AS,XoAT D@'Df p)1 AWh 2! 3A 5Gb FDt YuCM@ [! P.H"' F`V +,9E+*6lBl7R3P#M ~> +% uk.co.terryburton.bwipp/raiseerror 0.0 2019102900 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp renmatrix 0.0 2019102900 90599 89917 +%%BeginData: 80 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT _@s)g 4ASuU /@ :O( eDJ() 6Eckq9 +F(KH4@:O(eDJ+B\ </: R<23K pPEa` [' AS# n&D fV"# +06M%_@rEuAATDg: @Wc^5 Df .1:GA 2#8P 1l (DO ps'bA Su? nFE2) ?H\` +B!23JD%@<-"%P!5 $b06_ ,@F D-I 2Ou" b) ASG djFGKs \1 G<3GEa s$( +DfUjAF`)83FHSF5 @UWb^ B6% p5D I d6q Ci= ?S" a+^(AT X( k04Sp: DfT +]'E/k*EDKBB2Ou" b%Dfg )H+ D,% uF (L Lj0 55< >F)Z/ 2@ :Y/oO u"b +*DJO<4Eb/ZiBSZY O1G< H[ CN FH 8AR T+m L]E So05 +5<6Cis9"FCf]=+D ,%uF ( LL j0 6DG \+B osoO u"b5A +U&<,Des?4NWjQCF (KHV1G <i] G ]\1 =C h[O" NWj QCF(KHV1G< i]G]\4>Ch[O +"NWjQCF(KHV1G<i ]G][P9 DKL m D6Z7 *fBk ;=J 1G<i]G]\"@ H=_m>Ou"b5A +U&<ADe<U&ATW_.O u"b5AU &<B De<U &ATW _.O u"b5AU&<0@ ;p:D!0T,k@; +L%-AU&<W!0T-HEb BH?Ou %NL8 T/Qi H]g1 5P" @<NBk2=!+E qO1FD-gjOu" +b)ASGdjF<G7.BkM +$OtV tS04J @1@rH 1%E Zeh"Eas$(D fV!mOu"b#@: +O(cEc6)<A7KOoDf Qt0@:O( cEc6)< A7KOo DfV !mOu"b*DJO <4Eb/Zi+DG_ +/F)Z/2@:YNSOu"b*DJO<4Eb/ZiBHV#,CNFH8ART+_OtVtS055<>F)Z/2@:XO(Bl7^-E,oMuA9O ++hOu"b5AU&<,Des?4+EV1>FCT6*DfV!mOu"b5AU&<A@;KXjDBO%4G]\1=Ch[O"OtDhQ06CcMFE +q;2BkM<+FCf]=H!tN'B5WkaOu"b5AU&</Df0Y>FCf]=AoDR/OtDhQ06Cc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G]\1=Ch[O"NX'<AF*),.H'1=4AU&<@Bk2=!+F'&]Op$+bFCf]=G]7SBL +]ESo06CcMFD#$$F!,]MFCf]=GA1T0BTf?:F*)Gc@Yb&JWKK0&1OYEc06CcMFEqhDF!,R9G]\4L +AnH*qF<G[:G][A8@qBP"Oo^@>Oo^_`Ou%2kG]\4>Ch[O"NWij#Dg#]T4aSi(AU&<BE,Te?FCf] +=H#I;,F(KG9E+sQBOo^@>Oo^_%I?IQOAU&<B@;KXjDN4p2ASuU$EfrS406CcMFEqhDF!,R9G]\ +4LAnH*qF<GO:G^1ERAU&<*F(8d!FHWVZ!g5I)!Ko6eP#QO7G]\1LDf[%CAU&<BE,Tf\CNO-4FD +#$$F,0g<F*)Gc$@S(;I?IQm9p.MbOq*X2061WAD..O,Bm>e#P%64gCG'+8/p(ZFEd;,:Ecc5;/ +n0$=E,Zq1AS,XoATD@'Dfp)1AWh2!3A5GbFDtYuCM@[!P.H"'F`V,9E+*6lBl7R3P#M~> +% uk.co.terryburton.bwipp/renmatrix 0.0 2019102900 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp datamatrix 0.0 2019102900 205515 224321 +%%BeginData: 235 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT _@s)g 4ASuU /@ :O( eDJ() 6Eckq9 +F(KH4@:O(eDJ+B\ </: R<23K pPEa` [' AS# n&D fV"# +06M%_@rEuAATDg: @Wc^5 Df .1:GA 2#8P 1l (DO uP+8A Su? nFE2) ?OuP ++;CG'+8/p(ZFEd; ,:Ecc 5;/ n0$ =E,^ uo P'E -!04\L 5@ ;TFpEb TcF +L_Q"0Ops'_E-,f4 DKCt) Ou" b#@ < ,jr A7^ ofO u"b%Df 0Z -Eaa/7 Amo +LsAWei&@rH1+D/O EN!0T ,kE c6/ CL ]E So0 4o- CD..O H# '4d,@ <,q +B1G<o_EcYr5DN4m CDKB B2 Ou "b 1@< -F# +D, %uF( +LLj05t??F(Js$@j #Al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y!g7AU8<PkaGA1T0BHUf'CibC6P&,qFOu=t3E-*4@E-,f4DK?pa4s4BSDKKE +0@<[lR0/%?WDJ`g(EbTc]<0B7iOq*X204\L5@;TFpEbTc]30If*F_`U>D_?-CEcQG7F`MSBDD# +CBBlJ#6A7]@eDImj"F)Q2A@qCgGOuY1:ATVm"@r#drB9KiQP'(hWFDtYuCM@[!I?IP~> +% uk.co.terryburton.bwipp/datamatrix 0.0 2019102900 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp datamatrixrectangular 0.0 2019102900 50884 54201 +%%BeginData: 17 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT _@s)g 4ASuU /@ :O( eDJ() 6Eckq9 +F(KH4@:O(eDJ+B\ </: R<23K pPEa` [' AS# n&D fV"# +06M%_@rEuAATDg: @Wc^5 Df .1:GA 2#8P 1l (DO uP+8A Su? nFE2) ?OuP ++;CG'+8/p(ZFEd; ,:Ecc 5;/ n0$ =E,^ uo P'E -L04\L 5@ ;TFpEb Tc] +3%oDi/n8fPFCfK5 H"(o: FDl %L@ W uO* E0A q<G `iLhA7 9R gD..O, Bm= +Z0@ru-sB6A$!EdN TVOu8 C30 5kf OB l@ m1P !5$ b04J@ 1@ rGmhP !5$ +b04]!=FC]E#G9CL +Cia 0N 1N .5 SBl @m1 P-6 N[FE +2)5B68E<AWf3'L] NYrO p u> KF D5Z 2F* j(NA moLsA +Wf3'P!FGY<0B5(@ ZmRN0o c8t P )XR (F _-_! H]f tD5*C&O5*@ ^MH]ft&Eckr +V1OYEdI?J0)*g/N :DfBf4 Df0 W Z5*@ ^MP# Q@= FD5Z2F*j'+ I?I0?E-,f4D +KCgDA8c@-A9)+&F E2M8P' Cna FD5Z 2F,g H:D fT]'FH-ZJA RfgjDJ*csP' +AWgEbBG9@UX:eDe *E%Df Bf4D f0VL 04\L 5@; TFpEbTc]5E [g2EbBHR")i +.#DfBf4Df0WZG[Y W*F!, "3DKK E0@<[ lR0 /%?WDJ`g(E bTc]<0B7iOq +*X204\L5@;TFpEb Tc=ARfg jDJ+*. @<.Mj P%6 4gCG'+8/p( ZFEd;,:Ecc5 +;/n0$=E,Zq1AS,XoATD@'Dfp)1AWh2!3A5GbFDtYuCM@[!P.H"'F`V,9E+*6lBl7R3P#M~> +% uk.co.terryburton.bwipp/datamatrixrectangular 0.0 2019102900 +%%EndData +%%EndResource +%%EndProlog +%%Page: 1 1 +gsave +1 1 translate +0 0 moveto +<31323334> +<646d72652076657273696f6e3d38783830> +/datamatrixrectangular /uk.co.terryburton.bwipp findresource exec +grestore +showpage +%%Trailer +%%EOF diff --git a/graphics/pstricks/contrib/pst-barcode/doc/images/dotcode-1.eps b/graphics/pstricks/contrib/pst-barcode/doc/images/dotcode-1.eps new file mode 100644 index 0000000000..048b399a21 --- /dev/null +++ b/graphics/pstricks/contrib/pst-barcode/doc/images/dotcode-1.eps @@ -0,0 +1,427 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: 0 0 112 76 +%%Creator: Online Barcode Generator 2018-05-20. https://the-burtons.xyz/barcode-generator/ +%%CreationDate: 2018-05-25 09:20:28 +%%Pages: 1 +%%LanguageLevel: 2 +%%DocumentData: Clean7Bit +%%EndComments +%%BeginProlog +%%BeginResource: Category uk.co.terryburton.bwipp 0.0 2018052000 30005 33214 +%%BeginData: 7 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +P1OerF_-`n01TSk ATDKp 010/i AS5q% H' 6mE 30Ia, !KmJH2 +3Ji?3%mj@F*(i.@ qAV bE+L\ DATVm "@ r#d rB9 KiQP +'&Es@:O(aA79M!@ <ls?E +O HE04A mA@< ls ?E+ OH\<K _S[ F_`U> D_?- +CEcQG7F`MSBDD#C BBlJ$ S4t f93 FCf* 'E d8d <AS,Xo AT D@'Dfp )1A +Wh2!hZ~> +% Category/uk.co.terryburton.bwipp 0.0 2018052000 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp raiseerror 0.0 2018052000 153916 40223 +%%BeginData: 9 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT_ @s)g4 ASuU/ @: O(e DJ()6 Eckq9F +(KH4@:O(eDJ+B\< /:R <23JD %Ea`[ 'A S#n &Df U1I, +\;":DfV")04f0ED fTQ0A oE hrP'A 6`Ec Q) =P! 1O1Ec Q)= DIIBn P!5% +R,\;":DfRL@Df'? "DIeo MP' A6` EcQ) =0 5b? FATDg0 EZ fIEF_- _\P ++mAf%[&V$Ea`['A S#n&D fV" #P% 6 4gC G'+ 8/p (ZFEd; ,: Ecc5;/ n0$ +=E,Zq1AS,XoATD@ 'Dfp) 1AW h2! 3A 5G bFD tYu CM@[!P .H "'F`V, 9E+ +*6lBl7R3P#M~> +% uk.co.terryburton.bwipp/raiseerror 0.0 2018052000 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp renmatrix 0.0 2018052000 111923 110822 +%%BeginData: 91 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT_ @s)g4 ASuU/ @: O(e DJ()6 Eckq9F +(KH4@:O(eDJ+B\< /:R <23Kp PEa`[ 'A S#n &Df V"#0 +6M%_@rEuAATDg:@ Wc^5D f. 1:GA2 #8P1 l( DOp s'bAS u?n FE2)? H\`B +!23JD%@<-"%P!5$ b06_, @FD -I2 Ou"b )A SGd jFGKs\ 1G <3GEas $(D +fUjAF`)83FHSF5@ UWb^B 6%p 5DI d 6qC i=? S"a +^(ATX (k 04Sp:D fT] +'E/k*EDKBB2Ou"b %Dfg) H+D ,%u F( LL j05 5<> F)Z/2@ :Y /oOu"b *DJ +O<4Eb/ZiBSZYO1G <H[C NFH 8A RT +mL ]ES o05 5<6C +is9"FCf]=+D,%uF (LLj 0 6D G\ +Bo soO u"b5 AU&<, +Des?4NWjQCF(KHV 1G<i]G ]\1 = Ch[ O" NWjQ CF( KHV1G<i]G] \4>Ch[O"NWj +QCF(KHV1G<i]G][ P9DKLm D6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W_tOo^_%FCf]=G[YE&B5W_4Ch74#P!+.FFCf]=G]7SB+EV1>FEh_9Aoh +O*Ou%NL<-2\rFEh51BkM=D"`e<iBQTD#HS9JPG]\1LDf[%G+EV1>FEh_9AohO*P,WP7G]\.DA9 +;LJWKK&cP#QO7G]\1=Ch[O"NX'K7Ao)$jFHSe606CcMFEhbCF!,R9G]\.DA9;K-FCf]=G].2+F +(KHV!Kq>`1OYEcFCf]=G[YE&B5W_8De<U%BkM+$P!+.FFCf]=G]7SB+F##NAU&<ADe<U&ATX(9 +Ou%NL<-2\rFEh51BkM=D#ASC&FD5?4P!*nuG]\.DA9;K-G`l[%"FDeDAU&<AE,TfR!0T,kFCf] +=B45b#+F##NAU&<@Bk2=!P,WPEFE3ORL]N[<OuAIZI?IP_FCf]=H#R\C+EV1>FEqe:AohO*+EV +1>FCB6#ASuUQ!Jgc>!Kq>`1N[2QFEq;2BkM=D"^tkYG%Hh"HS9JPG]\4MDf[%CAU&<BDe<U&AT +T&6Bm=od!Jgc>!Ko6eP#QO7G]\4>Ch[O"NWs!)DKKH1P!+.FFCf]=H#R\C+EV1>FEqe:AohO*+ +E2%>Gp%3?G][A8@qBP"P,X6=OuAI(Ou%NL<-2\rFEhbCF!,R9G]\4MDf_(WFCf]=B45b#L]DO< +FE3NOI?ITYP#RT=Ou[rR%[&V$Eb0-*@<?O(G`k%LA1r(@/n8fPFCfK5H"(o:FDl%L@WuO*E$/\ +&Anc-oEb0<1F`Lu'P')pJ06:]HE+*6lBl7RH\pKT_F(KH4@:O(eDJ+B\;u~> +% uk.co.terryburton.bwipp/renmatrix 0.0 2018052000 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp dotcode 0.0 2018052000 299580 311511 +%%BeginData: 283 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT_ @s)g4 ASuU/ @: O(e DJ()6 Eckq9F +(KH4@:O(eDJ+B\< /:R <23Kp PEa`[ 'A S#n &Df V"#0 +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$-P%'R\Or9E=L]E53L]r,YBp(ZC1MgcID..L$+EM7AARoFbF!,1[99K@>F_ +#?4L]NZ`I?I-;Bln3#F),h>D..L$+Dbb6D..L$P'CSIF*)a^F(9-/AKYf'FDYH-CER23@;L"1D +.7F"Ou%/hDfTD3@V'V&F(9-/AWfl:04JL6FE;_E+Dbb6D..L$Ou"b#ATMs7@rHC!+EM%2Eb1Ci +@V'V&F(9-/AKZ#3GB4m:DesQ5DKCtWL]W`;P#-Lg5^eepI?IQXP#Qjm8M>$sG]P!:ATMs7H#8^ +#Amob&P&OlAF*)J5DfTD3Ec6/C+Cf>+F_u#;P&,pUP#@HOOp$+b@V'V&F(9-/AVBme*s%N\D.. +L$F*f$GBln3#F),i[5*APlCh\!.@<64I5*@]TF(9-/AKYf'FDYH-CER23@;L"1D.7F"Ou%/hDf +TD3@V'V&F(9-/AWfl:04JL6FE;_E+Dbb6D..L$Ou"b#ATMs7@rHC!+EM%2Eb1CiI?IQXP"@<GB +m=\A@V'V&F*VVc1OYEc4?P9;ASs.SEb0-*@<?O(GV<TGFEDdNFE2M805tWMF!,F9G]PNWBm=kF +@rH1+D/ODJE+sQB+EDCEF"_3<BkM+$+EDCEF,0m\CktWF2D98gA9;K-@rH1+D/OEN!g7AU8<Pk +aDfBe@DfBf4Df0V=5!C*"Df0Z-Eaa0TE%`kbASu?nFE2)?P#RT)I?G)'1G<9WFCT6"AWf$9A1r +(@/n8fPFCfK5H"(o:FDl%L@WuO*E$/\&Anc-oEb0<1F`Lu'P')pJ06:]HE+*6lBl7RH\pKT_F( +KH4@:O(eDJ+B\;u~> +% uk.co.terryburton.bwipp/dotcode 0.0 2018052000 +%%EndData +%%EndResource +%%EndProlog +%%Page: 1 1 +gsave +2 2 scale +0 0 moveto +<5468697320697320446f74436f6465> +<696e6b7370726561643d302e3136> +/dotcode /uk.co.terryburton.bwipp findresource exec +grestore +showpage +%%Trailer +%%EOF diff --git a/graphics/pstricks/contrib/pst-barcode/doc/images/gs1dotcode-1.eps b/graphics/pstricks/contrib/pst-barcode/doc/images/gs1dotcode-1.eps new file mode 100644 index 0000000000..5d7260d509 --- /dev/null +++ b/graphics/pstricks/contrib/pst-barcode/doc/images/gs1dotcode-1.eps @@ -0,0 +1,769 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: 0 0 120 34 +%%Creator: Online Barcode Generator 2020-12-28. https://the-burtons.xyz/barcode-generator/ +%%CreationDate: 2020-12-28 22:54:10 +%%Pages: 1 +%%LanguageLevel: 2 +%%DocumentData: Clean7Bit +%%EndComments +%%BeginProlog +%%BeginResource: Category uk.co.terryburton.bwipp 0.0 2020122800 30005 33214 +%%BeginData: 7 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +P1OerF_-`n01TSk ATDK p010/ iAS5q %H '6m E30Ia ,!KmJH +23Ji?3%mj@F*(i. @qA VbE+L \DATV m" @r# drB 9KiQ +P'&Es@:O(aA79M! @<ls? E+ OHE04 AmA@ <l s?E +OH\< K_S [F_`U >D_? +-CEcQG7F`MSBDD# CBBlJ $S4 tf9 3FCf *' Ed8 d<AS,X oA TD@'Df p)1 +AWh2!hZ~> +% Category/uk.co.terryburton.bwipp 0.0 2020122800 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp raiseerror 0.0 2020122800 39417 39248 +%%BeginData: 10 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT _@s)g 4ASuU /@ :O( eDJ() 6Eckq9 +F(KH4@:O(eDJ+B\ </: R<23J D%Ea` [' AS# n&D fU1I +,\;":DfV")04f0E DfTQ0 Ao EhrP' A6`E cQ )=P !1O1E cQ) =DIIB nP!5 + %R,\;":DfRL@Df '?"DI eoM P'A 6`Ec Q) =05 b?FATD g0 EZfIEF _-_ +\P+mA/04J@1@rGm h+C0> WEK W,+ P "Cf HOu "b3 @;0doA TD g0EfrD FA1 +r(@/n8fPFCfK5H" (o:FD l%L @Wu O* E$ /\& Anc -oEb0 <1 F`Lu' P') +pJ06:]HE+*6lBl7 RH\p KT _F (K H4@ :O( eDJ +B\; +u~> +% uk.co.terryburton.bwipp/raiseerror 0.0 2020122800 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp parseinput 0.0 2020122800 58913 58556 +%%BeginData: 32 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT _@s)g 4ASuU /@ :O( eDJ() 6Eckq9 +F(KH4@:O(eDJ+B\ </: [?23K pPEa` [' AS# n&D fV"# +06M%_@rEuAATDg: @Wc^5 Df .1:GA 2#8P 1l (DO ps'`@ <-F #Bl7m 4FF/ +fJOu8C304o*3G%# 3.P!5 $b0 4J@ 1@rG mh P!5 $b05t? ?F (LLoOu R&k +@s29sF-8_M99M)C DI[iu Cib b'P - cl] @<- F#A o;+A30 H7 5DI[iu Cib +b'P"UroAo;+%@;L "J5*E 9+E +*d .A T) I&H '1. M3+d& <G %#3.P !5% +:Ou$]f@s29sF-8_ MZnH !# Bp (H =3+ d&< G%# 3.P! +5%:Ou$]f@s29sF- 8_MZ n H9 ;B -:Y lEa s#uA WgMc$ +'I(tC5;kQ1Lad5@ rGmhH] A,5 P )YV gO uSV6 P!3 `(B9GGnP!3 *55'q^@8R7L +)C6ATNC6CcD1OG: -L]MjA @<- F #P&P AKEc Yf( DI\iKOp$,K F(ZV1LgH6h0 +5;VEL]NY>Ou&7dI ?IQHF( ZV1 LgH6 h05; VEL ]NY>Ou%&cE cYf=OuSV6L] +`f4H]g@E!/L`?9Q Y;tAW f6(O uS7O P%Kk @Lc LVpP&bo4F_ 5&uF(Kc_<.0 +p$H]g@E!/L`?9Tg ri3/. G5P#- LgFcp l#@ WuO*E%YjBG %#3$A5@5VBl +7?qNZ(]6A8,piC` mS;F*&O 6AKWZ\ 0HbIU +>P f30/%?SBld isEcQ)=P!=A +X<%hu/C5;nRWKK&SF(^Y"C6CcDGV<eSC5;nR!Ko7%30Ia,"-TX>"-Pj29RW('I?IQXP#QC/EcY +f1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anc-oEb0<1F`Lu'P')pJ06:] +HE+*6lBl7RH\pKT_F(KH4@:O(eDJ+B\;u~> +% uk.co.terryburton.bwipp/parseinput 0.0 2020122800 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp gs1lint 0.0 2020122800 239217 234917 +%%BeginData: 277 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT _@s)g 4ASuU /@ :O( eDJ() 6Eckq9 +F(KH4@:O(eDJ+B\ </: U=23K pPEa` [' AS# n&D fV"# +06M%_@rEuAATDg: @Wc^5 Df .1:GA 2#8P 1l (DO ps'WF "qK FDKL5 ]'Tt +>:%52m5Cibb'Ou" b"Blf G$O u"b -Bl8 $1 F_t ]1Bk)K 4F E2M8P! 45U +3/B8OAs,?63Kd4% EdNsl Amo LsA W f<, P#Q jm8 Wn%>P' &E eGA2#8 /k8 +hpDJsVlF_t]1Bk* /2:2b 4sD KTf -E bT #q@ ;L! rP!FG Y< .0o>O u"b +-Bl8$&F(KGQ14(- cEck rV 5' r( dP, 4=$ L]E 56M# +WWnP'E!b+X/3Z-R ^Dn. k E8 )0 /,+ 91G gsI2 `NfY4 +$5Yi5=%V'6q'R88 4cEH9M J8X : f1+ h< )lt# =BS g7@:E_WAS, RgBkhF"D/O9 +2EH6,BF`qtRH$YW ;P)YWD H]i N 7F_5 &uF( LM" I?IQmFcpm1 Fa]EEP&Pc2F +Y@3JBlJ#D7oM-O@ :V`(78 u6% @q]: k@:O CjE fM#/DK]H)B k/>R;ajY.3& +2UdBOPpi@ru:&Am oLsAW f<,P #Qjm %[&V $Ch [d/@rl4'1H Be)FE2M8P!4 +5K!Ks:B3/@Qj"Gm )@LQZ nB-R1 2r0JP ==1 c70M3&s8k6 UX@47n?3D92 +&&T:Jand;cHat=' /U/P!5% gP&Pc2 FcplZ @;L !rP!FGY<0D BeFcplqP"Cg +UH]iM)@WuO*E%XXZ0k+R%6W6EQ1HArY@<,ddFCfKQ)+e^h@;KXg+@B'r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+t1c[=S5*@mc">_kp1Qjqb30"+t1c[CU5*@mc">_kp23L.d30" ++t2)$_I5*@mc">_nh0p4_`30"+t2)$eK5*@mc">_nh1Qjqb30"+t2)$kM5*@mc">_nh23L.d30 +"+t2)-eJ5*@mc">_ni0p4_`30"+t2)-kL5*@mc">_ni1Qjqb30"+t2)-qN5*@mc">_ni23L.d3 +0"+t2)6kK5*@mc">_nj0p4_`30"+t2)6qM5*@mc">_nj1Qjqb30"+t2)7"O5*@mc">_nj23L.d +30"+t2)?qL5*@mc">_nk0p4_`30"+t2)@"N5*@mc">_nk1Qjqb30"+t2)@(P5*@mc">_nk23L. +d30"+t2)I"M5*@mc">_nl0p4_`30"+t2)I(O5*@mc">_nl1Qjqb30"+t2)I.Q5*@mc">_nl23L +.d30"+t2)R(N5*@mc">_nm0p4_`30"+t2)R.P5*@mc">_nm1Qjqb30"+t2)R4R5*@mc">_nm23 +L.d30"+t2)[.O5*@mc">_nn0p4_`30"+t2)[4Q5*@mc">_nn1Qjqb30"+t2)[:S5*@mc">_nn2 +3L.d30"+t2)d4P5*@mc">_no0p4_`30"+t2)d:R5*@mc">_no1Qjqb30"+t2)d@T5*@mc">_no +23L.d30"+t2D?hJ 5*@m c">_q i0p4_ `3 0"+ t2D?n L5*@mc +">_qi1Qjqb30"+t 2D? tN5*@ mc">_ qi 23L .d3 0"+t +2DHnK5*@mc">_qj 0p4_` 30 "+t2D HtM5 *@ mc" >_qj1 Qjq b30"+ t2DI + %O5*@mc">_qj23 L.d30 "+t 2DQ tL5* @m c"> _qk0p4 _` 30"+t2 DR% +N5*@mc">_qk1Qjq b30"+ t2D R+P 5 *@m c"> _qk 23L.d3 0" +t2D[% M5* +@mc">_ql0p4_`30 "+t2D [+O 5*@ mc "> _ql 1Qj qb30" +t 2D[1Q 5*@ +mc">_ql23L.d30" +t2D d+ N5 *@ mc" >_q m0p 4_`3 +0"+t2Dd1P5*@mc" >_qm 1 Qj qb 30" +t2 Dd7R 5*@mc +">_qm23L.d30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ZsT2OuS7$@;1m6Oo^@AM#WWnP'J]6Ea`['AS#n&DfV"*I?IQOEckrV3IP*b@UX:eDe* +E%?$h`SOu%NL8WjRH1G<B^0l1QAFHSVHA1r(@/n8fPFCfK5H"(o:FDl%L@WuO*E$/\&Anc-oEb +0<1F`Lu'P')pJ06:]HE+*6lBl7RH\pKT_F(KH4@:O(eDJ+B\;u~> +% uk.co.terryburton.bwipp/gs1lint 0.0 2020122800 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp renmatrix 0.0 2020122800 91047 90077 +%%BeginData: 81 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT _@s)g 4ASuU /@ :O( eDJ() 6Eckq9 +F(KH4@:O(eDJ+B\ </: R<23K pPEa` [' AS# n&D fV"# +06M%_@rEuAATDg: @Wc^5 Df .1:GA 2#8P 1l (DO ps'bA Su? nFE2) ?H\` +B!23JD%@<-"%P!5 $b06_ ,@F D-I 2Ou" b) ASG djFGKs \1 G<3GEa s$( +DfUjAF`)83FHSF5 @UWb^ B6% p5D I d6q Ci= ?S" a+^(AT X( k04Sp: DfT +]'E/k*EDKBB2Ou" b%Dfg )H+ D,% uF (L Lj0 55< >F)Z/ 2@ :Y/oO u"b +*DJO<4Eb/ZiBSZY O1G< H[ CN FH 8AR T+m L]E So05 +5<6Cis9"FCf]=+D ,%uF ( LL j0 6DG \+B osoO u"b5A +U&<,Des?4NWjQCF (KHV1G <i] G ]\1 =C h[O" NWj QCF(KHV1G< i]G]\4>Ch[O +"NWjQCF(KHV1G<i ]G][P9 DKL m D6Z7 *fBk ;=J 1G<i]G]\"@ H=_m>Ou"b5A +U&<ADe<U&ATW_.O u"b5AU &<B De<U &ATW _.O u"b5AU&<0@ ;p:D!0T,k@; +L%-AU&<W!0T-HEb BH?Ou %NL8 T/Qi H]g1 5P" @<NBk2=!+E qO1FD-gjOu" +b)ASGdjF<G7.BkM +$OtV tS04J @1@rH 1%E Zeh"Eas$(D fV!m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QFEh51BkM=D"DhX]FHSe606CcMFEhbCF!,R9 +G]\1KAnH*qFHSG.P#QO7G]\1=Ch[O"NWjH;B4uCM4aSi(AU&<AE,Te?GT_*>G]\1KAnH*qFHWV +FAU&<@Bk2=!P,XU#I?IQOAU&<A@;KXjDN4s?AnGjjAos2!HS9JPG]\1LDf[%CAU&<@Bk2=!+EV +1>FEh_9AohO*Oo^_`Ou%NL<-2\rFEh51BkM=D#]F<eEbT0"FHSe606CcMFEhbCF!,]MFCf]=G] +.2+F(KHV!Ko6eP#QO7G]\1=Ch[O"NX'<AF*),.H'1=4AU&<@Bk2=!+F'&]Op$+bFCf]=G]7SBL +]ESo06CcMFD#$$F!,]MFCf]=GA1T0BTf?:F*)Gc@Yb&JWKK0&1OYEc06CcMFEqhDF!,R9G]\4L +AnH*qF<G[:G][A8@qBP"Oo^@>Oo^_`Ou%2kG]\4>Ch[O"NWij#Dg#]T4aSi(AU&<BE,Te?FCf] +=H#I;,F(KG9E+sQBOo^@>Oo^_%I?IQOAU&<B@;KXjDN4p2ASuU$EfrS406CcMFEqhDF!,R9G]\ +4LAnH*qF<GO:G^1ERAU&<*F(8d!FHWVZ!g5I)!Ko6eP#QO7G]\1LDf[%CAU&<BE,Tf\CNO-4FD +#$$F,0g<F*)Gc$@S(;I?IQm9p.Mb>;'GoEas#uAKY9*P&ZX@I?I0b%[&V$Eb0-*@<?O(G`k%LA +1r(@/n8fPFCfK5H"(o:FDl%L@WuO*E$/\&Anc-oEb0<1F`Lu'P')pJ06:]HE+*6lBl7RH\pKT_ +F(KH4@:O(eDJ+B\;u~> +% uk.co.terryburton.bwipp/renmatrix 0.0 2020122800 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp dotcode 0.0 2020122800 231542 240206 +%%BeginData: 278 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT _@s)g 4ASuU /@ :O( eDJ() 6Eckq9 +F(KH4@:O(eDJ+B\ </: R<23K pPEa` ['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!5%%05P?ED..L$P!5$ +b06:WAEb-A0Bln3#F))n0G%#3.H#7#/Cm$Sq@rHC!+C\o'FE:r1Eb1D1HS8i>F*)JKD'3Y/FDY +H-CQ^J,@V'V&F(9-/AKZ&(DfTEP1OYEcI?I/TE+sQ<+C\o'FE;_EOu%NL<'38rEb0,A061WAD. +.O,Bm;:ADfg)H+EVXHAM8":G]P!HBm=\PE+sQA+Cf>+F_u#;05tWMGp%-GGB5ENASGdjF<GUBG +B8QAP&,qFOu=t;Bk2=!+Cf>+F_u#;L]W`ULe*[e05kfO+E)4@Bl@m1+?ht3A8c@-A9)+&P&N'- +Eb0-*@<?O(G`l$h3IP*b@UX:eDe*E%?$h`SOu%NL8WjRH1G<9WFCT6"AWf$9A1r(@/n8fPFCfK +5H"(o:FDl%L@WuO*E$/\&Anc-oEb0<1F`Lu'P')pJ06:]HE+*6lBl7RH\pKT_F(KH4@:O(eDJ+ +B\;u~> +% uk.co.terryburton.bwipp/dotcode 0.0 2020122800 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp gs1dotcode 0.0 2020122800 74554 81331 +%%BeginData: 34 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT _@s)g 4ASuU /@ :O( eDJ() 6Eckq9 +F(KH4@:O(eDJ+B\ </: R<23K pPEa` [' AS# n&D fV"# +06M%_@rEuAATDg: @Wc^5 Df .1:GA 2#8P 1l (DO uP+6@ <-F #Bl7m 4FHS +U:F_`U>D_?-CEcQ G7F`M SBD D#C BBlJ $S g6- ]D3%no c0 l1QAFH SU: +F_`U>D_?-CEcQG7 F`MSB DD# CBB l J$S g6- ]D3 %o;`DJ `g (EbTc] 3%o +Di/n8fPFCfK5H"( o:FDl %L@ WuO *E 0A q<G `k$ >A8cR "D e*FB3 %oD +i/n8fPFCfK5H"(o :FDl %L @W uO *E0 Aq< G`i LhB6 +,e<DffK-A7^+D'T t>:% 5 2X =F D5Z 2F- 8_M1 G<3GE +as#uAWf6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A0>;pL]E54P"_$H +P&QQeHXpu8G`lNl!KmJH$'I9(!+]qgG`m?83+QlJG`lNJDIYDaGV<TEFEis4Ou%NL<.0p#04J@ +1@rGmh+Co>2G`lNl!KmJ>"d3\bV33VfBnubP1G<L!!0T-bBcpr'FEisXP!+/T5^eepA8QF5+DI +!3OuR&k@kj-0H]iM\@<,jrA7ZluNWi`Y:.$b!GqWnTC5<"U!Ko6eHX^E(@rGmhP!3WD5*C/=P# +X/L+DHW4Oo^_%05;VEL]NY>Ou%NLAM7M$Eas#uAKYGjEas#uAV^>$P"_#pDfBf4Df0WV"`RmjF +(LNADfBf4Df0WV#\7jkFC]E#GB@kJAWh:VE-,f4DKCgDE+*d.AS,giFE2M8P'AWgEbBG9@UX:e +De*E%DfBf4Df0VL04]!C@rGmhP!>*c@<-"%NWX3=FDl,?Bl@m1P'CDUB6,2+Df0Z-Eaa0TE%`k +bASu?nFE2)?P#RT)I9S@6@<,jrA7ZlhH]iB31OYEXOq*X205#>\A8cR"De*FB30If*F_`U>D_? +-CEcQG7F`MSBDD#CBBlJ#6A7]@eDImj"F)Q2A@qCgGOuY1:ATVm"@r#drB9KiQP'(hWFDtYuCM +@[!I?IP~> +% uk.co.terryburton.bwipp/gs1dotcode 0.0 2020122800 +%%EndData +%%EndResource +%%EndProlog +%%Page: 1 1 +gsave +1 1 translate +0 0 moveto +<28323335293576425a494625213c423b3f6f612528303129303132333435363738393031 + 32382838303038293139303532303031> +<726f77733d3136> +/gs1dotcode /uk.co.terryburton.bwipp findresource exec +grestore +showpage +%%Trailer +%%EOF diff --git a/graphics/pstricks/contrib/pst-barcode/doc/images/gs1northamericancoupon-1.eps b/graphics/pstricks/contrib/pst-barcode/doc/images/gs1northamericancoupon-1.eps new file mode 100644 index 0000000000..389abfb342 --- /dev/null +++ b/graphics/pstricks/contrib/pst-barcode/doc/images/gs1northamericancoupon-1.eps @@ -0,0 +1,494 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: 0 0 201 82 +%%Creator: Online Barcode Generator 2018-02-04. https://the-burtons.xyz/barcode-generator/ +%%CreationDate: 2018-04-16 22:56:38 +%%Pages: 1 +%%LanguageLevel: 2 +%%DocumentData: Clean7Bit +%%EndComments +%%BeginProlog +%%BeginResource: Category uk.co.terryburton.bwipp 0.0 2018020400 30005 33214 +%%BeginData: 7 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +P1OerF_-`n01TSk ATDKp 010/i AS5q% H' 6mE 30Ia, !KmJH2 +3Ji?3%mj@F*(i.@ qAV bE+L\ DATVm "@ r#d rB9 KiQP +'&Es@:O(aA79M!@ <ls?E +O HE04A mA@< ls ?E+ OH\<K _S[ F_`U> D_?- +CEcQG7F`MSBDD#C BBlJ$ S4t f93 FCf* 'E d8d <AS,Xo AT D@'Dfp )1A +Wh2!hZ~> +% Category/uk.co.terryburton.bwipp 0.0 2018020400 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp raiseerror 0.0 2018020400 153684 40223 +%%BeginData: 9 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT_ @s)g4 ASuU/ @: O(e DJ()6 Eckq9F +(KH4@:O(eDJ+B\< /:R <23JD %Ea`[ 'A S#n &Df U1I, +\;":DfV")04f0ED fTQ0A oE hrP'A 6`Ec Q) =P! 1O1Ec Q)= DIIBn P!5% +R,\;":DfRL@Df'? "DIeo MP' A6` EcQ) =0 5b? FATDg0 EZ fIEF_- _\P ++mAf%[&V$Ea`['A S#n&D fV" #P% 6 4gC G'+ 8/p (ZFEd; ,: Ecc5;/ n0$ +=E,Zq1AS,XoATD@ 'Dfp) 1AW h2! 3A 5G bFD tYu CM@[!P .H "'F`V, 9E+ +*6lBl7R3P#M~> +% uk.co.terryburton.bwipp/raiseerror 0.0 2018020400 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp renlinear 0.0 2018020400 86063 81859 +%%BeginData: 72 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]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#+F##NAU&<@Bk2=!P,WPEFE3ORL]N[<OuAIZI?IP_FCf] +=H#R\C+EV1>FEqe:AohO*+EV1>FCB6#ASuUQ!Jgc>!Kq>`1N[2QFEq;2BkM=D"^tkYG%Hh"HS9 +JPG]\4MDf[%CAU&<BDe<U&ATT&3@<cIK!Jgc>!Ko6eP#QO7G]\4>Ch[O"NWs!)DKKH1P!+.FFC +f]=H#R\C+EV1>FEqe:AohO*+DkP3BHVD.G][A8@qBP"P,X6=OuAI(Ou%NL<-2\rFEhbCF!,R9G +]\4MDf_(WFCf]=B45b#L]DO<FE3NOI?ITYP#Q(:@<,n&BPDR"F)YPtAUB;!5QCeIRqHkPEb&ut +Aor!1F,0gZD0qFaB6@X'A8GghFDu/>P&=oT@<,n&Bk2=!Oo]3<@<,mpAS-%0E,Te?B6@X'A9V` +uFD-I3OuAI(P&"]Q@<,n&Bk2=!P&=oT@<,mlASGdjFGTpZ2Nic,F^]<$GA1T0BHUr1@<,mlASG +djFGTpZ2NicWVgX_-B6@X'A9)BsBQS33F,0gZD0qFaB6@X'A9)BsBQS33F!,^j!G?O`Eb'B.A9 +;LJWFp?^Eb'3)B4uC4E,Te?B6@X'A8#OgB4uCC!g5I)!Kq52F^]<$GA1T0BHUr1@<,mlASGdjF +GTpZ2Nic,F^]<$GA1T0BTd7GF^]<$BOtmjBQT(0OuAJWP,E_k<.0p/P"h*"I?G)'1G<c[DJX$) +ARTVB30If*F_`U>D_?-CEcQG7F`MSBDD#CBBlJ#6A7]@eDImj"F)Q2A@qCgGOuY1:ATVm"@r#d +rB9KiQP'(hWFDtYuCM@[!I?IP~> +% uk.co.terryburton.bwipp/renlinear 0.0 2018020400 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp renmatrix 0.0 2018020400 108721 104094 +%%BeginData: 87 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT_ @s)g4 ASuU/ @: O(e DJ()6 Eckq9F +(KH4@:O(eDJ+B\<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3e6P')29<.0p# +?'7!+4>1_dDD*Y`ASu?nFE2)?05tWMF!,F9G]PNWBm=kFE+sQA05tWMGp%'?G]T$WE+sQAP#<r +HASGdjF<GO:G]T$WE+sQAP#@*,Ou=t;Bk2=!+E2%>G_enR2D8ufF<GL@FD5Z2F!*Y1+CoD.FC] +E#GEQnu061WAD..O,Bm>e?I?ITn3IR&#Ou"b%@<>pe@<,q(E+*WpARpr`P%64gCG'+8/p(ZFEd +;,:Ecc5;/n0$=E,Zq1AS,XoATD@'Dfp)1AWh2!3A5GbFDtYuCM@[!P.H"'F`V,9E+*6lBl7R3P +#M~> +% uk.co.terryburton.bwipp/databarexpanded 0.0 2018020400 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp databarexpandedstacked 0.0 2018020400 62622 66024 +%%BeginData: 18 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT_ @s)g4 ASuU/ @: O(e DJ()6 Eckq9F +(KH4@:O(eDJ+B\< /:R <23Kp PEa`[ 'A S#n &Df V"#0 +6M%_@rEuAATDg:@ Wc^5D f. 1:GA2 #8P1 l( DOu P+8AS u?n FE2)? OuP+ +;CG'+8/p(ZFEd;, :Ecc5 ;/n 0$= E,^u oP 'E- L04\L5 @: EYcAU& 0&D +Id<hOuP+;CG'+8/ p(ZFE d;, :Ec c 5;/ n0$ =E, ^uoP'E -! 04\L5@ :EY +cAU&0&DId<hF*(i #CLq% 'L_ Q"0 Op s' _E- ,f4 DKCt)O u" b#@<,j rA7 +^ofOu"b%Df0Z-Ea a/7A moL sA We ifE -,f 4DK CuE0 +6;5UBl7R*H#R>X4 aVtc O u8 C3 DfB f4D f0WC P,i2' +Cia0N4aW>WI?IQm 30Ia6V 33Q n !Bl U* FE2M 8P! +/T/Wr;\Fc nqO1OXV5/Tc +#UAWeitP#ZpnAWe *t3A5; iFD 5 Z2F- 8_M1 OYE cDfBf4Df0W COu%NL8T/Qi +Bl@m1NX006DKKE0 @<Zg6F _-_ \DfB f4Df 0WV #%hdoD..OH %qU!)@;]UeA +92j$@r#XdP'AWgE bBG9@ UX:e De*E% DfBf 4Df 0VL04\L5@: EYcAU&0&DId +<hP!>*c@<-"%NWX 3=FDl ,?Bl@ m1P'C DUB 6,2+Df0Z-E aa0TE%`kbAS +u?nFE2)?P#RT)I? G)'1G<9 IFCAWe Eb0K7 @;] UeA92j$@r# XdOuSV806M% +_@rEuAATDg:@Wc^5Df.1:GA2#8+Co%qBl7L&ATMd4Ear[DFcna<F(KH4@:O(eDJ,-DH]iMmATV +m"@r#drB75qB~> +% uk.co.terryburton.bwipp/databarexpandedstacked 0.0 2018020400 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp gs1northamericancoupon 0.0 2018020400 88443 84730 +%%BeginData: 46 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT_ @s)g4 ASuU/ @: O(e DJ()6 Eckq9F +(KH4@:O(eDJ+B\< /:R <23Kp PEa`[ 'A S#n &Df V"#0 +6M%_@rEuAATDg:@ Wc^5D f. 1:GA2 #8P1 l( DOu P+8AS u?n FE2)? OuP+ +;CG'+8/p(ZFEd;, :Ecc5 ;/n 0$= E,^u oP 'E- L04\L5 @: EYcAU& 0&D +Id<hF*(i#CLq%>3 %oDi/ n8f PFC f K5H "(o :FD l%L@Wu O* E0Aq<G `iL +hB6,eFDfTr5@;TR rBk(R h@r HL/ Df 0o X'T t>: %52X=F D5 Z2F-8_ M1G +<3GEas#uAWf6?1G <9WD KKE 0@ <W i+@ ;L! rOu "b*D +I[L*A7]joG]Y'?@ ;L!r O u" b$ Dfp #;D KKH7 FCoH/ +FHOb01G<6VF`;8: FCf]=F (or 3 L^B 5# 04Sp CE, TW9AU&<ADe <U&ATWq9F`) +83FHSF5@rHL/Df0 Z.G]\4 LAn H *qFH -NID KBB 2Ou%#qFD5Z 2F-<^[F*)G: +DJ+':E+P1qH\_]c 23JDeE -,f 4DKC /fX( GdV F(LLtH]gX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=#CCB60(8FEhn3+Bo +suDfp#;DKKH7F<G(3F`;8:FCf]=G].2+F(KG9@rHL/Df0Z.G]\4LAnH*qF<G(3F`;8:FCf]=Ao +DR/+Cf>4E,TW9AU&<<BmO>5>p*F9G^Y`TI?IQ<EbBHR")i.#DfBf4Df0WZG[YW*F!,"3DKKE0@ +<[lR0/%?WDJ`g(EbTc]<0B7iOq*X205#>\DJsQ;BOPahEbT#lDI[U-E,TWW30If*F_`U>D_?-C +EcQG7F`MSBDD#CBBlJ#6A7]@eDImj"F)Q2A@qCgGOuY1:ATVm"@r#drB9KiQP'(hWFDtYuCM@[ +!I?IP~> +% uk.co.terryburton.bwipp/gs1northamericancoupon 0.0 2018020400 +%%EndData +%%EndResource +%%EndProlog +%%Page: 1 1 +gsave +0 1 translate +0 0 moveto +<283831313029313036313431343136353433323133353030313230303030333130313233 + 313936303030> +<696e636c75646574657874207365676d656e74733d38206565> +/gs1northamericancoupon /uk.co.terryburton.bwipp findresource exec +grestore +showpage +%%Trailer +%%EOF diff --git a/graphics/pstricks/contrib/pst-barcode/doc/images/swissqrcode-1.eps b/graphics/pstricks/contrib/pst-barcode/doc/images/swissqrcode-1.eps new file mode 100644 index 0000000000..c5055dac79 --- /dev/null +++ b/graphics/pstricks/contrib/pst-barcode/doc/images/swissqrcode-1.eps @@ -0,0 +1,1834 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: 0 0 262 262 +%%Creator: https://www.terryburton.co.uk/barcodewriter/generator/ +%%Copyright: Barcode Writer in Pure PostScript +%%Pages: 1 +%%LanguageLevel: 2 +%%DocumentData: Clean7Bit +%%EndComments +%%BeginProlog +%%BeginResource: Category uk.co.terryburton.bwipp 0.0 2020040100 29629 32838 +%%BeginData: 6 ASCII Lines +currentglobal +true setglobal +/Generic /Category findresource dup length 1 add dict copy dup +/InstanceType /setpacking where {pop /packedarraytype} {/arraytype} ifelse put +/uk.co.terryburton.bwipp exch /Category defineresource pop +setglobal +%%EndData +%%EndResource + +%%BeginResource: uk.co.terryburton.bwipp raiseerror 0.0 2020040100 39041 38872 +%%BeginData: 15 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +1 dict +begin +/raiseerror { + $error exch /errorinfo exch put + $error exch /errorname exch put + $error /command null put + $error /newerror true put + stop +} +[/barcode] {null def} forall +bind def +/raiseerror dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource + +%%BeginResource: uk.co.terryburton.bwipp renmatrix 0.0 2020040100 90671 89701 +%%BeginData: 306 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +1 dict +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +begin +/renmatrix { + + 20 dict begin + + /args exch def + + % Default options + /width 1 def + /height 1 def + /barcolor (unset) def + /backgroundcolor (unset) def + /colormap (unset) def + /dotty false def + /inkspread 0 def + /inkspreadh 0 def + /inkspreadv 0 def + /includetext false def + /txt [] def + /textcolor (unset) def + /textxalign (unset) def + /textyalign (unset) def + /textfont (Courier) def + /textsize 10 def + /textxoffset 0 def + /textyoffset 0 def + /textgaps 0 def + /alttext () def + + % Apply the renderer options and the user options + args {def} forall + opt {def} forall + + /width width cvr def + /height height cvr def + /barcolor barcolor cvlit def + /backgroundcolor backgroundcolor cvlit def + /inkspread inkspread cvr def + /inkspreadh inkspreadh cvr def + /inkspreadv inkspreadv cvr def + /textcolor textcolor cvlit def + /textxalign textxalign cvlit def + /textyalign textyalign cvlit def + /textfont textfont cvlit def + /textsize textsize cvr def + /textxoffset textxoffset cvr def + /textyoffset textyoffset cvr def + /textgaps textgaps cvr def + /alttext alttext cvlit def + + inkspread 0 ne {/inkspreadh inkspread def} if + inkspread 0 ne {/inkspreadv inkspread def} if + + /xyget { pixx mul add pixs exch get} bind def + /cget { pixx mul add cache exch get and} bind def + /cput { % Optimise by only storing "stem" corners + dup 4 mod 0 eq { % dir is up or left + 3 1 roll pixx mul add cache exch 2 copy get 4 -1 roll or put + } { + pop pop pop + } ifelse + } bind def + + /abcd { + 4 string 0 [ + 5 -2 roll + pixx mul add dup + pixs exch 2 getinterval aload pop 3 -1 roll % A B + pixs exch pixx add 2 getinterval aload pop % C D + ] {3 copy 48 add put pop 1 add} forall pop + } bind def + + /right {dir 1 ne {x y dir cput [x y]} if /x x 1 add def /dir 1 def} bind def + /down {dir 2 ne {x y dir cput [x y]} if /y y 1 add def /dir 2 def} bind def + /left {dir 4 ne {x y dir cput [x y]} if /x x 1 sub def /dir 4 def} bind def + /up {dir 8 ne {x y dir cput [x y]} if /y y 1 sub def /dir 8 def} bind def + + /trace { + % Walk the outline of a region emitting edge coordinates of the path + /y exch def /x exch def + % dir 1:right 2:down 4:left 8:up + /dir x 1 add y 1 add xyget 1 eq {8} {4} ifelse def + /sx x def /sy y def /sdir dir def + + % A B + % C D + mark { + x y abcd + 1 { % Common exit + dup dup (0001) eq exch dup (0011) eq exch (1011) eq or or {pop right exit} if + dup dup (0010) eq exch dup (1010) eq exch (1110) eq or or {pop down exit} if + dup dup (1000) eq exch dup (1100) eq exch (1101) eq or or {pop left exit} if + dup dup (0100) eq exch dup (0101) eq exch (0111) eq or or {pop up exit} if + dup (1001) eq { + dir 2 eq {pop left exit} {pop right exit} ifelse + } { % 0110 + dir 1 eq {pop down exit} {pop up exit} ifelse + } ifelse + } repeat + x sx eq y sy eq and dir sdir eq and {exit} if + } loop + counttomark array astore exch pop + + } bind def + + % Set RGB or CMYK color depending on length of given hex string + /setanycolor { + /anycolor exch def + anycolor length 6 eq { + (< >) 8 string copy dup 1 anycolor putinterval cvx exec {255 div} forall setrgbcolor + } if + anycolor length 8 eq { + (< >) 10 string copy dup 1 anycolor putinterval cvx exec {255 div} forall setcmykcolor + } if + } bind def + + % Plot a layer of single colour + /drawlayer { + + /pixsorig pixs def + /pixs exch def + + % Pad the bitmap on all sides + /pixs [ + pixx 2 add {0} repeat + 0 pixx pixs length 1 sub { + 0 exch + pixs exch pixx getinterval aload pop + 0 + } for + pixx 2 add {0} repeat + ] def + /pixx pixx 2 add def + /pixy pixy 2 add def + + % Cache of visited corners for each direction + /cache [ pixs length {0} repeat ] def + + % Construct paths by tracing regions avoiding duplication by using the cache + /paths [ + 0 1 pixy 2 sub { + /j exch def + 0 1 pixx 2 sub { + /i exch def + /k i j abcd def + k (0001) eq k (1001) eq or { % Black region stem corners + 8 i j cget 0 eq { + i j trace + } if + } if + k (1110) eq { % White region stem corner + 4 i j cget 0 eq { + i j trace + } if + } if + } for + } for + ] def + + % Revert the bitmap size + /pixx pixx 2 sub def + /pixy pixy 2 sub def + + % Draw the image + newpath + paths { + /p exch def + /len p length def + p len 1 sub get aload pop + p 0 get aload pop + 0 1 len 1 sub { % x1 y1 x2 y2 + /i exch def + p i 1 add len mod get aload pop 6 -2 roll % x3 y3 x1 y1 x2 y2 + 5 index inkspreadh + 4 index 4 -1 roll lt {add} {sub} ifelse % y3<y1 ? x2+i : x2-i + 4 1 roll + 4 index inkspreadv + 4 index 4 -1 roll gt {add} {sub} ifelse % x3>x1 ? y2+i : y2-i + 4 -1 roll exch pixy exch sub + i 0 eq {moveto} {lineto} ifelse + } for % x2 y2 x3 y3 + closepath + pop pop pop pop + } forall + fill + + /pixs pixsorig def + + } bind def + + /drawlayerdots { + + /pixsorig pixs def + /pixs exch def + + newpath + 0 1 pixs length 1 sub { + dup pixx mod /x exch def + pixx idiv /y exch def + x y xyget 1 eq { + x 0.5 add pixy y sub 0.5 sub moveto + x 0.5 add pixy y sub 0.5 sub 0.5 inkspread sub 0 360 arc + } if + } for + fill + + /pixs pixsorig def + + } bind def + + gsave + + % Draw the image + /inkspread inkspread 2 div def + /inkspreadh inkspreadh 2 div def + /inkspreadv inkspreadv 2 div def + currentpoint translate + width pixx div 72 mul height pixy div 72 mul scale + 0 0 moveto pixx 0 lineto pixx pixy lineto 0 pixy lineto closepath + backgroundcolor (unset) ne { gsave backgroundcolor setanycolor fill grestore } if + + colormap (unset) eq { + /colormap << 1 barcolor >> def + } if + + colormap { + setanycolor + /key exch def + [ + pixs { key eq {1} {0} ifelse } forall + ] dotty {drawlayerdots} {drawlayer} ifelse + } forall + + % Display the text for elements in the text array + textcolor (unset) ne { textcolor setanycolor } if + includetext { + textxalign (unset) eq textyalign (unset) eq and alttext () eq and { + /s 0 def /fn () def + txt { + {} forall + 2 copy s ne exch fn ne or { + 2 copy /s exch def /fn exch def + selectfont + } { + pop pop + } ifelse + moveto show + } forall + } { + textfont textsize selectfont + alttext () eq { + /txt [ txt { 0 get {} forall } forall ] def + /tstr txt length string def + 0 1 txt length 1 sub { dup txt exch get tstr 3 1 roll put } for + } { + /tstr alttext def + } ifelse + + % Find true ascent of font + tstr length 0 eq { + 0 + } { + gsave + newpath 0 0 moveto (0) false charpath pathbbox + 4 1 roll pop pop pop + grestore + currentfont /PaintType known {currentfont /PaintType get 2 eq} {false} ifelse + currentfont /StrokeWidth known and { + currentfont /StrokeWidth get 2 div 0 exch + currentfont /FontMatrix get dtransform + dup mul exch dup mul add sqrt + add + } if + } ifelse + /textascent exch def + /textwidth tstr stringwidth pop tstr length 1 sub textgaps mul add def + + /textxpos textxoffset x textwidth sub 2 div add def + textxalign (left) eq { /textxpos textxoffset def } if + textxalign (right) eq { /textxpos x textxoffset sub textwidth sub def } if + textxalign (offleft) eq { /textxpos textwidth textxoffset add neg def } if + textxalign (offright) eq { /textxpos x textxoffset add def } if + textxalign (justify) eq textwidth x lt and { + /textxpos 0 def + /textgaps x textwidth sub tstr length 1 sub div def + } if + /textypos textyoffset textascent add 1 add neg def + textyalign (above) eq { /textypos textyoffset pixy add 1 add def } if + textyalign (center) eq { /textypos textyoffset pixy textascent sub 2 div add def } if + textxpos textypos moveto textgaps 0 tstr ashow + } ifelse + } if + + grestore + + end + +} +[/barcode] {null def} forall +bind def +/renmatrix dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource + +%%BeginResource: uk.co.terryburton.bwipp qrcode 0.0 2020040100 303640 335045 +%%BeginData: 1292 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +1 dict +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +begin +/qrcode { + + 20 dict begin + + /options exch def + /barcode exch def + + /dontdraw false def + /format (unset) def % full or micro. rMQR symbols are specified using version + /version (unset) def % 1-40 or M1-M4 or R7x43, etc + /eclevel (unset) def % full: L, M, Q, H; micro: L, M, Q; rmqr: M, H + /parse false def + /parsefnc false def + /mask -1 def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + /mask mask cvi def + + % If version is supplied and format is not given then set format to correspond + version (unset) ne { + format (unset) eq { + (full) + version 0 1 getinterval (M) eq { pop (micro) } if + version 0 1 getinterval (R) eq { pop (rmqr) } if + /format exch def + } if + } { + format (unset) eq { /format (full) def } if % Default to full + } ifelse + + % Parse ordinals of the form ^NNN to ASCII + parse { + /msg barcode length string def + /j 0 def + barcode + { % loop + (^) search { + dup msg exch j exch putinterval + length j add 1 add /j exch def + pop + dup 0 3 getinterval cvi msg exch j 1 sub exch put + dup length 3 sub 3 exch getinterval + } { + dup msg exch j exch putinterval + length j add /j exch def + /barcode msg 0 j getinterval def + exit + } ifelse + } loop + } if + + /barlen barcode length def + + % Convert input into bytes accounting for FNC characters + /fn1 -1 def + /fncvals << + (FNC1) fn1 + >> def + /msg barlen array def + /i 0 def /j 0 def { + i barlen eq {exit} if + /char barcode i get def + parsefnc char 94 eq and i barlen 4 sub lt and { + barcode i 1 add get 94 ne { + /char fncvals barcode i 1 add 4 getinterval get def + /i i 4 add def + } { + /i i 1 add def + } ifelse + } if + msg j char put + /i i 1 add def + /j j 1 add def + } loop + /msg msg 0 j getinterval def + /msglen msg length def + + % If FNC1 in first position then escape % as %% + /fnc1first false def + msglen 0 gt { + msg 0 get fn1 eq { + /fnc1first true def + /msg [ msg 1 msglen 1 sub getinterval { dup 37 eq {dup} if } forall ] def + /msglen msg length def + } if + } if + + % Default error correction level + eclevel (unset) eq {/eclevel format (micro) ne {(M)} {(L)} ifelse def} if + + % Enumerate vergrps + [ + /v1to9 /v10to26 /v27to40 + /vM1 /vM2 /vM3 /vM4 + /vR7x43 /vR7x59 /vR7x77 /vR7x99 /vR7x139 + /vR9x43 /vR9x59 /vR9x77 /vR9x99 /vR9x139 + /vR11x27 /vR11x43 /vR11x59 /vR11x77 /vR11x99 /vR11x139 + /vR13x27 /vR13x43 /vR13x59 /vR13x77 /vR13x99 /vR13x139 + /vR15x43 /vR15x59 /vR15x77 /vR15x99 /vR15x139 + /vR17x43 /vR17x59 /vR17x77 /vR17x99 /vR17x139 + ] 0 exch {1 index def 1 add} forall pop + + % Convert from input into message bitstream + /N 0 def /A 1 def /B 2 def /K 3 def + + /Nexcl << + [ + 16#30 1 16#39 {} for + ] {-1} forall + >> def + + /Aexcl << + [ + 16#20 16#24 16#25 16#2A 16#2B 16#2D 16#2E 16#2F 16#3A + 16#41 1 16#5A {} for + fn1 + ] {-1} forall + >> def + + /Bexcl << + [ + 16#00 1 16#1F {} for + 16#21 16#22 16#23 16#26 16#27 16#28 16#29 16#2C + 16#3B 1 16#40 {} for + 16#5B 1 16#7F {} for + 16#A0 1 16#DF {} for + ] {-1} forall + >> def + + /Kexcl << + [ + 16#81 1 16#9F {} for + 16#E0 1 16#EB {} for + ] {-1} forall + >> def + + /mids [ % N A B K + [ (0001) (0010) (0100) (1000) ] % v1to9 + [ (0001) (0010) (0100) (1000) ] % v10to26 + [ (0001) (0010) (0100) (1000) ] % v27to40 + [ () -1 -1 -1 ] % vM1 + [ (0) (1) -1 -1 ] % vM2 + [ (00) (01) (10) (11) ] % vM3 + [ (000) (001) (010) (011) ] % vM4 + 32 { + [ (001) (010) (011) (100) ] % rMQR + } repeat + ] def + + /cclens [ % N A B K + [ 10 9 8 8 ] % v1to9 + [ 12 11 16 10 ] % v10to26 + [ 14 13 16 12 ] % v27to40 + [ 3 -1 -1 -1 ] % vM1 + [ 4 3 -1 -1 ] % vM2 + [ 5 4 4 3 ] % vM3 + [ 6 5 5 4 ] % vM4 + [ 4 3 3 2 ] % vR7x43 + [ 5 5 4 3 ] % vR7x59 + [ 6 5 5 4 ] % vR7x77 + [ 7 6 5 5 ] % vR7x99 + [ 7 6 6 5 ] % vR7x139 + [ 5 5 4 3 ] % vR9x43 + [ 6 5 5 4 ] % vR9x59 + [ 7 6 5 5 ] % vR9x77 + [ 7 6 6 5 ] % vR9x99 + [ 8 7 6 6 ] % vR9x139 + [ 4 4 3 2 ] % vR11x27 + [ 6 5 5 4 ] % vR11x43 + [ 7 6 5 5 ] % vR11x59 + [ 7 6 6 5 ] % vR11x77 + [ 8 7 6 6 ] % vR11x99 + [ 8 7 7 6 ] % vR11x139 + [ 5 5 4 3 ] % vR13x27 + [ 6 6 5 5 ] % vR13x43 + [ 7 6 6 5 ] % vR13x59 + [ 8 7 6 6 ] % vR13x77 + [ 8 7 7 6 ] % vR13x99 + [ 8 8 7 7 ] % vR13x139 + [ 7 6 6 5 ] % vR15x43 + [ 7 7 6 5 ] % vR15x59 + [ 8 7 7 6 ] % vR15x77 + [ 8 7 7 6 ] % vR15x99 + [ 9 8 7 7 ] % vR15x139 + [ 7 6 6 5 ] % vR17x43 + [ 8 7 6 6 ] % vR17x59 + [ 8 7 7 6 ] % vR17x77 + [ 8 8 7 6 ] % vR17x99 + [ 9 8 8 7 ] % vR17x139 + ] def + + /termlens [ + 3 { + 4 % Full + } repeat + 3 % vM1 + 5 % vM2 + 7 % vM3 + 9 % vM4 + 32 { + 3 % rMQR + } repeat + ] def + + % Encoding functions + /tobin { + string dup length 1 sub 0 exch 1 exch {1 index exch 48 put} for + dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval + } bind def + + % Alphanumeric character to value map + /charmap (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:) def + /charvals 44 dict def + 0 1 44 {dup charmap exch get exch charvals 3 1 roll put} for + + /encA { + /in exch def + fnc1first { % FNC1 as % + /in [ in { dup -1 eq {pop 37} if } forall ] def + } if + /out in length 11 mul 2 idiv 1 add string def + /k 0 def /m 0 def { + k in length eq {exit} if + k in length 1 sub lt { + charvals in k get get 45 mul charvals in k 1 add get get add 11 tobin + /k k 2 add def + } { % Final character + charvals in k get get 6 tobin + /k k 1 add def + } ifelse + dup out exch m exch putinterval + length m add /m exch def + } loop + out 0 m getinterval + } bind def + + /encN { + /in exch def + /out in length 10 mul 3 idiv 1 add string def + /k 0 def /m 0 def { + k in length eq {exit} if + k in length 2 sub lt { + in k 3 getinterval 0 exch {exch 10 mul 48 sub add} forall 10 tobin + /k k 3 add def + } { + k in length 2 sub eq { % Two final digits + in k 2 getinterval 0 exch {exch 10 mul 48 sub add} forall 7 tobin + /k k 2 add def + } { % One final digit + in k 1 getinterval 0 exch {exch 10 mul 48 sub add} forall 4 tobin + /k k 1 add def + } ifelse + } ifelse + dup out exch m exch putinterval + length m add /m exch def + } loop + out 0 m getinterval + } bind def + + /encB { + /in exch def + fnc1first { % FNC1 as GS + /in [ in { dup -1 eq {pop 29} if } forall ] def + } if + /out in length 8 mul string def + 0 1 in length 1 sub { + /k exch def + in k get cvi 8 tobin + out k 8 mul 3 -1 roll putinterval + } for + out + } bind def + + /encK { + /in exch def + /out in length 2 idiv 13 mul string def + /k 0 def /m 0 def { + k in length eq {exit} if + in k get 256 mul in k 1 add get add + dup 16#E040 lt {16#8140} {16#C140} ifelse sub + dup -8 bitshift 16#C0 mul exch 16#00FF and add + 13 tobin dup out exch m exch putinterval + length m add /m exch def + /k k 2 add def + } loop + out + } bind def + + /encfuncs [ /encN /encA /encB /encK ] def + + /addtobits { + dup bits j 3 -1 roll putinterval + length j add /j exch def + } bind def + + /numNs [ msglen {0} repeat 0 ] def + /numAs [ msglen {0} repeat 0 ] def + /numBs [ msglen {0} repeat 0 ] def + /numKs [ msglen {0} repeat -1 ] def + /nextNs [ msglen {0} repeat 9999 ] def + /nextBs [ msglen {0} repeat 9999 ] def + /nextAs [ msglen {0} repeat 9999 ] def + /nextKs [ msglen {0} repeat 9999 ] def + msglen 1 sub -1 0 { + /i exch def + /barchar msg i get def + Kexcl barchar known { + nextKs i 0 put + numKs i numKs i 1 add get 1 add put + } { + nextKs i nextKs i 1 add get 1 add put + } ifelse + Nexcl barchar known { + nextNs i 0 put + numNs i numNs i 1 add get 1 add put + } { + nextNs i nextNs i 1 add get 1 add put + } ifelse + Bexcl barchar known { + nextBs i 0 put + numBs i numBs i 1 add get 1 add put + } { + nextBs i nextBs i 1 add get 1 add put + } ifelse + Aexcl barchar known { + nextAs i 0 put + numAs i numAs i 1 add get 1 add put + } { + nextAs i nextAs i 1 add get 1 add put + } ifelse + } for + /numKs [ numKs {1 add 2 idiv} forall ] def + + /KbeforeB {numK exch ver get ge nextBs numK 2 mul i add get 0 eq and} bind def + /KbeforeA {numK exch ver get ge nextAs numK 2 mul i add get 0 eq and} bind def + /KbeforeN {numK exch ver get ge nextNs numK 2 mul i add get 0 eq and} bind def + /KbeforeE {numK exch ver get ge numK 2 mul i add msglen eq and} bind def + /AbeforeK {numA exch ver get ge nextKs numA i add get 0 eq and} bind def + /AbeforeB {numA exch ver get ge nextBs numA i add get 0 eq and} bind def + /AbeforeN {numA exch ver get ge nextNs numA i add get 0 eq and} bind def + /AbeforeE {numA exch ver get ge numA i add msglen eq and} bind def + /NbeforeK {numN exch ver get ge nextKs numN i add get 0 eq and} bind def + /NbeforeB {numN exch ver get ge nextBs numN i add get 0 eq and} bind def + /NbeforeA {numN exch ver get ge nextAs numN i add get 0 eq and} bind def + /NbeforeE {numN exch ver get ge numN i add msglen eq and} bind def + + % Elements of the encoded message have differing lengths based on the + % resulting symbol size. The symbol sizes with different element lengths + % are batched into vergrps. To pick the smallest symbol that holds our + % content we encode the message according to each available vergrp, based + % on the format of symbol. + + % Determine which groups we need to encode + version (unset) ne { + % A specific version of symbol is given so encode in just the corresponding vergrp + /verset << + % Full + 0 1 9 { 10 2 string cvrs v1to9 } for + 10 1 26 { 10 2 string cvrs v10to26 } for + 27 1 40 { 10 2 string cvrs v27to40 } for + + % Micro + (M1) vM1 (M2) vM2 (M3) vM3 (M4) vM4 + + % rMQR + (R7x43) vR7x43 (R7x59) vR7x59 (R7x77) vR7x77 (R7x99) vR7x99 (R7x139) vR7x139 + (R9x43) vR9x43 (R9x59) vR9x59 (R9x77) vR9x77 (R9x99) vR9x99 (R9x139) vR9x139 + (R11x27) vR11x27 (R11x43) vR11x43 (R11x59) vR11x59 (R11x77) vR11x77 (R11x99) vR11x99 (R11x139) vR11x139 + (R13x27) vR13x27 (R13x43) vR13x43 (R13x59) vR13x59 (R13x77) vR13x77 (R13x99) vR13x99 (R13x139) vR13x139 + (R15x43) vR15x43 (R15x59) vR15x59 (R15x77) vR15x77 (R15x99) vR15x99 (R15x139) vR15x139 + (R17x43) vR17x43 (R17x59) vR17x59 (R17x77) vR17x77 (R17x99) vR17x99 (R17x139) vR17x139 + >> version get [ exch ] def + } { + % Just the format is specified so encode in each vergrp for the type of symbol + format (full) eq { /verset [v1to9 v10to26 v27to40] def } if + format (micro) eq { /verset [vM1 vM2 vM3 vM4] def } if + % rMQR symbols are accessed with an explicit version + } ifelse + + % Encode unterminated bitsream for each compatible vergrp separately + /msgbits [ 39 {-1} repeat ] def + /e 10000 def + verset { + /ver exch def + + % Derive optimal sequence + /mode -1 def /seq [] def /i 0 def { + i msglen ge {exit} if + /numK numKs i get def + /numB numBs i get def + /numA numAs i get def + /numN numNs i get def + ver vM1 eq numA 1 ge and {/seq -1 def exit} if + ver vM1 eq numB 1 ge and {/seq -1 def exit} if + ver vM1 eq numK 1 ge and {/seq -1 def exit} if + ver vM2 eq numB 1 ge and {/seq -1 def exit} if + ver vM2 eq numK 1 ge and {/seq -1 def exit} if + { % common exit + ver vR7x43 ge { % TODO rMQR is binary only for now + B exit + } if + mode -1 eq { % Set initial mode + [ 1 1 1 e e 1 1] KbeforeA {K exit} if + [ 1 1 1 e e 1 1] KbeforeN {K exit} if + [ 5 5 6 e e 2 3] KbeforeB {K exit} if + [ 1 1 1 e e 1 1] KbeforeE {K exit} if + numK 1 ge {B exit} if + [ 6 7 8 e e 3 4] AbeforeB {A exit} if + [ 1 1 1 e 1 1 1] AbeforeE {A exit} if + numA 1 ge { + ver vM2 ne {B} {A} ifelse exit + } if + [ 4 4 5 e e 2 3] NbeforeB {N exit} if + [ 1 1 1 e e 1 1] NbeforeB {B exit} if + [ 7 8 9 e 3 4 5] NbeforeA {N exit} if + [ 1 1 1 e 1 1 1] NbeforeA {A exit} if + numN 1 ge {N exit} if + B exit + } if + mode B eq { + [ 9 12 13 e e 4 5] KbeforeB {K exit} if + [ 9 10 12 e e 4 5] KbeforeA {K exit} if + [ 9 10 11 e e 5 6] KbeforeN {K exit} if + [ 4 5 6 e e 2 3] KbeforeE {K exit} if + [11 12 14 e e 5 7] AbeforeK {A exit} if + [11 15 16 e e 6 7] AbeforeB {A exit} if + [12 13 15 e e 6 8] AbeforeN {A exit} if + [ 6 7 8 e e 3 4] AbeforeE {A exit} if + [ 6 7 8 e e 3 4] NbeforeK {N exit} if + [ 6 8 9 e e 3 4] NbeforeB {N exit} if + [ 6 7 8 e e 3 4] NbeforeA {N exit} if + [ 3 4 5 e e 2 3] NbeforeE {N exit} if + B exit + } if + mode A eq { + numK 1 ge {K exit} if + numB 1 ge {B exit} if + [13 15 17 e 5 7 9] NbeforeA {N exit} if + [13 17 18 e e 7 9] NbeforeB {N exit} if + [ 7 8 9 e 3 4 5] NbeforeE {N exit} if + numA 1 ge numN 1 ge or {A exit} if + B exit + } if + mode N eq { + numK 1 ge {K exit} if + numB 1 ge {B exit} if + numA 1 ge {A exit} if + numN 1 ge {N exit} if + B exit + } if + mode K eq { + numB 1 ge {B exit} if + numA 1 ge {A exit} if + numN 1 ge {N exit} if + numK 1 ge {K exit} if + B exit + } if + } loop + dup K eq fnc1first and {pop B} if % No kanji with fnc1first + dup mode eq { % Same mode encode directly + pop + /dat msg i mode K eq {2} {1} ifelse getinterval def + /seq [ + seq aload pop + [ exch aload pop dat aload pop ] + ] def + } { % Change mode + /mode exch def + mode K eq {K msg i numK 2 mul getinterval} if + mode B eq {B msg i numB getinterval} if + mode A eq {A msg i numA getinterval} if + mode N eq {N msg i numN getinterval} if + /dat exch def /sw exch def + /seq [ seq aload pop sw dat ] def + } ifelse + /i i dat length add def + } loop + + % Encode the sequence + { % common exit + seq -1 eq {exit} if % Sequence not available + /bits 23648 string def + /j 0 def + fnc1first { + ver vR7x43 lt { (0101) } { (101) } ifelse addtobits + } if + /abort false def + 0 2 seq length 1 sub { + /i exch def + /mode seq i get def + mids ver get mode get addtobits + /cclen cclens ver get mode get def + /chars seq i 1 add get def + chars length 2 cclen exp cvi ge { % Too many characters for cc indicator + /abort true def exit + } if + chars length mode K eq {2 idiv} if cclen tobin addtobits + chars encfuncs mode get load exec addtobits + } for + abort {exit} if + /bits bits 0 j getinterval def + msgbits ver bits put + exit + } loop + } forall + + % Lookup the most appropriate symbol specification + /metrics [ + % format vers vergrp rows cols align modules error codewords error correction blocks + % L M Q H L1 L2 M1 M2 Q1 Q2 H1 H2 + [ (micro) (M1) vM1 11 11 98 99 36 [ 2 99 99 99 ] [ 1 0 -1 -1 -1 -1 -1 -1 ] ] + [ (micro) (M2) vM2 13 13 98 99 80 [ 5 6 99 99 ] [ 1 0 1 0 -1 -1 -1 -1 ] ] + [ (micro) (M3) vM3 15 15 98 99 132 [ 6 8 99 99 ] [ 1 0 1 0 -1 -1 -1 -1 ] ] + [ (micro) (M4) vM4 17 17 98 99 192 [ 8 10 14 99 ] [ 1 0 1 0 1 0 -1 -1 ] ] + [ (full) (1) v1to9 21 21 98 99 208 [ 7 10 13 17 ] [ 1 0 1 0 1 0 1 0 ] ] + [ (full) (2) v1to9 25 25 18 99 359 [ 10 16 22 28 ] [ 1 0 1 0 1 0 1 0 ] ] + [ (full) (3) v1to9 29 29 22 99 567 [ 15 26 36 44 ] [ 1 0 1 0 2 0 2 0 ] ] + [ (full) (4) v1to9 33 33 26 99 807 [ 20 36 52 64 ] [ 1 0 2 0 2 0 4 0 ] ] + [ (full) (5) v1to9 37 37 30 99 1079 [ 26 48 72 88 ] [ 1 0 2 0 2 2 2 2 ] ] + [ (full) (6) v1to9 41 41 34 99 1383 [ 36 64 96 112 ] [ 2 0 4 0 4 0 4 0 ] ] + [ (full) (7) v1to9 45 45 22 38 1568 [ 40 72 108 130 ] [ 2 0 4 0 2 4 4 1 ] ] + [ (full) (8) v1to9 49 49 24 42 1936 [ 48 88 132 156 ] [ 2 0 2 2 4 2 4 2 ] ] + [ (full) (9) v1to9 53 53 26 46 2336 [ 60 110 160 192 ] [ 2 0 3 2 4 4 4 4 ] ] + [ (full) (10) v10to26 57 57 28 50 2768 [ 72 130 192 224 ] [ 2 2 4 1 6 2 6 2 ] ] + [ (full) (11) v10to26 61 61 30 54 3232 [ 80 150 224 264 ] [ 4 0 1 4 4 4 3 8 ] ] + [ (full) (12) v10to26 65 65 32 58 3728 [ 96 176 260 308 ] [ 2 2 6 2 4 6 7 4 ] ] + [ (full) (13) v10to26 69 69 34 62 4256 [ 104 198 288 352 ] [ 4 0 8 1 8 4 12 4 ] ] + [ (full) (14) v10to26 73 73 26 46 4651 [ 120 216 320 384 ] [ 3 1 4 5 11 5 11 5 ] ] + [ (full) (15) v10to26 77 77 26 48 5243 [ 132 240 360 432 ] [ 5 1 5 5 5 7 11 7 ] ] + [ (full) (16) v10to26 81 81 26 50 5867 [ 144 280 408 480 ] [ 5 1 7 3 15 2 3 13 ] ] + [ (full) (17) v10to26 85 85 30 54 6523 [ 168 308 448 532 ] [ 1 5 10 1 1 15 2 17 ] ] + [ (full) (18) v10to26 89 89 30 56 7211 [ 180 338 504 588 ] [ 5 1 9 4 17 1 2 19 ] ] + [ (full) (19) v10to26 93 93 30 58 7931 [ 196 364 546 650 ] [ 3 4 3 11 17 4 9 16 ] ] + [ (full) (20) v10to26 97 97 34 62 8683 [ 224 416 600 700 ] [ 3 5 3 13 15 5 15 10 ] ] + [ (full) (21) v10to26 101 101 28 50 9252 [ 224 442 644 750 ] [ 4 4 17 0 17 6 19 6 ] ] + [ (full) (22) v10to26 105 105 26 50 10068 [ 252 476 690 816 ] [ 2 7 17 0 7 16 34 0 ] ] + [ (full) (23) v10to26 109 109 30 54 10916 [ 270 504 750 900 ] [ 4 5 4 14 11 14 16 14 ] ] + [ (full) (24) v10to26 113 113 28 54 11796 [ 300 560 810 960 ] [ 6 4 6 14 11 16 30 2 ] ] + [ (full) (25) v10to26 117 117 32 58 12708 [ 312 588 870 1050 ] [ 8 4 8 13 7 22 22 13 ] ] + [ (full) (26) v10to26 121 121 30 58 13652 [ 336 644 952 1110 ] [ 10 2 19 4 28 6 33 4 ] ] + [ (full) (27) v27to40 125 125 34 62 14628 [ 360 700 1020 1200 ] [ 8 4 22 3 8 26 12 28 ] ] + [ (full) (28) v27to40 129 129 26 50 15371 [ 390 728 1050 1260 ] [ 3 10 3 23 4 31 11 31 ] ] + [ (full) (29) v27to40 133 133 30 54 16411 [ 420 784 1140 1350 ] [ 7 7 21 7 1 37 19 26 ] ] + [ (full) (30) v27to40 137 137 26 52 17483 [ 450 812 1200 1440 ] [ 5 10 19 10 15 25 23 25 ] ] + [ (full) (31) v27to40 141 141 30 56 18587 [ 480 868 1290 1530 ] [ 13 3 2 29 42 1 23 28 ] ] + [ (full) (32) v27to40 145 145 34 60 19723 [ 510 924 1350 1620 ] [ 17 0 10 23 10 35 19 35 ] ] + [ (full) (33) v27to40 149 149 30 58 20891 [ 540 980 1440 1710 ] [ 17 1 14 21 29 19 11 46 ] ] + [ (full) (34) v27to40 153 153 34 62 22091 [ 570 1036 1530 1800 ] [ 13 6 14 23 44 7 59 1 ] ] + [ (full) (35) v27to40 157 157 30 54 23008 [ 570 1064 1590 1890 ] [ 12 7 12 26 39 14 22 41 ] ] + [ (full) (36) v27to40 161 161 24 50 24272 [ 600 1120 1680 1980 ] [ 6 14 6 34 46 10 2 64 ] ] + [ (full) (37) v27to40 165 165 28 54 25568 [ 630 1204 1770 2100 ] [ 17 4 29 14 49 10 24 46 ] ] + [ (full) (38) v27to40 169 169 32 58 26896 [ 660 1260 1860 2220 ] [ 4 18 13 32 48 14 42 32 ] ] + [ (full) (39) v27to40 173 173 26 54 28256 [ 720 1316 1950 2310 ] [ 20 4 40 7 43 22 10 67 ] ] + [ (full) (40) v27to40 177 177 30 58 29648 [ 750 1372 2040 2430 ] [ 19 6 18 31 34 34 20 61 ] ] + [ (rmqr) (R7x43) vR7x43 7 43 22 99 104 [ 99 7 99 10 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R7x59) vR7x59 7 59 20 40 171 [ 99 9 99 14 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R7x77) vR7x77 7 77 26 52 261 [ 99 12 99 22 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R7x99) vR7x99 7 99 24 50 358 [ 99 16 99 30 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R7x139) vR7x139 7 139 28 56 545 [ 99 24 99 44 ] [ -1 -1 1 0 -1 -1 2 0 ] ] + [ (rmqr) (R9x43) vR9x43 9 43 22 99 170 [ 99 9 99 14 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R9x59) vR9x59 9 59 20 40 267 [ 99 12 99 22 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R9x77) vR9x77 9 77 26 52 393 [ 99 18 99 32 ] [ -1 -1 1 0 -1 -1 1 1 ] ] + [ (rmqr) (R9x99) vR9x99 9 99 24 50 532 [ 99 24 99 44 ] [ -1 -1 1 0 -1 -1 2 0 ] ] + [ (rmqr) (R9x139) vR9x139 9 139 28 56 797 [ 99 36 99 66 ] [ -1 -1 1 1 -1 -1 3 0 ] ] + [ (rmqr) (R11x27) vR11x27 11 27 98 99 122 [ 99 8 99 10 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R11x43) vR11x43 11 43 22 99 249 [ 99 12 99 20 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R11x59) vR11x59 11 59 20 40 376 [ 99 16 99 32 ] [ -1 -1 1 0 -1 -1 1 1 ] ] + [ (rmqr) (R11x77) vR11x77 11 77 26 52 538 [ 99 24 99 44 ] [ -1 -1 1 0 -1 -1 1 1 ] ] + [ (rmqr) (R11x99) vR11x99 11 99 24 50 719 [ 99 32 99 60 ] [ -1 -1 1 1 -1 -1 1 1 ] ] + [ (rmqr) (R11x139) vR11x139 11 139 28 56 1062 [ 99 48 99 90 ] [ -1 -1 2 0 -1 -1 3 0 ] ] + [ (rmqr) (R13x27) vR13x27 13 27 98 99 172 [ 99 9 99 14 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R13x43) vR13x43 13 43 22 99 329 [ 99 14 99 28 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R13x59) vR13x59 13 59 20 40 486 [ 99 22 99 40 ] [ -1 -1 1 0 -1 -1 2 0 ] ] + [ (rmqr) (R13x77) vR13x77 13 77 26 52 684 [ 99 32 99 56 ] [ -1 -1 1 1 -1 -1 1 1 ] ] + [ (rmqr) (R13x99) vR13x99 13 99 24 50 907 [ 99 40 99 78 ] [ -1 -1 1 1 -1 -1 1 2 ] ] + [ (rmqr) (R13x139) vR13x139 13 139 28 56 1328 [ 99 60 99 112 ] [ -1 -1 2 1 -1 -1 2 2 ] ] + [ (rmqr) (R15x43) vR15x43 15 43 22 99 409 [ 99 18 99 36 ] [ -1 -1 1 0 -1 -1 1 1 ] ] + [ (rmqr) (R15x59) vR15x59 15 59 20 40 596 [ 99 26 99 48 ] [ -1 -1 1 0 -1 -1 2 0 ] ] + [ (rmqr) (R15x77) vR15x77 15 77 26 52 830 [ 99 36 99 72 ] [ -1 -1 1 1 -1 -1 2 1 ] ] + [ (rmqr) (R15x99) vR15x99 15 99 24 50 1095 [ 99 48 99 88 ] [ -1 -1 2 0 -1 -1 4 0 ] ] + [ (rmqr) (R15x139) vR15x139 15 139 28 56 1594 [ 99 72 99 130 ] [ -1 -1 2 1 -1 -1 1 4 ] ] + [ (rmqr) (R17x43) vR17x43 17 43 22 99 489 [ 99 22 99 40 ] [ -1 -1 1 0 -1 -1 1 1 ] ] + [ (rmqr) (R17x59) vR17x59 17 59 20 40 706 [ 99 32 99 60 ] [ -1 -1 2 0 -1 -1 2 0 ] ] + [ (rmqr) (R17x77) vR17x77 17 77 26 52 976 [ 99 44 99 84 ] [ -1 -1 2 0 -1 -1 1 2 ] ] + [ (rmqr) (R17x99) vR17x99 17 99 24 50 1283 [ 99 60 99 104 ] [ -1 -1 2 1 -1 -1 4 0 ] ] + [ (rmqr) (R17x139) vR17x139 17 139 28 56 1860 [ 99 80 99 156 ] [ -1 -1 4 0 -1 -1 2 4 ] ] + ] def + /eclval (LMQH) eclevel search pop length exch pop exch pop def + 0 1 metrics length 1 sub { + /i exch def + /m metrics i get def + /frmt m 0 get def % Format of the symbol + /vers m 1 get def % Version of symbol + /vergrp m 2 get def % Version group + /verind i 44 sub def % Version indicator for rMQR format info + /rows m 3 get def % Length of side + /cols m 4 get def % Length of side + /asp2 m 5 get def % Position of second alignment symbol + /asp3 m 6 get def % Position of third alignment symbol + /nmod m 7 get def % Number of modules + /ncws nmod 8 idiv def % Total number of codewords + /rbit nmod 8 mod def % Number of remainder bits + /lc4b false def % Last data codeword is 4 bits long + vers (M1) eq vers (M3) eq or { % Adjustments for M1 and M3 symbols + /ncws ncws 1 add def + /rbit 0 def + /lc4b true def + } if + /ecws m 8 get eclval get def % Number of error correction codewords + /dcws ncws ecws sub def % Number of data codewords + /dmod dcws 8 mul lc4b {4} {0} ifelse sub def % Number of data modules + /ecb1 m 9 get eclval 2 mul get def % First error correction blocks + /ecb2 m 9 get eclval 2 mul 1 add get def % Second error correction blocks + /okay true def + format frmt ne {/okay false def} if % The format must match that supplied + frmt (micro) eq fnc1first and {/okay false def} if % FNC1 mode is only available in full and rmqr + version (unset) ne version vers ne and {/okay false def} if % The version must match that supplied + ecb1 -1 eq ecb2 -1 eq or {/okay false def} if % Error correction level must be valid + /verbits msgbits vergrp get def + verbits -1 eq { % Bitstream must be available + /okay false def + } { + verbits length dmod gt {/okay false def} if % and fit into data modules + } ifelse + /term (000000000) 0 termlens vergrp get getinterval def + okay {exit} if + } for + + okay not { + /bwipp.qrcodeNoValidSymbol (No valid symbol available) //raiseerror exec + } if + + /format frmt def + /version vers def + /msgbits verbits def + /dcpb dcws ecb1 ecb2 add idiv def % Base data codewords per block + /ecpb ncws ecb1 ecb2 add idiv dcpb sub def % Error correction codewords per block + + % Complete the message bits by adding the terminator, truncated if neccessary + /term term 0 dmod msgbits length sub term length 2 copy gt {exch} if pop getinterval def + msgbits length term length add string + dup 0 msgbits putinterval + dup msgbits length term putinterval + /msgbits exch def + + % Expand the message bits by adding padding as necessary + /pad dmod string def + 0 1 pad length 1 sub {pad exch 48 put} for + pad 0 msgbits putinterval + /padstrs [ (11101100) (00010001) ] def + /padnum 0 def + msgbits length 8 div ceiling 8 mul cvi 8 dmod lc4b {5} {1} ifelse sub { + pad exch padstrs padnum get putinterval + /padnum padnum 1 add 2 mod def + } for + + % Evaluate the padded message into codewords + /cws dcws array def + 0 1 cws length 1 sub { + /c exch def + /bpcw 8 def + lc4b c cws length 1 sub eq and {/bpcw 4 def} if + /cwb pad c 8 mul bpcw getinterval def + /cw 0 def + 0 1 bpcw 1 sub { + /i exch def + /cw cw 2 bpcw i sub 1 sub exp cvi cwb i get 48 sub mul add def + } for + cws c cw put + } for + + % Short final data byte in M1 and M3 symbols has high-order value + lc4b {cws cws length 1 sub 2 copy get 4 bitshift put} if + + % Calculate the log and anti-log tables + /rsalog [ 1 255 { dup 2 mul dup 256 ge {285 xor} if } repeat ] def + /rslog 256 array def + 1 1 255 {dup rsalog exch get exch rslog 3 1 roll put} for + + % Function to calculate the product in the field + /rsprod { + 2 copy 0 ne exch 0 ne and { + rslog exch get exch rslog exch get add 255 mod rsalog exch get + } { + pop pop 0 + } ifelse + } bind def + + % Generate the coefficients for the Reed-Solomon algorithm + /coeffs [ 1 ecpb {0} repeat ] def + 0 1 ecpb 1 sub { + /i exch def + coeffs i 1 add coeffs i get put + i -1 1 { + /j exch def + coeffs j coeffs j 1 sub get coeffs j get rsalog i get rsprod xor put + } for + coeffs 0 coeffs 0 get rsalog i get rsprod put + } for + /coeffs coeffs 0 coeffs length 1 sub getinterval def + + % Reed-Solomon algorithm to derive the error correction codewords + /rscodes { + /rscws exch def + /rsnd rscws length def + /rscws [ rscws {} forall ecpb {0} repeat ] def + 0 1 rsnd 1 sub { + /m exch def + /k rscws m get def + 0 1 ecpb 1 sub { + /j exch def + rscws m j add 1 add coeffs ecpb j sub 1 sub get k rsprod rscws m j add 1 add get xor put + } for + } for + rscws rsnd ecpb getinterval + } bind def + + % Divide codewords into two groups of blocks and calculate the error correction codewords + /dcwsb ecb1 ecb2 add array def + /ecwsb ecb1 ecb2 add array def + 0 1 ecb1 1 sub { % First group of blocks has smaller number of data codewords + /i exch def + dcwsb i cws i dcpb mul dcpb getinterval put + ecwsb i dcwsb i get rscodes put + } for + 0 1 ecb2 1 sub { % Second group of blocks has larger number of data codewords + /i exch def + dcwsb ecb1 i add cws ecb1 dcpb mul i dcpb 1 add mul add dcpb 1 add getinterval put + ecwsb ecb1 i add dcwsb ecb1 i add get rscodes put + } for + + % Reassemble the codewords + /cws ncws array def + /cw 0 def + 0 1 dcpb { % Interleave the data codeword blocks + /i exch def + 0 1 ecb1 ecb2 add 1 sub { + /j exch def + i dcwsb j get length lt { % Ignore the end of short blocks + cws cw dcwsb j get i get put + /cw cw 1 add def + } if + } for + } for + 0 1 ecpb 1 sub { % Interleave the error codeword blocks + /i exch def + 0 1 ecb1 ecb2 add 1 sub { + /j exch def + cws cw ecwsb j get i get put + /cw cw 1 add def + } for + } for + + % Extend codewords by one if there are remainder bits + rbit 0 gt { + /pad cws length 1 add array def + pad 0 cws putinterval + pad pad length 1 sub 0 put + /cws pad def + } if + + % Fixups for the short final data byte in M1 and M3 symbols + lc4b { + cws dcws 1 sub 2 copy get -4 bitshift put + dcws 1 sub 1 ncws 2 sub { + /i exch def + cws i cws i get 15 and 4 bitshift put + cws i cws i 1 add get -4 bitshift 15 and cws i get or put + } for + cws ncws 1 sub cws ncws 1 sub get 15 and 4 bitshift put + } if + + % Create the bitmap + /pixs [ rows cols mul {-1} repeat ] def + /qmv {cols mul add} bind def + + % Timing patterns + format (full) eq { + 8 1 cols 9 sub { + /i exch def + pixs i 6 qmv i 1 add 2 mod put + pixs 6 i qmv i 1 add 2 mod put + } for + } if + format (micro) eq { + 8 1 cols 1 sub { + /i exch def + pixs i 0 qmv i 1 add 2 mod put + pixs 0 i qmv i 1 add 2 mod put + } for + } if + format (rmqr) eq { + 3 1 cols 4 sub { % Along top and bottom + /i exch def + pixs i 0 qmv i 1 add 2 mod put + pixs i rows 1 sub qmv i 1 add 2 mod put + } for + 3 1 rows 4 sub { % Along left and right + /i exch def + pixs 0 i qmv i 1 add 2 mod put + pixs cols 1 sub i qmv i 1 add 2 mod put + } for + asp2 1 sub asp3 asp2 sub cols 13 sub { % Down interior + /i exch def + 3 1 rows 4 sub { + /j exch def + pixs i j qmv j 1 add 2 mod put + } for + } for + } if + + % Finder patterns + /fpat [ + [ 1 1 1 1 1 1 1 0 ] + [ 1 0 0 0 0 0 1 0 ] + [ 1 0 1 1 1 0 1 0 ] + [ 1 0 1 1 1 0 1 0 ] + [ 1 0 1 1 1 0 1 0 ] + [ 1 0 0 0 0 0 1 0 ] + [ 1 1 1 1 1 1 1 0 ] + [ 0 0 0 0 0 0 0 0 ] + ] def + /fsubpat [ + [ 1 1 1 1 1 9 9 9 ] + [ 1 0 0 0 1 9 9 9 ] + [ 1 0 1 0 1 9 9 9 ] + [ 1 0 0 0 1 9 9 9 ] + [ 1 1 1 1 1 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + ] def + /fcorpat [ + [ 1 1 1 9 9 9 9 9 ] + [ 1 0 9 9 9 9 9 9 ] + [ 1 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + ] def + /fnullpat [ + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + ] def + /fpats << + % TL TR BL BR + (full) [ fpat fpat fpat fnullpat ] + (micro) [ fpat fnullpat fnullpat fnullpat ] + (rmqr) [ fpat fcorpat fcorpat fsubpat ] + >> format get def + 0 1 7 { + /y exch def + 0 1 7 { + /x exch def + /fpb0 fpats 0 get y get x get def + /fpb1 fpats 1 get y get x get def + /fpb2 fpats 2 get y get x get def + /fpb3 fpats 3 get y get x get def + fpb0 9 ne y rows lt and {pixs x y qmv fpb0 put} if + fpb1 9 ne {pixs cols x sub 1 sub y qmv fpb1 put} if + fpb2 9 ne {pixs x rows y sub 1 sub qmv fpb2 put} if + fpb3 9 ne {pixs cols x sub 1 sub rows y sub 1 sub qmv fpb3 put} if + } for + } for + + % Alignment patterns + /putalgnpat { + /py exch def + /px exch def + 0 1 4 { + /pb exch def + 0 1 4 { + /pa exch def + /algnb algnpat pb get pa get def + algnb 9 ne { + pixs px pa add py pb add qmv algnb put + } if + } for + } for + } bind def + format (full) eq { + /algnpat [ + [ 1 1 1 1 1 ] + [ 1 0 0 0 1 ] + [ 1 0 1 0 1 ] + [ 1 0 0 0 1 ] + [ 1 1 1 1 1 ] + ] def + asp2 2 sub asp3 asp2 sub cols 13 sub { + /i exch def + i 4 putalgnpat + 4 i putalgnpat + } for + asp2 2 sub asp3 asp2 sub cols 9 sub { + /x exch def + asp2 2 sub asp3 asp2 sub rows 9 sub { + /y exch def + x y putalgnpat + } for + } for + } if + format (rmqr) eq { + /algnpat [ + [ 1 1 1 9 9 ] + [ 1 0 1 9 9 ] + [ 1 1 1 9 9 ] + [ 9 9 9 9 9 ] + [ 9 9 9 9 9 ] + ] def + asp2 2 sub asp3 asp2 sub cols 13 sub { + /i exch def + i 0 putalgnpat + i rows 3 sub putalgnpat + } for + } if + + % Format information modules + /formatmap << + (full) [ + [ [ 0 8 ] [ 8 cols 1 sub ] ] [ [ 1 8 ] [ 8 cols 2 sub ] ] [ [ 2 8 ] [ 8 cols 3 sub ] ] + [ [ 3 8 ] [ 8 cols 4 sub ] ] [ [ 4 8 ] [ 8 cols 5 sub ] ] [ [ 5 8 ] [ 8 cols 6 sub ] ] + [ [ 7 8 ] [ 8 cols 7 sub ] ] [ [ 8 8 ] [ cols 8 sub 8 ] ] [ [ 8 7 ] [ cols 7 sub 8 ] ] + [ [ 8 5 ] [ cols 6 sub 8 ] ] [ [ 8 4 ] [ cols 5 sub 8 ] ] [ [ 8 3 ] [ cols 4 sub 8 ] ] + [ [ 8 2 ] [ cols 3 sub 8 ] ] [ [ 8 1 ] [ cols 2 sub 8 ] ] [ [ 8 0 ] [ cols 1 sub 8 ] ] + ] + (micro) [ + [ [ 1 8 ] ] [ [ 2 8 ] ] [ [ 3 8 ] ] [ [ 4 8 ] ] [ [ 5 8 ] ] + [ [ 6 8 ] ] [ [ 7 8 ] ] [ [ 8 8 ] ] [ [ 8 7 ] ] [ [ 8 6 ] ] + [ [ 8 5 ] ] [ [ 8 4 ] ] [ [ 8 3 ] ] [ [ 8 2 ] ] [ [ 8 1 ] ] + ] + (rmqr) [ + [ [ 11 3 ] [ cols 3 sub rows 6 sub ] ] [ [ 11 2 ] [ cols 4 sub rows 6 sub ] ] [ [ 11 1 ] [ cols 5 sub rows 6 sub ] ] + [ [ 10 5 ] [ cols 6 sub rows 2 sub ] ] [ [ 10 4 ] [ cols 6 sub rows 3 sub ] ] [ [ 10 3 ] [ cols 6 sub rows 4 sub ] ] + [ [ 10 2 ] [ cols 6 sub rows 5 sub ] ] [ [ 10 1 ] [ cols 6 sub rows 6 sub ] ] [ [ 9 5 ] [ cols 7 sub rows 2 sub ] ] + [ [ 9 4 ] [ cols 7 sub rows 3 sub ] ] [ [ 9 3 ] [ cols 7 sub rows 4 sub ] ] [ [ 9 2 ] [ cols 7 sub rows 5 sub ] ] + [ [ 9 1 ] [ cols 7 sub rows 6 sub ] ] [ [ 8 5 ] [ cols 8 sub rows 2 sub ] ] [ [ 8 4 ] [ cols 8 sub rows 3 sub ] ] + [ [ 8 3 ] [ cols 8 sub rows 4 sub ] ] [ [ 8 2 ] [ cols 8 sub rows 5 sub ] ] [ [ 8 1 ] [ cols 8 sub rows 6 sub ] ] + ] + >> format get def + formatmap { + { {} forall qmv pixs exch 1 put } forall + } forall + + % Version information modules + format (full) eq cols 45 ge and { + /versionmap [ + [ [ cols 9 sub 5 ] [ 5 cols 9 sub ] ] [ [ cols 10 sub 5 ] [ 5 cols 10 sub ] ] + [ [ cols 11 sub 5 ] [ 5 cols 11 sub ] ] [ [ cols 9 sub 4 ] [ 4 cols 9 sub ] ] + [ [ cols 10 sub 4 ] [ 4 cols 10 sub ] ] [ [ cols 11 sub 4 ] [ 4 cols 11 sub ] ] + [ [ cols 9 sub 3 ] [ 3 cols 9 sub ] ] [ [ cols 10 sub 3 ] [ 3 cols 10 sub ] ] + [ [ cols 11 sub 3 ] [ 3 cols 11 sub ] ] [ [ cols 9 sub 2 ] [ 2 cols 9 sub ] ] + [ [ cols 10 sub 2 ] [ 2 cols 10 sub ] ] [ [ cols 11 sub 2 ] [ 2 cols 11 sub ] ] + [ [ cols 9 sub 1 ] [ 1 cols 9 sub ] ] [ [ cols 10 sub 1 ] [ 1 cols 10 sub ] ] + [ [ cols 11 sub 1 ] [ 1 cols 11 sub ] ] [ [ cols 9 sub 0 ] [ 0 cols 9 sub ] ] + [ [ cols 10 sub 0 ] [ 0 cols 10 sub ] ] [ [ cols 11 sub 0 ] [ 0 cols 11 sub ] ] + ] def + } { + /versionmap [] def + } ifelse + versionmap { + { {} forall qmv pixs exch 0 put } forall + } forall + + % Reserve the solitary dark module in full symbols + format (full) eq { + pixs 8 rows 8 sub qmv 0 put + } if + + % Calculate the mask patterns + /maskfuncs << + (full) [ + {add 2 mod} + {exch pop 2 mod} + {pop 3 mod} + {add 3 mod} + {2 idiv exch 3 idiv add 2 mod} + {mul dup 2 mod exch 3 mod add} + {mul dup 2 mod exch 3 mod add 2 mod} + {2 copy mul 3 mod 3 1 roll add 2 mod add 2 mod} + ] + (micro) [ + {exch pop 2 mod} + {2 idiv exch 3 idiv add 2 mod} + {mul dup 2 mod exch 3 mod add 2 mod} + {2 copy mul 3 mod 3 1 roll add 2 mod add 2 mod} + ] + (rmqr) [ + {2 idiv exch 3 idiv add 2 mod} + ] + >> format get def + mask -1 ne { % User specifies a mask + /maskfuncs [maskfuncs mask 1 sub get] def + /bestmaskval mask 1 sub def + } if + /masks maskfuncs length array def + 0 1 masks length 1 sub { + /m exch def + /mask rows cols mul array def + 0 1 rows 1 sub { + /j exch def + 0 1 cols 1 sub { + /i exch def + i j maskfuncs m get exec 0 eq + pixs i j qmv get -1 eq and {1} {0} ifelse + mask i j qmv 3 -1 roll put + } for + } for + masks m mask put + } for + + % Walk the symbol placing the bitstream + /posx cols format (rmqr) ne {1} {2} ifelse sub def + /posy rows 1 sub def + /dir -1 def % -1 is upwards, 1 is downwards + /col 1 def % 0 is left bit, 1 is right bit + /num 0 def + { % loop + posx 0 lt {exit} if + pixs posx posy qmv get -1 eq { + cws num 8 idiv get 7 num 8 mod sub neg bitshift 1 and + pixs posx posy qmv 3 -1 roll put + /num num 1 add def + } if + col 1 eq { + /col 0 def + /posx posx 1 sub def + } { + /col 1 def + /posx posx 1 add def + /posy posy dir add def + posy 0 lt posy rows ge or { % Turn around at top and bottom + /dir dir -1 mul def + /posy posy dir add def + /posx posx 2 sub def + % Hop over the timing pattern in full size symbols + format (full) eq posx 6 eq and {/posx posx 1 sub def} if + } if + } ifelse + } loop + + % Evaluate runlength encoded rows or columns in full symbols + /evalfulln1n3 { + /scrle exch def + % Detect runs of 5 or more like modules + /scr1 0 scrle { dup 5 ge {add 2 sub dup} if pop } forall def + % Detect 1:1:3:1:1 ratio next to 4 modules of whitespace + /scr3 0 def + 3 2 scrle length 3 sub { % Scan odd (dark) runs within bounds + /j exch def + scrle j get 3 mod 0 eq { % Multiple of 3 black modules + /fact scrle j get 3 idiv def + scrle j 2 sub 5 getinterval {fact eq} forall and exch pop and and { + j 3 eq j 4 add scrle length ge or { % At either extent of run + /scr3 scr3 40 add def + } { % Bounded by dark modules + scrle j 3 sub get 4 ge scrle j 3 add get 4 ge or { + /scr3 scr3 40 add def + } if + } ifelse + } if + } if + } for + scr1 scr3 + } bind def + + % Evaluation algorithm for full symbols + /evalfull { + /sym exch def + + /n1 0 def /n2 0 def /n3 0 def + /rle cols 1 add array def + /lastpairs cols array def + /thispairs cols array def + /colsadd1 cols 1 add def + 0 1 cols 1 sub { + /i exch def + + % Runlength encode (light, dark, light, ...) and evaluate each column + mark 0 0 + i cols dup dup mul 1 sub { + sym exch get exch 1 index eq {exch 1 add exch} {1 exch} ifelse + } for + pop + rle 0 counttomark 2 sub getinterval astore + evalfulln1n3 n3 add /n3 exch def n1 add /n1 exch def + pop + + % Runlength encode (light, dark, light, ...) and evaluate each row + /symrow sym i cols mul cols getinterval def + mark 0 0 + symrow { + exch 1 index eq {exch 1 add exch} {1 exch} ifelse + } forall + pop + rle 0 counttomark 2 sub getinterval astore + evalfulln1n3 n3 add /n3 exch def n1 add /n1 exch def + pop + + % Count and score same coloured blocks + /lastpairs thispairs /thispairs lastpairs def def + symrow 0 get 1 eq {0} {1} ifelse + symrow {exch 1 index add exch} forall + pop + thispairs astore pop + i 0 gt { + mark + lastpairs aload pop thispairs aload pop + n2 cols { exch colsadd1 index add 3 and 0 eq {3 add} if } repeat + /n2 exch def + cleartomark + } if + + } for + + % Score dark/light imbalance + /dark 0 sym {add} forall def + /n4 dark 100 mul cols dup mul div 50 sub abs 5 div cvi 10 mul def + + n1 n2 add n3 add n4 add + } bind def + + % Evaluation algorithm for micro symbols + /evalmicro { + /sym exch def + /dkrhs 0 def /dkbot 0 def + 1 1 cols 1 sub { + /i exch def + /dkrhs dkrhs sym cols 1 sub i qmv get add def + /dkbot dkbot sym i cols 1 sub qmv get add def + } for + dkrhs dkbot le { + dkrhs 16 mul dkbot add neg + } { + dkbot 16 mul dkrhs add neg + } ifelse + } bind def + + % Evaluate the masked symbols to find the most suitable + /bestscore 999999999 def + 0 1 masks length 1 sub { + /m exch def + /masksym rows cols mul array def + 0 1 rows cols mul 1 sub { + /i exch def + masksym i pixs i get masks m get i get xor put + } for + masks length 1 ne { % Not rMQR nor user-specified mask + format (full) eq { + masksym evalfull /score exch def + } { + masksym evalmicro /score exch def + } ifelse + score bestscore lt { + /bestsym masksym def + /bestmaskval m def + /bestscore score def + } if + } { + /bestsym masksym def + } ifelse + } for + /pixs bestsym def + + % Set the solitary dark module in full symbols + format (full) eq { + pixs 8 cols 8 sub qmv 1 put + } if + + % Add the format information + format (full) eq { + /fmtvals [ + 16#5412 16#5125 16#5e7c 16#5b4b 16#45f9 16#40ce 16#4f97 16#4aa0 + 16#77c4 16#72f3 16#7daa 16#789d 16#662f 16#6318 16#6c41 16#6976 + 16#1689 16#13be 16#1ce7 16#19d0 16#0762 16#0255 16#0d0c 16#083b + 16#355f 16#3068 16#3f31 16#3a06 16#24b4 16#2183 16#2eda 16#2bed + ] def + /ecid (MLHQ) eclevel search pop length exch pop exch pop def + /fmtval fmtvals ecid 3 bitshift bestmaskval add get def + 0 1 formatmap length 1 sub { + /i exch def + formatmap i get { + pixs exch aload pop qmv fmtval 14 i sub neg bitshift 1 and put + } forall + } for + } if + format (micro) eq { + /fmtvals [ + 16#4445 16#4172 16#4e2b 16#4b1c 16#55ae 16#5099 16#5fc0 16#5af7 + 16#6793 16#62a4 16#6dfd 16#68ca 16#7678 16#734f 16#7c16 16#7921 + 16#06de 16#03e9 16#0cb0 16#0987 16#1735 16#1202 16#1d5b 16#186c + 16#2508 16#203f 16#2f66 16#2a51 16#34e3 16#31d4 16#3e8d 16#3bba + ] def + /symid [ [0] [1 2] [3 4] [5 6 7] ] cols 11 sub 2 idiv get eclval get def + /fmtval fmtvals symid 2 bitshift bestmaskval add get def + 0 1 formatmap length 1 sub { + /i exch def + pixs formatmap i get 0 get aload pop qmv fmtval 14 i sub neg bitshift 1 and put + } for + } if + format (rmqr) eq { + /fmtvals1 [ + 16#1fab2 16#1e597 16#1dbdd 16#1c4f8 16#1b86c 16#1a749 16#19903 16#18626 + 16#17f0e 16#1602b 16#15e61 16#14144 16#13dd0 16#122f5 16#11cbf 16#1039a + 16#0f1ca 16#0eeef 16#0d0a5 16#0cf80 16#0b314 16#0ac31 16#0927b 16#08d5e + 16#07476 16#06b53 16#05519 16#04a3c 16#036a8 16#0298d 16#017c7 16#008e2 + 16#3f367 16#3ec42 16#3d208 16#3cd2d 16#3b1b9 16#3ae9c 16#390d6 16#38ff3 + 16#376db 16#369fe 16#357b4 16#34891 16#33405 16#32b20 16#3156a 16#30a4f + 16#2f81f 16#2e73a 16#2d970 16#2c655 16#2bac1 16#2a5e4 16#29bae 16#2848b + 16#27da3 16#26286 16#25ccc 16#243e9 16#23f7d 16#22058 16#21e12 16#20137 + ] def + /fmtvals2 [ + 16#20a7b 16#2155e 16#22b14 16#23431 16#248a5 16#25780 16#269ca 16#276ef + 16#28fc7 16#290e2 16#2aea8 16#2b18d 16#2cd19 16#2d23c 16#2ec76 16#2f353 + 16#30103 16#31e26 16#3206c 16#33f49 16#343dd 16#35cf8 16#362b2 16#37d97 + 16#384bf 16#39b9a 16#3a5d0 16#3baf5 16#3c661 16#3d944 16#3e70e 16#3f82b + 16#003ae 16#01c8b 16#022c1 16#03de4 16#04170 16#05e55 16#0601f 16#07f3a + 16#08612 16#09937 16#0a77d 16#0b858 16#0c4cc 16#0dbe9 16#0e5a3 16#0fa86 + 16#108d6 16#117f3 16#129b9 16#1369c 16#14a08 16#1552d 16#16b67 16#17442 + 16#18d6a 16#1924f 16#1ac05 16#1b320 16#1cfb4 16#1d091 16#1eedb 16#1f1fe + ] def + /fmtvalu (MH) eclevel search pop length exch pop exch pop 5 bitshift verind add def + /fmtval1 fmtvals1 fmtvalu get def + /fmtval2 fmtvals2 fmtvalu get def + 0 1 formatmap length 1 sub { + /i exch def + pixs formatmap i get 0 get aload pop qmv fmtval1 17 i sub neg bitshift 1 and put + pixs formatmap i get 1 get aload pop qmv fmtval2 17 i sub neg bitshift 1 and put + } for + } if + + % Add the version information + format (full) eq cols 45 ge and { + /vervals [ + 16#07c94 16#085bc 16#09a99 16#0a4d3 16#0bbf6 16#0c762 16#0d847 + 16#0e60d 16#0f928 16#10b78 16#1145d 16#12a17 16#13532 16#149a6 + 16#15683 16#168c9 16#177ec 16#18ec4 16#191e1 16#1afab 16#1b08e + 16#1cc1a 16#1d33f 16#1ed75 16#1f250 16#209d5 16#216fd 16#228ba + 16#2379f 16#24b0b 16#2542e 16#26a64 16#27541 16#28c69 + ] def + /verval vervals cols 17 sub 4 idiv 7 sub get def + 0 1 versionmap length 1 sub { + /i exch def + versionmap i get { + pixs exch {} forall qmv verval 17 i sub neg bitshift 1 and put + } forall + } for + } if + + % Return the arguments + << + /ren //renmatrix + /pixs pixs + /pixx cols + /pixy rows + /height rows 2 mul 72 div + /width cols 2 mul 72 div + /opt options + >> + + dontdraw not //renmatrix if + + end + +} +[/barcode] {null def} forall +bind def +/qrcode dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource + +%%BeginResource: uk.co.terryburton.bwipp swissqrcode 0.0 2020040100 57786 57647 +%%BeginData: 126 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +1 dict +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +dup /qrcode dup /uk.co.terryburton.bwipp findresource put +begin +/swissqrcode { + + 20 dict begin % Confine variables to local scope + + /options exch def % We are given an option string + /barcode exch def % We are given a barcode string + + /dontdraw false def + + /parse false def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + % Parse ordinals of the form ^NNN to ASCII + parse { + /msg barcode length string def + /j 0 def + barcode + { % loop + (^) search { + dup msg exch j exch putinterval + length j add 1 add /j exch def + pop + dup 0 3 getinterval cvi msg exch j 1 sub exch put + dup length 3 sub 3 exch getinterval + } { + dup msg exch j exch putinterval + length j add /j exch def + /barcode msg 0 j getinterval def + exit + } ifelse + } loop + } if + + /barlen barcode length def + + % Validate the input length + barcode length 997 gt { + /bwipp.swissqrcodeBadLength (Swiss QR Code input must not exceed 997 digits) //raiseerror exec + } if + + % Get the result of encoding with qrcode + options (dontdraw) true put + /args barcode options //qrcode exec def + + args (opt) options put + args + + % The 7mm-wide Swiss Cross is defined by the specification as being an + % overlaid image, i.e. not made out of "modules", so very likely a + % different pitch. It cannot therefore be represented by our standard image + % dictionary and would be a nightmare to gridfit. The application assumes a + % sufficient high-resolution print process that such issues do not matter. + % + % So for now we simply do as we're told and paint over the top of the + % barcode image that has been scaled to 46mm, user be damned! + % + dontdraw not { + + gsave + currentpoint translate + 72 25.4 div dup scale % pt to mm + + % Clipping path with 7mm hole for the Swiss Cross + gsave + newpath + 0 0 moveto + 46 0 lineto + 46 46 lineto + 0 46 lineto + closepath + 19.5 19.5 moveto + 19.5 26.5 lineto + 26.5 26.5 lineto + 26.5 19.5 lineto + closepath + clip + + % Scale the QR Code to fit within 46mm + gsave + 0 0 moveto + 46 args (pixx) get div 2 div dup scale + //renmatrix exec + grestore + + grestore % Clipping + + % Draw Swiss Cross + 19.5 dup translate + 7 83 div dup scale + + newpath + 6 6 moveto + 6 77 lineto + 77 77 lineto + 77 6 lineto + closepath + 49 18 moveto + 49 34 lineto + 65 34 lineto + 65 49 lineto + 49 49 lineto + 49 65 lineto + 34 65 lineto + 34 49 lineto + 18 49 lineto + 18 34 lineto + 34 34 lineto + 34 18 lineto + closepath + 0 0 0 setrgbcolor fill + + grestore + + } if + + end + +} +[/barcode] {null def} forall +bind def +/swissqrcode dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +%%EndProlog +%%Page: 1 1 +gsave +1 1 translate +2 2 scale +0 0 moveto +(SPC +0200 +1 +CH5800791123000889012 +S +Robert Schneider AG +Rue du Lac +1268 +2501 +Biel +CH + + + + + + + +199.95 +CHF +K +Pia-Maria Rutschmann-Schnyder +Grosse Marktgasse 28 +9400 Rorschach + + +CH +SCOR +RF18539007547034 + +EPD) +<> +/swissqrcode /uk.co.terryburton.bwipp findresource exec +grestore +showpage +%%Trailer +%%EOF diff --git a/graphics/pstricks/contrib/pst-barcode/doc/images/ultracode-1.eps b/graphics/pstricks/contrib/pst-barcode/doc/images/ultracode-1.eps new file mode 100644 index 0000000000..cfaff5b792 --- /dev/null +++ b/graphics/pstricks/contrib/pst-barcode/doc/images/ultracode-1.eps @@ -0,0 +1,230 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: 0 0 82 54 +%%Creator: Online Barcode Generator 2017-07-10. https://the-burtons.xyz/barcode-generator/ +%%CreationDate: 2017-10-14 21:44:02 +%%Pages: 1 +%%LanguageLevel: 2 +%%DocumentData: Clean7Bit +%%EndComments +%%BeginProlog +%%BeginResource: Category uk.co.terryburton.bwipp 0.0 2017071000 30005 33214 +%%BeginData: 7 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +P1OerF_-`n01TSk ATDKp 010/i AS5q% H' 6mE 30Ia, !KmJH2 +3Ji?3%mj@F*(i.@ qAV bE+L\ DATVm "@ r#d rB9 KiQP +'&Es@:O(aA79M!@ <ls?E +O HE04A mA@< ls ?E+ OH\<K _S[ F_`U> D_?- +CEcQG7F`MSBDD#C BBlJ$ S4t f93 FCf* 'E d8d <AS,Xo AT D@'Dfp )1A +Wh2!hZ~> +% Category/uk.co.terryburton.bwipp 0.0 2017071000 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp raiseerror 0.0 2017071000 153916 40223 +%%BeginData: 9 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT_ @s)g4 ASuU/ @: O(e DJ()6 Eckq9F +(KH4@:O(eDJ+B\< /:R <23JD %Ea`[ 'A S#n &Df U1I, +\;":DfV")04f0ED fTQ0A oE hrP'A 6`Ec Q) =P! 1O1Ec Q)= DIIBn P!5% +R,\;":DfRL@Df'? "DIeo MP' A6` EcQ) =0 5b? FATDg0 EZ fIEF_- _\P ++mAf%[&V$Ea`['A S#n&D fV" #P% 6 4gC G'+ 8/p (ZFEd; ,: Ecc5;/ n0$ +=E,Zq1AS,XoATD@ 'Dfp) 1AW h2! 3A 5G bFD tYu CM@[!P .H "'F`V, 9E+ +*6lBl7R3P#M~> +% uk.co.terryburton.bwipp/raiseerror 0.0 2017071000 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp renmatrix 0.0 2017071000 108697 107630 +%%BeginData: 87 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT_ @s)g4 ASuU/ @: O(e DJ()6 Eckq9F +(KH4@:O(eDJ+B\< /:R <23Kp PEa`[ 'A S#n &Df V"#0 +6M%_@rEuAATDg:@ Wc^5D f. 1:GA2 #8P1 l( DOp s'bAS u?n FE2)? H\`B +!23JD%@<-"%P!5$ b06_, @FD -I2 Ou"b )A SGd jFGKs\ 1G <3GEas $(D +fUjAF`)83FHSF5@ UWb^B 6%p 5DI d 6qC i=? S"a +^(ATX (k 04Sp:D fT] +'E/k*EDKBB2Ou"b *DJO< 4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1KAnH*qFHWVFAU&<@Bk2=!P,XU#I?IQOAU&<A@;KXjDN4s?AnGjjAo +s2!HS9JPG]\1LDf[%CAU&<@Bk2=!+EV1>FEh_9AohO*Oo^_`Ou%NL<-2\rFEh51BkM=D#]F<eE +bT0"FHSe606CcMFEhbCF!,]MFCf]=G].2+F(KHV!Ko6eP#QO7G]\1=Ch[O"NX'<AF*),.H'1=4 +AU&<@Bk2=!+F'&]Op$+bFCf]=G]7SBL]ESo06CcMFD#$$F!,]MFCf]=GA1T0BTf?:F*)Gc@Yb& +JWKK0&1OYEc06CcMFEqhDF!,R9G]\4LAnH*qF<G[:G][A8@qBP"Oo^@>Oo^_`Ou%2kG]\4>Ch[ +O"NWij#Dg#]T4aSi(AU&<BE,Te?FCf]=H#I;,F(KG9E+sQBOo^@>Oo^_%I?IQOAU&<B@;KXjDN +4p2ASuU$EfrS406CcMFEqhDF!,R9G]\4LAnH*qF<GO:G^1ERAU&<*F(8d!FHWVZ!g5I)!Ko6eP +#QO7G]\1LDf[%CAU&<BE,Tf\CNO-4FD#$$F,0g<F*)Gc$@S(;I?IQm9p.MbOq*X2061WAD..O, +Bm>e#P%64gCG'+8/p(ZFEd;,:Ecc5;/n0$=E,Zq1AS,XoATD@'Dfp)1AWh2!3A5GbFDtYuCM@[ +!P.H"'F`V,9E+*6lBl7R3P#M~> +% uk.co.terryburton.bwipp/renmatrix 0.0 2017071000 +%%EndData +%%EndResource +%%BeginResource: uk.co.terryburton.bwipp ultracode 0.0 2017071000 98628 101468 +%%BeginData: 89 ASCII Lines +currentfile /ASCII85Decode filter cvx exec +06:]HE+*6lBl7RH \pKT_ @s)g4 ASuU/ @: O(e DJ()6 Eckq9F +(KH4@:O(eDJ+B\< /:R <23Kp PEa`[ 'A S#n &Df V"#0 +6M%_@rEuAATDg:@ Wc^5D f. 1:GA2 #8P1 l( DOu P+8AS u?n FE2)? OuP+ +;CG'+8/p(ZFEd;, :Ecc5 ;/n 0$= E,^u oP 'E- !06M)Q Ea `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c3d454333> +/ultracode /uk.co.terryburton.bwipp findresource exec +grestore +showpage +%%Trailer +%%EOF diff --git a/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.ltx b/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.ltx index fc72994578..09146c2824 100644 --- a/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.ltx +++ b/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.ltx @@ -1,12 +1,17 @@ -%% $Id: pst-barcode-doc.ltx 445 2017-04-19 11:13:52Z herbert $ -\documentclass[11pt,english,BCOR=10mm,DIV=14,bibliography=totoc,parskip=false,headings=small, - headinclude=false,footinclude=false,twoside]{pst-doc} -\usepackage[utf8]{inputenc} +%% $Id: pst-barcode-doc.ltx 588 2022-08-23 16:49:51Z herbert $ +\RequirePackage{pdfmanagement-testphase} +\DeclareDocumentMetadata{} + +\documentclass[11pt,english,bibliography=totoc,parskip=false,headings=small, + headinclude=false,footinclude=false,twoside,usegeometry]{pst-doc} \usepackage{pst-barcode,blindtext,multicol} \usepackage{biblatex} +\makeatletter +\def\blx@err@patch#1{} +\makeatother \addbibresource{\jobname.bib} -\geometry{inner=2cm,outer=4cm,marginparwidth=3cm,marginparsep=2mm} +\geometry{inner=2cm,outer=3cm,marginparwidth=2.5cm,marginparsep=2mm} \let\pstBarcodeFV\fileversion \lstset{preset=\centering,pos=l,wide=false,vsep=5mm,language=PSTricks,%width=0.5\linewidth, @@ -25,7 +30,7 @@ \psbarcode{Herbert Voss Freie Universitaet Berlin}{rows=52 columns=52}{datamatrix} \end{pspicture}} -\begin{filecontents*}{demo.tex} +\begin{filecontents*}[force]{demo.tex} \documentclass{article} \usepackage{pst-barcode,fancyvrb} \begin{document} @@ -46,10 +51,10 @@ \title{\texttt{pst-barcode}} \subtitle{A PSTricks package for drawing barcodes; v.\pstBarcodeFV} -\author{Terry Burton \\Herbert Vo\ss} +\author{Terry Burton \\Herbert Voß} %\docauthor{Herbert Vo\ss} \date{\today} -\maketitle +\settitle \tableofcontents @@ -161,7 +166,6 @@ The contents of the external file \texttt{demo.tex}: \VerbatimInput{demo.tex} - \newpage \subsection{Examples for the PostScript options} @@ -303,7 +307,7 @@ bar \end{compactitem} \endgroup -\clearpage +%\clearpage @@ -316,8 +320,9 @@ bar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\clearpage %\newgeometry{inner=2cm,outer=4cm,marginparwidth=3cm,marginparsep=2mm} - +%\textwidth=\dimexpr\textwidth-1cm\relax \section{QR code in the margin} The marginnotes are placed with the help of the macro of the same name \Lcs{marginnote}, diff --git a/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.pdf b/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.pdf Binary files differindex 65587e9135..7762c1e4f5 100644 --- a/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.pdf +++ b/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.pdf diff --git a/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.tex b/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.tex index 8388528281..6c9d4dd877 100644 --- a/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.tex +++ b/graphics/pstricks/contrib/pst-barcode/doc/pst-barcode-doc.tex @@ -1,9 +1,11 @@ -%% $Id: pst-barcode-doc.tex 445 2017-04-19 11:13:52Z herbert $ -\section{Symbology Reference}\label{symbology-reference} +\hypertarget{symbology-reference}{% +\section{Symbology Reference}\label{symbology-reference}} -\subsection{Point of Sale}\label{point-of-sale} +\hypertarget{point-of-sale}{% +\subsection{Point of Sale}\label{point-of-sale}} -\hypertarget{ean-13}{\subsubsection{EAN-13}\label{ean-13}} +\hypertarget{ean-13}{% +\subsubsection{EAN-13}\label{ean-13}} \textbf{EAN-13} is an extension of the \protect\hyperlink{upc-a}{UPC-A} barcode symbology that usually carries a GTIN-13. It was designed by the @@ -11,7 +13,8 @@ International Article Numbering Association in 1976 for identification of retail goods at point of sale outside of the US. Also known as: EAN, UCC-13, European Article Number, International -Article Number, JAN, JAN-13. +Article Number, JAN, JAN-13, IAN, WPC, SAAN, UCCET, ABAC, BCCI, ICA, +MANA, KANC, ANA, ANC. Variants: @@ -47,7 +50,8 @@ Variants: Standards: ISO/IEC 15420, BS EN 797, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options} +\hypertarget{data-and-options}{% +\paragraph{Data and Options}\label{data-and-options}} \begin{itemize} \tightlist @@ -58,8 +62,8 @@ Standards: ISO/IEC 15420, BS EN 797, GS1 General Specifications. add-on is required. \item If twelve digits of primary data are supplied then the check digit is - calculated automatically. Otherwise the provided check digit must be - correct. + calculated automatically. Otherwise the provided check digit will be + verified. \item The \textbf{includetext} option should normally be supplied. \item @@ -67,7 +71,8 @@ Standards: ISO/IEC 15420, BS EN 797, GS1 General Specifications. guard marks. \end{itemize} -\paragraph{Examples}\label{examples} +\hypertarget{examples}{% +\paragraph{Examples}\label{examples}} Identical symbols, input provided with and without a check digit: @@ -95,7 +100,8 @@ Encoder: ean13 \includegraphics{images/ean13-2.eps} -\hypertarget{ean-8}{\subsubsection{EAN-8}\label{ean-8}} +\hypertarget{ean-8}{% +\subsubsection{EAN-8}\label{ean-8}} \textbf{EAN-8} is derived from the \protect\hyperlink{ean-13}{EAN-13} barcode symbology and is designed for small packaging. It usually @@ -127,7 +133,8 @@ Variants: Standards: ISO/IEC 15420, BS EN 797, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-1} +\hypertarget{data-and-options-1}{% +\paragraph{Data and Options}\label{data-and-options-1}} \begin{itemize} \tightlist @@ -138,16 +145,17 @@ Standards: ISO/IEC 15420, BS EN 797, GS1 General Specifications. add-on is required. \item If seven digits of primary data are supplied then the check digit is - calculated automatically. Otherwise the provided check digit must be - correct. + calculated automatically. Otherwise the provided check digit will be + verified. \item The \textbf{includetext} option should normally be supplied. \item - The \textbf{guardwhitespace} option enables the display of white space + The \textbf{guardwhitespace} option enables the display of whitespace guard marks. \end{itemize} -\paragraph{Examples}\label{examples-1} +\hypertarget{examples-1}{% +\paragraph{Examples}\label{examples-1}} Identical symbols, input provided with and without a check digit: @@ -165,7 +173,7 @@ Encoder: ean8 \includegraphics{images/ean8-1.eps} -Truncated with white space guards: +Truncated with whitespace guards: \begin{verbatim} Data: 01335583 @@ -175,7 +183,8 @@ Encoder: ean8 \includegraphics{images/ean8-2.eps} -\hypertarget{upc-a}{\subsubsection{UPC-A}\label{upc-a}} +\hypertarget{upc-a}{% +\subsubsection{UPC-A}\label{upc-a}} The \textbf{UPC-A} barcode symbology is used for identification of retail goods at point of sale inside of the US. It usually carries a @@ -209,7 +218,8 @@ Variants: Standards: ISO/IEC 15420, BS EN 797, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-2} +\hypertarget{data-and-options-2}{% +\paragraph{Data and Options}\label{data-and-options-2}} \begin{itemize} \tightlist @@ -224,13 +234,14 @@ Standards: ISO/IEC 15420, BS EN 797, GS1 General Specifications. symbol. \item If eleven digits of primary data are supplied then the check digit is - calculated automatically. Otherwise the provided check digit must be - correct. + calculated automatically. Otherwise the provided check digit will be + verified. \item The \textbf{includetext} option should normally be supplied. \end{itemize} -\paragraph{Examples}\label{examples-2} +\hypertarget{examples-2}{% +\paragraph{Examples}\label{examples-2}} Identical symbols, input provided with and without a check digit: @@ -258,7 +269,8 @@ Encoder: upca \includegraphics{images/upca-2.eps} -\hypertarget{upc-e}{\subsubsection{UPC-E}\label{upc-e}} +\hypertarget{upc-e}{% +\subsubsection{UPC-E}\label{upc-e}} \textbf{UPC-E} is a compacted form of the \protect\hyperlink{upc-a}{UPC-A} barcode symbology that usually carries @@ -289,7 +301,8 @@ Variants: Standards: ISO/IEC 15420, BS EN 797, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-3} +\hypertarget{data-and-options-3}{% +\paragraph{Data and Options}\label{data-and-options-3}} \begin{itemize} \tightlist @@ -304,13 +317,14 @@ Standards: ISO/IEC 15420, BS EN 797, GS1 General Specifications. symbol, provided that the input can be zero suppressed. \item If seven digits of primary data are supplied then the check digit is - calculated automatically. Otherwise the provided check digit must be - correct. + calculated automatically. Otherwise the provided check digit will be + verified. \item The \textbf{includetext} option should normally be supplied. \end{itemize} -\paragraph{Examples}\label{examples-3} +\hypertarget{examples-3}{% +\paragraph{Examples}\label{examples-3}} Identical symbols, input provided with and without a check digit: @@ -338,7 +352,8 @@ Encoder: upce \includegraphics{images/upce-2.eps} -\hypertarget{isbn}{\subsubsection{ISBN}\label{isbn}} +\hypertarget{isbn}{% +\subsubsection{ISBN}\label{isbn}} An \textbf{ISBN} barcode is a variant of \protect\hyperlink{ean-13}{EAN-13} that is used to identify books. @@ -358,7 +373,8 @@ Variants: Standards: ISO 2108, ISO/IEC 15420, BS EN 797, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-4} +\hypertarget{data-and-options-4}{% +\paragraph{Data and Options}\label{data-and-options-4}} \begin{itemize} \tightlist @@ -371,11 +387,7 @@ Specifications. be automatically upgraded to the ISBN-13 format. \item If the last digit of the primary data is not given then the ISBN check - digit is calculated automatically. -\item - The \textbf{legacy} option prevents ISBN-10 input from being upgraded - to ISBN-13 and will result in a symbol that is obsolete and should not - be used at point of sale. + digit is calculated automatically, otherwise it will be verified. \item The primary data can optionally be followed by a space then two or five digits if an \protect\hyperlink{ean-2}{EAN-2} or @@ -383,7 +395,7 @@ Specifications. \item The \textbf{includetext} option should normally be supplied. \item - The \textbf{guardwhitespace} option enables the display of white space + The \textbf{guardwhitespace} option enables the display of whitespace guard marks. \item The following options are also relevant to this barcode symbology: @@ -391,7 +403,7 @@ Specifications. \begin{itemize} \tightlist \item - \textbf{isbntextfont}: Font name for text above symbol + \textbf{isbntextfont}: PostScript font name for text above symbol \item \textbf{isbntextsize}: Font size for the text above symbol, in points @@ -401,9 +413,14 @@ Specifications. \item \textbf{isbntextyoffset}: Vertical position of ISBN text, in points \end{itemize} +\item + \emph{Deprecated.} The \textbf{legacy} option prevents ISBN-10 input + from being upgraded to ISBN-13 and will result in a symbol that is + obsolete and should not be used at point of sale. \end{itemize} -\paragraph{Example ISBN}\label{example-isbn} +\hypertarget{example-isbn}{% +\paragraph{Example ISBN}\label{example-isbn}} Identical symbols, input provided with and without an ISBN check digit: @@ -448,7 +465,8 @@ Encoder: isbn \includegraphics{images/isbn-3.eps} -\paragraph{Example ISBN-10}\label{example-isbn-10} +\hypertarget{example-isbn-10}{% +\paragraph{Example ISBN-10}\label{example-isbn-10}} Note that ISBN-10 is legacy format not for use at P.O.S. @@ -468,7 +486,8 @@ Encoder: isbn \includegraphics{images/isbn-4.eps} -\hypertarget{ismn}{\subsubsection{ISMN}\label{ismn}} +\hypertarget{ismn}{% +\subsubsection{ISMN}\label{ismn}} An \textbf{ISMN} barcode is a variant of \protect\hyperlink{ean-13}{EAN-13} with a prefix \emph{979} that is used @@ -487,7 +506,8 @@ Variants: Standards: ISO 10957, ISO/IEC 15420, BS EN 797, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-5} +\hypertarget{data-and-options-5}{% +\paragraph{Data and Options}\label{data-and-options-5}} \begin{itemize} \tightlist @@ -499,12 +519,8 @@ Specifications. then eight or nine digits separated appropriately by dash characters \emph{-}. This will be automatically upgraded to the ISMN-13 format. \item - The \textbf{legacy} option prevents ISMN-10 input from being upgraded - to ISMN-13 and will result in a symbol that is obsolete and should not - be used at point of sale. -\item If the last digit of the primary data is not given then the ISMN check - digit is calculated automatically. + digit is calculated automatically, otherwise it will be verified. \item The primary data can optionally be followed by a space then two or five digits if an \protect\hyperlink{ean-2}{EAN-2} or @@ -512,7 +528,7 @@ Specifications. \item The \textbf{includetext} option should normally be supplied. \item - The \textbf{guardwhitespace} option enables the display of white space + The \textbf{guardwhitespace} option enables the display of whitespace guard marks. \item The following options are also relevant to this barcode symbology: @@ -520,7 +536,7 @@ Specifications. \begin{itemize} \tightlist \item - \textbf{ismntextfont}: Font name for text above symbol + \textbf{ismntextfont}: PostScript font name for text above symbol \item \textbf{ismntextsize}: Font size for the text above symbol, in points @@ -530,9 +546,14 @@ Specifications. \item \textbf{ismntextyoffset}: Vertical position of ISMN text, in points \end{itemize} +\item + \emph{Deprecated.} The \textbf{legacy} option prevents ISMN-10 input + from being upgraded to ISMN-13 and will result in a symbol that is + obsolete and should not be used at point of sale. \end{itemize} -\paragraph{Example ISMN}\label{example-ismn} +\hypertarget{example-ismn}{% +\paragraph{Example ISMN}\label{example-ismn}} Identical symbols, input provided with and without an ISMN check digit: @@ -567,7 +588,8 @@ Encoder: ismn \includegraphics{images/ismn-2.eps} -\paragraph{Example ISMN-10}\label{example-ismn-10} +\hypertarget{example-ismn-10}{% +\paragraph{Example ISMN-10}\label{example-ismn-10}} Note that ISMN-10 is a legacy format not for use at P.O.S. @@ -587,7 +609,8 @@ Encoder: ismn \includegraphics{images/ismn-3.eps} -\hypertarget{issn}{\subsubsection{ISSN}\label{issn}} +\hypertarget{issn}{% +\subsubsection{ISSN}\label{issn}} An \textbf{ISSN} barcode is an \protect\hyperlink{ean-13}{EAN-13} with prefix \emph{977} used to identify periodicals. @@ -597,7 +620,8 @@ Also known as: International Standard Serial Number. Standards: ISO 3297, ISO/IEC 15420, BS EN 797, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-6} +\hypertarget{data-and-options-6}{% +\paragraph{Data and Options}\label{data-and-options-6}} \begin{itemize} \tightlist @@ -609,11 +633,11 @@ Specifications. \protect\hyperlink{ean-5}{five-digit add-on} is required. \item If the last digit of the ISSN data is not given then the ISSN check - digit is calculated automatically. + digit is calculated automatically, otherwise it will be verified. \item The \textbf{includetext} option should normally be supplied. \item - The \textbf{guardwhitespace} option enables the display of white space + The \textbf{guardwhitespace} option enables the display of whitespace guard marks. \item The following options are also relevant to this barcode symbology: @@ -621,7 +645,7 @@ Specifications. \begin{itemize} \tightlist \item - \textbf{issntextfont}: Font name for text above symbol + \textbf{issntextfont}: PostScript font name for text above symbol \item \textbf{issntextsize}: Font size for the text above symbol, in points @@ -637,7 +661,8 @@ A sequence variant is a two-digit number that usually starts at zero and is incremented whenever the recommended retail price is amended, where applicable. -\paragraph{Example}\label{example} +\hypertarget{example}{% +\paragraph{Example}\label{example}} Identical symbols, input provided with and without an ISSN check digit and having sequence number \emph{00}: @@ -674,9 +699,11 @@ Encoder: issn \includegraphics{images/issn-2.eps} -\subsection{Two-Dimensional}\label{two-dimensional} +\hypertarget{two-dimensional}{% +\subsection{Two-Dimensional}\label{two-dimensional}} -\hypertarget{aztec-code}{\subsubsection{Aztec Code}\label{aztec-code}} +\hypertarget{aztec-code}{% +\subsubsection{Aztec Code}\label{aztec-code}} \textbf{Aztec Code} is a 2D matrix-style barcode symbology. It can encode full 256-character extended-ASCII. @@ -692,17 +719,32 @@ Variants: Standards: ISO/IEC 24778, ANSI/AIM BC13 - ISS Aztec Code. -\paragraph{Data and Options}\label{data-and-options-7} +\hypertarget{data-and-options-7}{% +\paragraph{Data and Options}\label{data-and-options-7}} \begin{itemize} \tightlist \item - The data field can contain any extended ASCII data. + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. When supported by the receiver characters from other code + pages can be encoded using Extended Channel Interpretation (ECI). \item When the \textbf{parse} option is specified, any instances of \texttt{\^{}NNN} in the data field are replaced with their equivalent ASCII value, useful for specifying unprintable characters. \item + When the \textbf{parsefnc} option is specified, non-data function + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1 + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI999999}: ECI indicators + \end{itemize} +\item The \textbf{eclevel} option is used to specify the percentage of error correction to be applied when expanding the data, by default \texttt{23}. @@ -721,20 +763,21 @@ Standards: ISO/IEC 24778, ANSI/AIM BC13 - ISS Aztec Code. default the encoder will choose the most appropriate format to create a symbol of minimal size. \item - \emph{Deprecated: Use \protect\hyperlink{aztec-runes}{Aztec Runes} - instead. The \textbf{format} option can also be used to create Aztec - Code ``runes'', using \texttt{format=rune}. In this case the rune - symbol number should be given in the data field.} -\item The \textbf{readerinit} option denotes that the symbol is used for programming the barcode reader. \item The \textbf{raw} option denotes that the data field is providing the input as a pre-encoded bitstream suitable for direct low-level encoding. +\item + \emph{Deprecated: Use \protect\hyperlink{aztec-runes}{Aztec Runes} + instead.} The \textbf{format} option can also be used to create Aztec + Code "runes", using \texttt{format=rune}. In this case the rune symbol + number should be given in the data field. \end{itemize} -\paragraph{Examples}\label{examples-4} +\hypertarget{examples-4}{% +\paragraph{Examples}\label{examples-4}} \begin{verbatim} Data: This is Aztec Code @@ -776,8 +819,8 @@ Encoder: azteccode \includegraphics{images/aztec-4.eps} -\hypertarget{aztec-runes}{\subsubsection{Aztec -Runes}\label{aztec-runes}} +\hypertarget{aztec-runes}{% +\subsubsection{Aztec Runes}\label{aztec-runes}} \textbf{Aztec Runes} are a set of small barcode symbols that are used for special applications. @@ -789,7 +832,8 @@ symbology that can encode full 256 character extended-ASCII. Standards: ISO/IEC 24778, ANSI/AIM BC13 - ISS Aztec Code. -\paragraph{Data and Options}\label{data-and-options-8} +\hypertarget{data-and-options-8}{% +\paragraph{Data and Options}\label{data-and-options-8}} \begin{itemize} \tightlist @@ -797,7 +841,8 @@ Standards: ISO/IEC 24778, ANSI/AIM BC13 - ISS Aztec Code. The data field contains the rune number \texttt{0} to \texttt{255}. \end{itemize} -\paragraph{Examples}\label{examples-5} +\hypertarget{examples-5}{% +\paragraph{Examples}\label{examples-5}} \begin{verbatim} Data: 25 @@ -807,85 +852,137 @@ Encoder: aztecrune \includegraphics{images/aztec-3.eps} -\hypertarget{data-matrix}{\subsubsection{Data -Matrix}\label{data-matrix}} +\hypertarget{data-matrix}{% +\subsubsection{Data Matrix}\label{data-matrix}} The \textbf{Data Matrix} symbology is 2D matrix-style barcode that can encode full 256 character extended-ASCII. -Also known as: Data Matrix ECC 200. +Also known as: Data Matrix ECC 200, DataMatrix. Variants: \begin{itemize} \tightlist \item + \protect\hyperlink{data-matrix-rectangular}{Data Matrix Rectangular} + is a variant of Data Matrix that uses rectangular symbols. +\item + \protect\hyperlink{data-matrix-rectangular-extension}{Data Matrix + Rectangular Extension} is a variant of Data Matrix Rectangular that + provides a greater range of symbol dimensions. +\item \protect\hyperlink{gs1-datamatrix}{GS1 DataMatrix} is a variant of Data Matrix that should be used when encoding data that is in \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 Application Identifier standard format}. \item + \protect\hyperlink{gs1-digital-link-data-matrix}{GS1 Digital Link Data + Matrix} is a variant of Data Matrix that should be used when encoding + a GS1 Digital Link URI. +\item \protect\hyperlink{hibc-symbols}{HIBC Data Matrix} is a variant of Data Matrix that should be used when encoding HIBC formatted data. +\item + \protect\hyperlink{mailmark}{Royal Mail Mailmark} is a variant of Data + Matrix that is used by the Royal Mail postal service on letters and + other small mailpieces. \end{itemize} Standards: ISO/IEC 16022, ANSI/AIM BC11 - ISS Data Matrix. -\paragraph{Data and Options}\label{data-and-options-9} +\hypertarget{data-and-options-9}{% +\paragraph{Data and Options}\label{data-and-options-9}} \begin{itemize} \tightlist \item - The data field can contain any extended ASCII data. + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. When supported by the receiver characters from other code + pages can be encoded using Extended Channel Interpretation (ECI). \item When the \textbf{parse} option is specified, any instances of \texttt{\^{}NNN} in the data field are replaced with their equivalent ASCII value. This is useful for specifying unprintable characters. \item When the \textbf{parsefnc} option is specified, non-data function - characters can be specified by \texttt{\^{}FNC1}, \texttt{\^{}PROG}, - \texttt{\^{}MAC5}, \texttt{\^{}MAC6}. + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1. \emph{Recommendation: Use + \protect\hyperlink{gs1-datamatrix}{GS1 DataMatrix} for encoding GS1 + AI syntax data.} + \item + \texttt{\^{}PROG}: PROG - Reader programming + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI999999}: ECI indicators + \end{itemize} \item - The \textbf{format} option is used to specify the shape of the symbol, - either \texttt{square} (default) or \texttt{rectangle}. + Whenever the data field contains suitable input, the encoder will + compress ISO/IEC 15434 structured data (internally using the 05 Macro + and 06 Macro codewords.) \item - The \textbf{dmre} option enable Data Matrix Rectangular Extension with - increases the number of rectangular symbol sizes available. + When the \textbf{dotty} option is specified the modules are rendered + as dots rather than squares. The dot radius can be adjusted using the + \textbf{inkspread} option. \item The \textbf{columns} and \textbf{rows} options are used to specify the size of the symbol. \item The \textbf{version} option can also be used to specify the symbol - size, as \texttt{version=RxC}. Valid options are: + size, as \texttt{version=RxC}. Valid options are \emph{10x10}, + \emph{12x12}, \emph{14x14}, \emph{16x16}, \emph{18x18}, \emph{20x20}, + \emph{22x22}, \emph{24x24}, \emph{26x26}, \emph{32x32}, \emph{36x36}, + \emph{40x40}, \emph{44x44}, \emph{48x48}, \emph{52x52}, \emph{64x64}, + \emph{72x72}, \emph{80x80}, \emph{88x88}, \emph{96x96}, + \emph{104x104}, \emph{120x120}, \emph{132x132}, \emph{144x144} +\item + If \textbf{columns}, \textbf{rows} and \textbf{version} are + unspecified the encoder will default to creating a symbol of the + specified \textbf{format} that is the minimum size to represent the + given data. +\item + The \textbf{raw} option denotes that the data field is providing the + input as pre-encoded codewords in \texttt{\^{}NNN} format, suitable + for direct low-level encoding. +\item + \emph{Deprecated}: The \textbf{format} option is used to specify the + shape of the symbol, either: \begin{itemize} \tightlist \item - With \texttt{format=square}: \emph{10x10}, \emph{12x12}, - \emph{14x14}, \emph{16x16}, \emph{18x18}, \emph{20x20}, - \emph{22x22}, \emph{24x24}, \emph{26x26}, \emph{32x32}, - \emph{36x36}, \emph{40x40}, \emph{44x44}, \emph{48x48}, - \emph{52x52}, \emph{64x64}, \emph{72x72}, \emph{80x80}, - \emph{88x88}, \emph{96x96}, \emph{104x104}, \emph{120x120}, - \emph{132x132}, \emph{144x144} - \item - With \texttt{format=rectangle}: \emph{8x18}, \emph{8x32}, - \emph{12x26}, \emph{12x36}, \emph{16x36}, \emph{16x48} + \texttt{square} (default) \item - With \texttt{format=rectangle} and \texttt{dmre}: \emph{8x18}, - \emph{8x32}, \emph{8x48}, \emph{8x64}, \emph{12x26}, \emph{12x36}, - \emph{12x64}, \emph{16x36}, \emph{16x48}, \emph{16x64}, - \emph{24x32}, \emph{24x36}, \emph{24x48}, \emph{24x64}, - \emph{26x32}, \emph{26x40}, \emph{26x48}, \emph{26x64} + \texttt{rectangle}: Use + \protect\hyperlink{data-matrix-rectangular}{Data Matrix Rectangular} + for rectangular symbols. \end{itemize} \item - If \textbf{columns}, \textbf{rows} and \textbf{version} are - unspecified the encoder will default to creating a symbol of the - specified \textbf{format} that is the minimum size to represent the - given data. + \emph{Deprecated: Use + \protect\hyperlink{data-matrix-rectangular-extension}{Data Matrix + Rectangular Extension}.} The \textbf{dmre} option enables Data Matrix + Rectangular Extension symbols based on the ISO/IEC standard, which + increases the number of rectangular symbol sizes available. +\item + \emph{Deprecated: Use + \protect\hyperlink{data-matrix-rectangular-extension}{Data Matrix + Rectangular Extension} with dimdmre option.} The \textbf{dindmre} + option enables Data Matrix Rectangular Extension symbols based on the + obsolete DIN standard. +\item + \emph{Deprecated: For internal use.} The \textbf{mailmark} option + signifies the requirement to use Mailmark-specific encoding. \end{itemize} -\paragraph{Examples}\label{examples-6} +\hypertarget{examples-6}{% +\paragraph{Examples}\label{examples-6}} + +Identical symbols, automatically sized, the latter showing use of the +parse option: \begin{verbatim} Data: This is Data Matrix @@ -901,6 +998,14 @@ Encoder: datamatrix \includegraphics{images/datamatrix-1.eps} +Identical symbols with a fixed size: + +\begin{verbatim} +Data: Fixed size +Options: version=48x48 +Encoder: datamatrix +\end{verbatim} + \begin{verbatim} Data: Fixed size Options: rows=48 columns=48 @@ -909,6 +1014,8 @@ Encoder: datamatrix \includegraphics{images/datamatrix-2.eps} +A rectangular symbol with a fixed size: + \begin{verbatim} Data: Rectangular Options: format=rectangle version=16x48 @@ -917,7 +1024,230 @@ Encoder: datamatrix \includegraphics{images/datamatrix-3.eps} -\subsubsection{Han Xin Code}\label{han-xin-code} +An advanced use containing "hidden data" in the padding codewords as +used by some non-standard, "high-security" applications. The technique +works by filling the symbol using raw codewords formed from the standard +data immediately followed by the non-standard padding data beginning +with \texttt{\^{}129}: + +\begin{verbatim} +Data: ^066^067^068^142^052^129^161^056^206^101^251^147 +Options: version=16x16 raw +Encoder: datamatrix +\end{verbatim} + +\hypertarget{data-matrix-rectangular}{% +\subsubsection{Data Matrix Rectangular}\label{data-matrix-rectangular}} + +The \textbf{Data Matrix Rectangular} symbology is a rectangular variant +of \protect\hyperlink{data-matrix}{Data Matrix}. + +Variants: + +\begin{itemize} +\tightlist +\item + \protect\hyperlink{data-matrix}{Data Matrix} is the standard square + variant of the symbology. +\item + \protect\hyperlink{data-matrix-rectangular-extension}{Data Matrix + Rectangular Extension} is a variant of Data Matrix Rectangular that + provides a greater range of symbol dimensions. +\end{itemize} + +Standards: ISO/IEC 16022, ANSI/AIM BC11 - ISS Data Matrix. + +\hypertarget{data-and-options-10}{% +\paragraph{Data and Options}\label{data-and-options-10}} + +\begin{itemize} +\tightlist +\item + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. When supported by the receiver characters from other code + pages can be encoded using Extended Channel Interpretation (ECI). +\item + When the \textbf{parse} option is specified, any instances of + \texttt{\^{}NNN} in the data field are replaced with their equivalent + ASCII value. This is useful for specifying unprintable characters. +\item + When the \textbf{parsefnc} option is specified, non-data function + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1. \emph{Recommendation: Use + \protect\hyperlink{gs1-datamatrix}{GS1 DataMatrix} for encoding GS1 + AI syntax data.} + \item + \texttt{\^{}PROG}: PROG - Reader programming + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI999999}: ECI indicators + \end{itemize} +\item + Whenever the data field contains suitable input, the encoder will + compress ISO/IEC 15434 structured data (internally using the 05 Macro + and 06 Macro codewords.) +\item + When the \textbf{dotty} option is specified the modules are rendered + as dots rather than squares. The dot radius can be adjusted using the + \textbf{inkspread} option. +\item + \emph{Deprecated: Use + \protect\hyperlink{data-matrix-rectangular-extension}{Data Matrix + Rectangular Extension}.} The \textbf{dmre} option enables Data Matrix + Rectangular Extension symbols based on the ISO/IEC standard, which + increases the number of rectangular symbol sizes available. +\item + \emph{Deprecated: Standard is obsolete. Use + \protect\hyperlink{data-matrix-rectangular-extension}{Data Matrix + Rectangular Extension} with the dindmre option.} The \textbf{dindmre} + option enables Data Matrix Rectangular Extension symbols based on the + obsolete DIN standard. +\item + The \textbf{columns} and \textbf{rows} options are used to specify the + size of the symbol. +\item + The \textbf{version} option can also be used to specify the symbol + size, as \texttt{version=RxC}. Valid options are \emph{8x18}, + \emph{8x32}, \emph{12x26}, \emph{12x36}, \emph{16x36}, \emph{16x48}. +\item + If \textbf{columns}, \textbf{rows} and \textbf{version} are + unspecified the encoder will default to creating a symbol that is the + minimum size to represent the given data. +\item + The \textbf{raw} option denotes that the data field is providing the + input as pre-encoded codewords in \texttt{\^{}NNN} format, suitable + for direct low-level encoding. +\end{itemize} + +\hypertarget{examples-7}{% +\paragraph{Examples}\label{examples-7}} + +A rectangular symbol with a fixed size: + +\begin{verbatim} +Data: Rectangular +Options: version=16x48 +Encoder: datamatrixrectangular +\end{verbatim} + +\includegraphics{images/datamatrix-3.eps} + +\hypertarget{data-matrix-rectangular-extension}{% +\subsubsection{Data Matrix Rectangular +Extension}\label{data-matrix-rectangular-extension}} + +The \textbf{Data Matrix Rectangular Extension} symbology is an +enhancement to \protect\hyperlink{data-matrix-rectangular}{Data Matrix +Rectangular} that provides a greater range of symbol dimensions. + +Also known as: DMRE. + +Variants: + +\begin{itemize} +\tightlist +\item + \protect\hyperlink{data-matrix}{Data Matrix} is the standard square + variant of the symbology. +\item + \protect\hyperlink{data-matrix-rectangular}{Data Matrix Rectangular} + is the original rectangular variant of Data Matrix that provides a + limited range of symbol dimensions. +\end{itemize} + +Standards: ISO/IEC 21471. + +\hypertarget{data-and-options-11}{% +\paragraph{Data and Options}\label{data-and-options-11}} + +\begin{itemize} +\tightlist +\item + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. When supported by the receiver characters from other code + pages can be encoded using Extended Channel Interpretation (ECI). +\item + When the \textbf{parse} option is specified, any instances of + \texttt{\^{}NNN} in the data field are replaced with their equivalent + ASCII value. This is useful for specifying unprintable characters. +\item + When the \textbf{parsefnc} option is specified, non-data function + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1 + \item + \texttt{\^{}PROG}: PROG - Reader programming + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI999999}: ECI indicators + \end{itemize} +\item + Whenever the data field contains suitable input, the encoder will + compress ISO/IEC 15434 structured data (internally using the 05 Macro + and 06 Macro codewords.) +\item + When the \textbf{dotty} option is specified the modules are rendered + as dots rather than squares. The dot radius can be adjusted using the + \textbf{inkspread} option. +\item + The \textbf{columns} and \textbf{rows} options are used to specify the + size of the symbol. +\item + The \textbf{version} option can also be used to specify the symbol + size, as \texttt{version=RxC}. Valid options are \emph{8x18}, + \emph{8x32}, \emph{8x48}, \emph{8x64}, \emph{8x80}, \emph{8x96}, + \emph{8x120}, \emph{8x144}, \emph{12x26}, \emph{12x36}, \emph{12x64}, + \emph{12x88}, \emph{16x36}, \emph{16x48}, \emph{16x64}, \emph{20x36}, + \emph{20x44}, \emph{20x64}, \emph{22x48}, \emph{24x48}, \emph{24x64}, + \emph{26x40}, \emph{26x48}, \emph{26x64}. +\item + If \textbf{columns}, \textbf{rows} and \textbf{version} are + unspecified the encoder will default to creating a symbol that is the + minimum size to represent the given data. +\item + The \textbf{raw} option denotes that the data field is providing the + input as pre-encoded codewords in \texttt{\^{}NNN} format, suitable + for direct low-level encoding. +\item + \emph{Deprecated: Standard is obsolete.} The \textbf{dindmre} option + select Data Matrix Rectangular Extension symbols whose dimensions are + based on the obsolete DIN standard, rather than the current ISO + standard. + + \begin{itemize} + \tightlist + \item + With \texttt{dindmre} the valid version \textbf{options} are + \emph{8x18}, \emph{8x32}, \emph{8x48}, \emph{8x64}, \emph{12x26}, + \emph{12x36}, \emph{12x64}, \emph{16x36}, \emph{16x48}, + \emph{16x64}, \emph{24x32}, \emph{24x36}, \emph{24x48}, + \emph{24x64}, \emph{26x32}, \emph{26x40}, \emph{26x48}, + \emph{26x64}. + \end{itemize} +\end{itemize} + +\hypertarget{examples-8}{% +\paragraph{Examples}\label{examples-8}} + +A DMRE symbol with a fixed size: + +\begin{verbatim} +Data: 1234 +Options: version=8x80 +Encoder: datamatrixrectangularextension +\end{verbatim} + +\includegraphics{images/datamatrix-4.eps} + +\hypertarget{han-xin-code}{% +\subsubsection{Han Xin Code}\label{han-xin-code}} The \textbf{Han Xin Code} symbology is a 2D matrix-style barcode symbology that can encode full 256 character extended-ASCII. @@ -926,12 +1256,15 @@ Also known as: Chinese Sensible. Standards: GB/T 21049-2007. -\paragraph{Data and Options}\label{data-and-options-10} +\hypertarget{data-and-options-12}{% +\paragraph{Data and Options}\label{data-and-options-12}} \begin{itemize} \tightlist \item - The data field can contain any extended ASCII data. + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. \item When the \textbf{parse} option is specified, any instances of \texttt{\^{}NNN} in the data field are replaced with their equivalent @@ -960,7 +1293,8 @@ Standards: GB/T 21049-2007. correction level. \end{itemize} -\paragraph{Examples}\label{examples-7} +\hypertarget{examples-9}{% +\paragraph{Examples}\label{examples-9}} \begin{verbatim} Data: Han Xin Code @@ -970,7 +1304,8 @@ Encoder: hanxin \includegraphics{images/hanxin-1.eps} -\hypertarget{micropdf417}{\subsubsection{MicroPDF417}\label{micropdf417}} +\hypertarget{micropdf417}{% +\subsubsection{MicroPDF417}\label{micropdf417}} The \textbf{MicroPDF417} barcode symbology is 2D stacked-linear barcode based on \protect\hyperlink{pdf417}{PDF417} that can encode full 256 @@ -990,17 +1325,29 @@ Variants: Standards: ISO/IEC 24728, AIM ISS - MicroPDF417. -\paragraph{Data and Options}\label{data-and-options-11} +\hypertarget{data-and-options-13}{% +\paragraph{Data and Options}\label{data-and-options-13}} \begin{itemize} -\tightlist \item - The data field can contain any extended ASCII data. + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. When supported by the receiver characters from other code + pages can be encoded using Extended Channel Interpretation (ECI). \item When the \textbf{parse} option is specified, any instances of \texttt{\^{}NNN} in the data field are replaced with their equivalent ASCII value, useful for specifying unprintable characters. \item + When the \textbf{parsefnc} option is specified, non-data function + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI811799}: ECI indicators + \end{itemize} +\item The \textbf{columns} and \textbf{rows} options are used to specify the size of the symbol. Valid values are: @@ -1027,29 +1374,34 @@ Standards: ISO/IEC 24728, AIM ISS - MicroPDF417. input as a pre-encoded codewords in \texttt{\^{}NNN} format, suitable for direct low-level encoding. \item - The \textbf{cca} option identifies this symbol as a \emph{CC-A} 2D - component of a \protect\hyperlink{gs1-composite-symbols}{GS1 - Composite} symbol. -\item - The \textbf{ccb} option identifies this symbol as a \emph{CC-B} 2D - component of a \protect\hyperlink{gs1-composite-symbols}{GS1 - Composite} symbol. -\item - Note: Special size rules apply when the \textbf{cca} option is given, - in which case the \textbf{columns} and \textbf{rows} options that are - used to specify the size of the symbol must be one of: + \emph{Deprecated: Internal use.} The \textbf{cca} option identifies + this symbol as a \emph{CC-A} 2D component of a + \protect\hyperlink{gs1-composite-symbols}{GS1 Composite} symbol. \begin{itemize} \tightlist \item - \emph{2x5}, \emph{2x6}, \emph{2x7}, \emph{2x8}, \emph{2x9}, - \emph{2x10}, \emph{2x12}, \emph{3x4}, \emph{3x5}, \emph{3x6}, - \emph{3x7}, \emph{3x8}, \emph{4x3}, \emph{4x4}, \emph{4x5}, - \emph{4x6}, \emph{4x7} + Special size rules apply when the \textbf{cca} option is given, in + which case the \textbf{columns} and \textbf{rows} options that are + used to specify the size of the symbol must be one of: + + \begin{itemize} + \tightlist + \item + \emph{2x5}, \emph{2x6}, \emph{2x7}, \emph{2x8}, \emph{2x9}, + \emph{2x10}, \emph{2x12}, \emph{3x4}, \emph{3x5}, \emph{3x6}, + \emph{3x7}, \emph{3x8}, \emph{4x3}, \emph{4x4}, \emph{4x5}, + \emph{4x6}, \emph{4x7} + \end{itemize} \end{itemize} +\item + \emph{Deprecated: Internal use.} The \textbf{ccb} option identifies + this symbol as a \emph{CC-B} 2D component of a + \protect\hyperlink{gs1-composite-symbols}{GS1 Composite} symbol. \end{itemize} -\paragraph{Examples}\label{examples-8} +\hypertarget{examples-10}{% +\paragraph{Examples}\label{examples-10}} \begin{verbatim} Data: MicroPDF417 @@ -1067,7 +1419,8 @@ Encoder: micropdf417 \includegraphics{images/micropdf417-2.eps} -\hypertarget{pdf417}{\subsubsection{PDF417}\label{pdf417}} +\hypertarget{pdf417}{% +\subsubsection{PDF417}\label{pdf417}} The \textbf{PDF417} barcode symbology is 2D stacked-linear barcode that can encode full 256 character extended-ASCII. @@ -1090,17 +1443,30 @@ Variants: Standards: ISO/IEC 15438, DD ENV 12925, AIM USS - PDF417. -\paragraph{Data and Options}\label{data-and-options-12} +\hypertarget{data-and-options-14}{% +\paragraph{Data and Options}\label{data-and-options-14}} \begin{itemize} \tightlist \item - The data field can contain any extended ASCII data. + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. When supported by the receiver characters from other code + pages can be encoded using Extended Channel Interpretation (ECI). \item When the \textbf{parse} option is specified, any instances of \texttt{\^{}NNN} in the data field are replaced with their equivalent ASCII value, useful for specifying unprintable characters. \item + When the \textbf{parsefnc} option is specified, non-data function + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI811799}: ECI indicators. + \end{itemize} +\item The \textbf{eclevel} option is used to specify the error correction level, from 1 to 5. The default is to choose a standard level of error correction that is determined by the encoded data length. @@ -1117,21 +1483,22 @@ Standards: ISO/IEC 15438, DD ENV 12925, AIM USS - PDF417. The \textbf{rowmult} option is used to specify how tall each bar is, with respect to the minimum module width. The default is 3. \item + The \textbf{raw} option denotes that the data field is providing the + input as a pre-encoded codewords in \texttt{\^{}NNN} format, suitable + for direct low-level encoding. +\item \emph{Deprecated: Use \protect\hyperlink{compact-pdf417}{Compact PDF417} instead. The \textbf{compact} option is used to create a compact/truncated PDF417 symbol that has fewer bars per row that a standard symbol and hence is more narrow.} \item - The \textbf{raw} option denotes that the data field is providing the - input as a pre-encoded codewords in \texttt{\^{}NNN} format, suitable - for direct low-level encoding. -\item - The \textbf{ccc} option identifies this symbol as a \emph{CC-C} 2D - component of a \protect\hyperlink{gs1-composite-symbols}{GS1 - Composite} symbol. + \emph{Deprecated: Internal use.} The \textbf{ccc} option identifies + this symbol as a \emph{CC-C} 2D component of a + \protect\hyperlink{gs1-composite-symbols}{GS1 Composite} symbol. \end{itemize} -\paragraph{Examples}\label{examples-9} +\hypertarget{examples-11}{% +\paragraph{Examples}\label{examples-11}} \begin{verbatim} Data: PDF417 @@ -1165,8 +1532,8 @@ Encoder: pdf417 \includegraphics{images/pdf417-5.eps} -\hypertarget{compact-pdf417}{\subsubsection{Compact -PDF417}\label{compact-pdf417}} +\hypertarget{compact-pdf417}{% +\subsubsection{Compact PDF417}\label{compact-pdf417}} \textbf{Compact PDF417} is a shortened form of the \protect\hyperlink{pdf417}{PDF417} barcode that is used in applications @@ -1191,17 +1558,30 @@ Variants: Standards: ISO/IEC 15438, DD ENV 12925, AIM USS - PDF417. -\paragraph{Data and Options}\label{data-and-options-13} +\hypertarget{data-and-options-15}{% +\paragraph{Data and Options}\label{data-and-options-15}} \begin{itemize} \tightlist \item - The data field can contain any extended ASCII data. + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. When supported by the receiver characters from other code + pages can be encoded using Extended Channel Interpretation (ECI). \item When the \textbf{parse} option is specified, any instances of \texttt{\^{}NNN} in the data field are replaced with their equivalent ASCII value, useful for specifying unprintable characters. \item + When the \textbf{parsefnc} option is specified, non-data function + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI811799}: ECI indicators + \end{itemize} +\item The \textbf{eclevel} option is used to specify the error correction level, from 1 to 5. The default is to choose a standard level of error correction that is determined by the encoded data length. @@ -1223,7 +1603,8 @@ Standards: ISO/IEC 15438, DD ENV 12925, AIM USS - PDF417. for direct low-level encoding. \end{itemize} -\paragraph{Examples}\label{examples-10} +\hypertarget{examples-12}{% +\paragraph{Examples}\label{examples-12}} \begin{verbatim} Data: A truncated PDF417 @@ -1233,7 +1614,8 @@ Encoder: pdf417compact \includegraphics{images/pdf417-3.eps} -\hypertarget{qr-code}{\subsubsection{QR Code}\label{qr-code}} +\hypertarget{qr-code}{% +\subsubsection{QR Code}\label{qr-code}} The \textbf{QR Code} symbology is a 2D matrix-style barcode symbology that can encode full 256 character extended-ASCII. @@ -1253,23 +1635,48 @@ Variants: \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 Application Identifier standard format}. \item + \protect\hyperlink{gs1-digital-link-qr-code}{GS1 Digital Link QR Code} + is a variant of Data Matrix that should be used when encoding a GS1 + Digital Link URI. +\item \protect\hyperlink{hibc-symbols}{HIBC QR Code} is a variant of QR Code that should be used when encoding HIBC formatted data. +\item + \protect\hyperlink{swiss-qr-code}{Swiss QR Code} is a variant of the + QR Code for use with the QR-bill application supporting Swiss + payments. \end{itemize} Standards: ISO/IEC 18004, JIS X 0510, ITS - QR Code, AIM ISS - QR Code. -\paragraph{Data and Options}\label{data-and-options-14} +\hypertarget{data-and-options-16}{% +\paragraph{Data and Options}\label{data-and-options-16}} \begin{itemize} \tightlist \item - The data field can contain any extended ASCII data. + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. When supported by the receiver characters from other code + pages can be encoded using Extended Channel Interpretation (ECI). \item When the \textbf{parse} option is specified, any instances of \texttt{\^{}NNN} in the data field are replaced with their equivalent ASCII value, useful for specifying unprintable characters. \item + When the \textbf{parsefnc} option is specified, non-data function + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1. \emph{Recommendation: Use + \protect\hyperlink{gs1-qr-code}{GS1 QR Code} for encoding GS1 AI + syntax data.} + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI999999}: ECI indicators + \end{itemize} +\item The \textbf{eclevel} option is used to specify the error correction level: @@ -1292,18 +1699,23 @@ Standards: ISO/IEC 18004, JIS X 0510, ITS - QR Code, AIM ISS - QR Code. is the minimum size to represent the given data at the selected error correction level. \item - The \textbf{format} option is used to select between - \texttt{format=full} and \texttt{format=micro} (deprecated) symbol - types. Alternatively, \texttt{format=any} will select the optimal - symbol format for the given data. By default \emph{full} format - symbols will be generated. -\item - Note: It is recommended that the - \protect\hyperlink{micro-qr-code}{Micro QR Code} encoder is used for - such symbols. + \emph{Deprecated}: The \textbf{format} option is used to specify the + symbol type, either: + + \begin{itemize} + \tightlist + \item + \texttt{full} (default) + \item + \texttt{micro}: Use \protect\hyperlink{micro-qr-code}{Micro QR Code} + for Micro QR Code symbols. + \item + \texttt{rmqr}: The standard is still in draft. + \end{itemize} \end{itemize} -\paragraph{Examples}\label{examples-11} +\hypertarget{examples-13}{% +\paragraph{Examples}\label{examples-13}} \begin{verbatim} Data: QR Code @@ -1327,8 +1739,8 @@ Encoder: qrcode \includegraphics{images/qrcode-2.eps} -\hypertarget{micro-qr-code}{\subsubsection{Micro QR -Code}\label{micro-qr-code}} +\hypertarget{micro-qr-code}{% +\subsubsection{Micro QR Code}\label{micro-qr-code}} The \textbf{Micro QR Code} symbology is a smaller variant of \protect\hyperlink{qr-code}{QR Code} that is used in applications that @@ -1347,13 +1759,18 @@ Variants: Standards: ISO/IEC 18004, JIS X 0510, ITS - QR Code, AIM ISS - QR Code. -\paragraph{Data and Options}\label{data-and-options-15} +\hypertarget{data-and-options-17}{% +\paragraph{Data and Options}\label{data-and-options-17}} \begin{itemize} \tightlist \item - The data field can contain any extended ASCII data and will select the - appropriate size symbol to work around the following restrictions: + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. +\item + An appropriate size will be selected to work around the following + restrictions: \begin{itemize} \tightlist @@ -1389,7 +1806,8 @@ Standards: ISO/IEC 18004, JIS X 0510, ITS - QR Code, AIM ISS - QR Code. correction level. \end{itemize} -\paragraph{Examples}\label{examples-12} +\hypertarget{examples-14}{% +\paragraph{Examples}\label{examples-14}} \begin{verbatim} Data: 01234567 @@ -1399,9 +1817,90 @@ Encoder: microqrcode \includegraphics{images/qrcode-5.eps} -\subsection{One-Dimensional}\label{one-dimensional} +\hypertarget{swiss-qr-code}{% +\subsubsection{Swiss QR Code}\label{swiss-qr-code}} + +\textbf{Swiss QR Code} is a variant of the +\protect\hyperlink{qr-code}{QR Code} barcode symbology for use with the +QR-bill application supporting Swiss payments. + +Standards: Swiss Implementation Guidelines QR-bill, ISO/IEC 18004, ITS - +QR Code + +\hypertarget{data-and-options-18}{% +\paragraph{Data and Options}\label{data-and-options-18}} + +\begin{itemize} +\tightlist +\item + The data field input is provided in the format described in the Swiss + Implementation Guidelines QR-bill document. +\item + The \textbf{version} option is used to specify the size of the symbol, + 5 to 25. This is not typically specified. +\item + If the \textbf{version} is unspecified the encoder will default to + creating a symbol that is the minimum size to represent the given data + at the selected error correction level. +\end{itemize} -\hypertarget{code-128}{\subsubsection{Code 128}\label{code-128}} +Note: Swiss QR Code specifies that the image shall be 46mm x 46mm +(excluding quiet zone), irrespective of QR Code version, and is +overlayed with a fixed 7mm x 7mm Swiss Cross pattern. The Swiss Cross +pitch bears no relation to the module width of the QR symbol, so we must +assume that the application provides sufficient resolution throughout +the print process that defects produced by issues such as pixel grazing +are insignificant. Therefore, unlike most other encoders, we do not pick +a fixed module width to assist with grid fitting but rather ensure that +the image is scaled to a fixed size, per the specification. + +\hypertarget{example-1}{% +\paragraph{Example}\label{example-1}} + +\begin{verbatim} +Data: + SPC + 0200 + 1 + CH5800791123000889012 + S + Robert Schneider AG + Rue du Lac + 1268 + 2501 + Biel + CH + + + + + + + + 199.95 + CHF + K + Pia-Maria Rutschmann-Schnyder + Grosse Marktgasse 28 + 9400 Rorschach + + + CH + SCOR + RF18539007547034 + + EPD +Options: +Encoder: swissqrcode +\end{verbatim} + +\includegraphics{images/swissqrcode-1.eps} + +\hypertarget{one-dimensional}{% +\subsection{One-Dimensional}\label{one-dimensional}} + +\hypertarget{code-128}{% +\subsubsection{Code 128}\label{code-128}} \textbf{Code 128} is an arbitrarily long, high-density barcode symbology that can be used to encode full 256 character extended-ASCII. @@ -1424,12 +1923,17 @@ Variants: Standards: ISO/IEC 15417, ANSI/AIM BC4 - ISS Code 128, BS EN 799. -\paragraph{Data and Options}\label{data-and-options-16} +\hypertarget{data-and-options-19}{% +\paragraph{Data and Options}\label{data-and-options-19}} \begin{itemize} \tightlist \item - The input can consist of any extended ASCII data. + The data field input can consist of any extended ASCII data. The + default interpretation of data by readers is in accordance with + ISO/IEC 8859-1. +\item + The mandatory check digit is calculated automatically. \item When the \textbf{parse} option is specified, any instances of \texttt{\^{}NNN} in the data field are replaced with their equivalent @@ -1441,22 +1945,33 @@ Standards: ISO/IEC 15417, ANSI/AIM BC4 - ISS Code 128, BS EN 799. allow the encoding of extended ASCII characters. \item When the \textbf{parsefnc} option is specified, non-data function - characters can be specified by \texttt{\^{}FNC1} through - \texttt{\^{}FNC3}. -\item - When the \textbf{parsefnc} option is specified, the special pseudo - characters \texttt{\^{}LNKA} and \texttt{\^{}LNKC} at the end of the - symbol indicate that a GS1-128 symbol includes a \emph{CC-A/B} or - \emph{CC-C} GS1 composite 2D component. + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1. \emph{Recommendation: Use + \protect\hyperlink{gs1-128}{GS1-128} for encoding GS1 AI syntax + data.} + \item + \texttt{\^{}FNC2}: FNC2 + \item + \texttt{\^{}FNC3}: FNC3 + \end{itemize} \item The \textbf{raw} option denotes that the data field is providing the input as pre-encoded codewords in \texttt{\^{}NNN} format, suitable for direct low-level encoding. \item - The mandatory check digit is calculated automatically. + \emph{Deprecated: For internal use.} When the \textbf{parsefnc} option + is specified, the special pseudo characters \texttt{\^{}LNKA} and + \texttt{\^{}LNKC} at the end of the symbol indicate that a GS1-128 + symbol includes a \emph{CC-A/B} or \emph{CC-C} GS1 composite 2D + component. \end{itemize} -\paragraph{Example}\label{example-1} +\hypertarget{example-2}{% +\paragraph{Example}\label{example-2}} \begin{verbatim} Data: Count0123456789! @@ -1466,7 +1981,8 @@ Encoder: code128 \includegraphics{images/code128-1.eps} -\hypertarget{code-39}{\subsubsection{Code 39}\label{code-39}} +\hypertarget{code-39}{% +\subsubsection{Code 39}\label{code-39}} The \textbf{Code 39} barcode symbology is discrete, variable length and self-checking. @@ -1492,7 +2008,8 @@ Variants: Standards: ISO/IEC 16388, ANSI/AIM BC1 - USS Code 39, BS EN 800, MIL STD 1189. -\paragraph{Data and Options}\label{data-and-options-17} +\hypertarget{data-and-options-20}{% +\paragraph{Data and Options}\label{data-and-options-20}} \begin{itemize} \tightlist @@ -1518,7 +2035,8 @@ Standards: ISO/IEC 16388, ANSI/AIM BC1 - USS Code 39, BS EN 800, MIL STD readable text. \end{itemize} -\paragraph{Examples}\label{examples-13} +\hypertarget{examples-15}{% +\paragraph{Examples}\label{examples-15}} \begin{verbatim} Data: CODE39 @@ -1544,8 +2062,8 @@ Encoder: code39 \includegraphics{images/code39-3.eps} -\hypertarget{code-39-extended}{\subsubsection{Code 39 -Extended}\label{code-39-extended}} +\hypertarget{code-39-extended}{% +\subsubsection{Code 39 Extended}\label{code-39-extended}} The \textbf{Code 39 Extended} barcode symbology is discrete, variable length and self-checking. It is based on @@ -1565,7 +2083,8 @@ Variants: Standards: ISO/IEC 16388, ANSI/AIM BC1 - USS Code 39, BS EN 800. -\paragraph{Data and Options}\label{data-and-options-18} +\hypertarget{data-and-options-21}{% +\paragraph{Data and Options}\label{data-and-options-21}} \begin{itemize} \tightlist @@ -1586,7 +2105,8 @@ Standards: ISO/IEC 16388, ANSI/AIM BC1 - USS Code 39, BS EN 800. readable text. \end{itemize} -\paragraph{Examples}\label{examples-14} +\hypertarget{examples-16}{% +\paragraph{Examples}\label{examples-16}} \begin{verbatim} Data: Code39 Ext! @@ -1604,7 +2124,8 @@ Encoder: code39ext \includegraphics{images/code39ext-2.eps} -\hypertarget{code-93}{\subsubsection{Code 93}\label{code-93}} +\hypertarget{code-93}{% +\subsubsection{Code 93}\label{code-93}} \textbf{Code 93} is a continuous, variable length, self-checking barcode symbology. @@ -1623,7 +2144,8 @@ Variants: Standards: ANSI/AIM BC5 - USS Code 93, ITS 93i. -\paragraph{Data and Options}\label{data-and-options-19} +\hypertarget{data-and-options-22}{% +\paragraph{Data and Options}\label{data-and-options-22}} \begin{itemize} \tightlist @@ -1640,14 +2162,27 @@ Standards: ANSI/AIM BC5 - USS Code 93, ITS 93i. Symbols \texttt{-.\$/+\%*} and \emph{space} \end{itemize} \item - The \textbf{parsefnc} option allows the special shift characters to be - supplied as \texttt{\^{}SFT\$}, \texttt{\^{}SFT\%}, \texttt{\^{}SFT/} - and \texttt{\^{}SFT+}. -\item The \textbf{includecheck} option calculates the two check digits. +\item + \emph{Deprecated: For internal use.} The \textbf{parsefnc} option + allows the special shift characters to be supplied as escape + sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}SFT\$}: (\$) + \item + \texttt{\^{}SFT\%}: (\%) + \item + \texttt{\^{}SFT/}: (/) + \item + \texttt{\^{}SFT+}: (+) + \end{itemize} \end{itemize} -\paragraph{Examples}\label{examples-15} +\hypertarget{examples-17}{% +\paragraph{Examples}\label{examples-17}} \begin{verbatim} Data: CODE93 @@ -1668,8 +2203,8 @@ Encoder: code93 \includegraphics{images/code93-2.eps} -\hypertarget{code-93-extended}{\subsubsection{Code 93 -Extended}\label{code-93-extended}} +\hypertarget{code-93-extended}{% +\subsubsection{Code 93 Extended}\label{code-93-extended}} The \textbf{Code 93 Extended} barcode symbology is continuous, variable length and self-checking. It is based on @@ -1690,7 +2225,8 @@ Variants: Standards: ANSI/AIM BC5 - USS Code 93, ITS 93i. -\paragraph{Data and Options}\label{data-and-options-20} +\hypertarget{data-and-options-23}{% +\paragraph{Data and Options}\label{data-and-options-23}} \begin{itemize} \tightlist @@ -1705,7 +2241,8 @@ Standards: ANSI/AIM BC5 - USS Code 93, ITS 93i. The \textbf{includecheck} option calculates the two check digits. \end{itemize} -\paragraph{Examples}\label{examples-16} +\hypertarget{examples-18}{% +\paragraph{Examples}\label{examples-18}} \begin{verbatim} Data: Code93Ext! @@ -1723,8 +2260,8 @@ Encoder: code93ext \includegraphics{images/code93ext-2.eps} -\hypertarget{interleaved-2-of-5}{\subsubsection{Interleaved 2 of -5}\label{interleaved-2-of-5}} +\hypertarget{interleaved-2-of-5}{% +\subsubsection{Interleaved 2 of 5}\label{interleaved-2-of-5}} \textbf{Interleaved 2 of 5} is a high-density numeric barcode symbology. @@ -1743,23 +2280,25 @@ Variants: Standards: ISO/IEC 16390, ANSI/AIM BC2 - USS Interleaved 2 of 5, BS EN 801. -\paragraph{Data and Options}\label{data-and-options-21} +\hypertarget{data-and-options-24}{% +\paragraph{Data and Options}\label{data-and-options-24}} \begin{itemize} \tightlist \item The data can consist of any number of digits. \item + If the length of the symbol including the possible check digit would + be odd then the data is prefixed by \emph{0}. +\item The \textbf{includecheck} option calculates the check digit. \item The \textbf{includecheckintext} option makes the calculated checksum appear in the human readable text. -\item - If the length of the symbol including the possible check digit would - be odd then the data is prefixed by \emph{0}. \end{itemize} -\paragraph{Examples}\label{examples-17} +\hypertarget{examples-19}{% +\paragraph{Examples}\label{examples-19}} \begin{verbatim} Data: 0123456789 @@ -1777,10 +2316,156 @@ Encoder: interleaved2of5 \includegraphics{images/itf-2.eps} -\subsection{Supply Chain}\label{supply-chain} +\hypertarget{supply-chain}{% +\subsection{Supply Chain}\label{supply-chain}} + +\hypertarget{ean-14}{% +\subsubsection{EAN-14}\label{ean-14}} + +\textbf{EAN-14} is an implementation of the +\protect\hyperlink{gs1-128}{GS1-128} barcode symbology with \emph{AI +(01)} that is used to encode a lone GTIN-14. + +Also known as: UCC-14. + +Standards: ISO/IEC 15417, ANSI/AIM BC4-1999 ISS, BS EN 799, GS1 General +Specifications. + +\hypertarget{data-and-options-25}{% +\paragraph{Data and Options}\label{data-and-options-25}} + +\begin{itemize} +\tightlist +\item + The data field input must be a solitary \emph{AI (01)} with thirteen + or fourteen digits of a GTIN, i.e. \texttt{(01)...}. +\item + Arbitrary spacing may be placed between the digits to format the human + readable text without interfering with the encoded data. +\item + If thirteen digits of primary data are supplied then the check digit + is calculated automatically. Otherwise the provided check digit will + be verified. +\end{itemize} + +\hypertarget{examples-20}{% +\paragraph{Examples}\label{examples-20}} + +Identical symbols, input provided with and without a check digit: + +\begin{verbatim} +Data: (01)04601234567893 +Options: includetext +Encoder: ean14 +\end{verbatim} + +\begin{verbatim} +Data: (01)0460123456789 +Options: includetext +Encoder: ean14 +\end{verbatim} + +\includegraphics{images/ean14-1.eps} + +\hypertarget{itf-14}{% +\subsubsection{ITF-14}\label{itf-14}} + +\textbf{ITF-14} is an implementation of the +\protect\hyperlink{interleaved-2-of-5}{Interleaved 2 of 5} barcode +symbology that is typically used to encode a GTIN-14, GTIN-13 or +GTIN-12. + +Also known as: UPC Shipping Container Symbol, SCS, UPC Case Code. + +Standards: ISO/IEC 16390, ANSI/AIM BC2-1995 USS, BS EN 801, GS1 General +Specifications. + +\hypertarget{data-and-options-26}{% +\paragraph{Data and Options}\label{data-and-options-26}} + +\begin{itemize} +\tightlist +\item + The data consists of either thirteen or fourteen digits. +\item + Arbitrary spacing may be placed between the digits to format the human + readable text without interfering with the encoded data. +\item + If thirteen digits are supplied then the check digit is calculated + automatically. Otherwise the provided check digit will be verified. +\end{itemize} + +\hypertarget{examples-21}{% +\paragraph{Examples}\label{examples-21}} + +Identical symbols, input provided with and without a check digit: + +\begin{verbatim} +Data: 04601234567893 +Options: includetext +Encoder: itf14 +\end{verbatim} -\hypertarget{gs1-datamatrix}{\subsubsection{GS1 -DataMatrix}\label{gs1-datamatrix}} +\begin{verbatim} +Data: 0460123456789 +Options: includetext +Encoder: itf14 +\end{verbatim} + +\includegraphics{images/itf-14-1.eps} + +\hypertarget{sscc-18}{% +\subsubsection{SSCC-18}\label{sscc-18}} + +\textbf{SSCC-18} is an implementation of the +\protect\hyperlink{gs1-128}{GS1-128} barcode symbology with \emph{AI +(00)} that is typically used to encode an eighteen-digit shipping +container serial number. + +Also known as: EAN-18, NVE. + +Standards: ISO/IEC 15417, ANSI/AIM BC4-1999 ISS, BS EN 799, GS1 General +Specifications. + +\hypertarget{data-and-options-27}{% +\paragraph{Data and Options}\label{data-and-options-27}} + +\begin{itemize} +\tightlist +\item + The data field input must be a solitary \emph{AI (00)} with seventeen + or eighteen digits of a Serial Shipping Container Code, i.e. + \texttt{(00)...}. +\item + Arbitrary spacing may be placed between the digits to format the human + readable text without interfering with the encoded data. +\item + If seventeen digits of primary data are supplied then the check digit + is calculated automatically. Otherwise the provided check digit will + be verified. +\end{itemize} + +\hypertarget{example-3}{% +\paragraph{Example}\label{example-3}} + +Identical symbols, input provided with and without a check digit: + +\begin{verbatim} +Data: (00)006141411234567890 +Options: includetext +Encoder: sscc18 +\end{verbatim} + +\begin{verbatim} +Data: (00)00614141123456789 +Options: includetext +Encoder: sscc18 +\end{verbatim} + +\includegraphics{images/sscc18-1.eps} + +\hypertarget{gs1-datamatrix}{% +\subsubsection{GS1 DataMatrix}\label{gs1-datamatrix}} \textbf{GS1 DataMatrix} is an implementation of the \protect\hyperlink{data-matrix}{Data Matrix} (ECC 200) barcode symbology @@ -1789,7 +2474,8 @@ formatted} data. Standards: ISO/IEC 16022, ANSI/AIM BC11 ISS, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-22} +\hypertarget{data-and-options-28}{% +\paragraph{Data and Options}\label{data-and-options-28}} \begin{itemize} \tightlist @@ -1799,6 +2485,13 @@ Standards: ISO/IEC 16022, ANSI/AIM BC11 ISS, GS1 General Specifications. Application Identifier standard format} starting with the mandatory \emph{(01)} Application Identifier. \item + Note that it is not necessary to specify \emph{FNC1} characters since + the encoder will insert these automatically where necessary. +\item + \emph{Deprecated.} The \textbf{dontlint} option disables GS1 + Application Identifier syntax validation allowing images to be + generated for input that does not comply with GS1 standards. +\item The \textbf{format} option is used to specify the shape of the symbol, either \texttt{square} (default) or \texttt{rectangle}. \item @@ -1829,7 +2522,8 @@ Standards: ISO/IEC 16022, ANSI/AIM BC11 ISS, GS1 General Specifications. given data. \end{itemize} -\paragraph{Example}\label{example-2} +\hypertarget{example-4}{% +\paragraph{Example}\label{example-4}} \begin{verbatim} Data: (01)95012345678903(3103)000123 @@ -1839,8 +2533,8 @@ Encoder: gs1datamatrix \includegraphics{images/gs1datamatrix-1.eps} -\hypertarget{gs1-qr-code}{\subsubsection{GS1 QR -Code}\label{gs1-qr-code}} +\hypertarget{gs1-qr-code}{% +\subsubsection{GS1 QR Code}\label{gs1-qr-code}} \textbf{GS1 QR Code} is an implementation of the \protect\hyperlink{qr-code}{QR Code} barcode symbology with @@ -1849,7 +2543,8 @@ formatted data}. Standards: ISO/IEC 18004, ITS - QR Code, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-23} +\hypertarget{data-and-options-29}{% +\paragraph{Data and Options}\label{data-and-options-29}} \begin{itemize} \tightlist @@ -1859,6 +2554,13 @@ Standards: ISO/IEC 18004, ITS - QR Code, GS1 General Specifications. Application Identifier standard format} starting with the mandatory \emph{(01)} and \emph{(8200)} Application Identifiers. \item + Note that it is not necessary to specify \emph{FNC1} characters since + the encoder will insert these automatically where necessary. +\item + \emph{Deprecated.} The \textbf{dontlint} option disables GS1 + Application Identifier syntax validation allowing images to be + generated for input that does not comply with GS1 standards. +\item The \textbf{eclevel} option is used to specify the error correction level: @@ -1882,7 +2584,8 @@ Standards: ISO/IEC 18004, ITS - QR Code, GS1 General Specifications. at the selected error correction level. \end{itemize} -\paragraph{Example}\label{example-3} +\hypertarget{example-5}{% +\paragraph{Example}\label{example-5}} \begin{verbatim} Data: (01)03453120000011(8200)http://www.abc.net @@ -1900,7 +2603,125 @@ Encoder: gs1qrcode \includegraphics{images/gs1qrcode-2.eps} -\hypertarget{gs1-128}{\subsubsection{GS1-128}\label{gs1-128}} +\hypertarget{gs1-digital-link-datamatrix}{% +\subsubsection{GS1 Digital Link +DataMatrix}\label{gs1-digital-link-datamatrix}} + +\textbf{GS1 Digital Link DataMatrix} is an implementation of the +\protect\hyperlink{data-matrix}{Data Matrix} (ECC 200) barcode symbology +containing a GS1 Digital Link URI. + +Standards: ISO/IEC 16022, ANSI/AIM BC11 ISS, GS1 Digital Link Standard: +URI Syntax. + +\hypertarget{data-and-options-30}{% +\paragraph{Data and Options}\label{data-and-options-30}} + +\begin{itemize} +\tightlist +\item + The data field input is provided as a GS1 Digital Link URI. +\item + \emph{Deprecated.} The \textbf{dontlint} option disables GS1 + Application Identifier syntax validation allowing images to be + generated for input that does not comply with GS1 standards. +\item + The \textbf{format} option is used to specify the shape of the symbol, + either \texttt{square} (default) or \texttt{rectangle}. +\item + The \textbf{columns} and \textbf{rows} options are used to specify the + size of the symbol. +\item + The \textbf{version} option can also be used to specify the symbol + size, as \texttt{version=RxC}. Valid options are: + + \begin{itemize} + \tightlist + \item + With \texttt{format=square}: \emph{10x10}, \emph{12x12}, + \emph{14x14}, \emph{16x16}, \emph{18x18}, \emph{20x20}, + \emph{22x22}, \emph{24x24}, \emph{26x26}, \emph{32x32}, + \emph{36x36}, \emph{40x40}, \emph{44x44}, \emph{48x48}, + \emph{52x52}, \emph{64x64}, \emph{72x72}, \emph{80x80}, + \emph{88x88}, \emph{96x96}, \emph{104x104}, \emph{120x120}, + \emph{132x132}, \emph{144x144} + \item + With \texttt{format=rectangle}: \emph{8x18}, \emph{8x32}, + \emph{12x26}, \emph{12x36}, \emph{16x36}, \emph{16x48} + \end{itemize} +\item + If \textbf{columns}, \textbf{rows} and \textbf{version} are + unspecified the encoder will default to creating a symbol of the + specified \textbf{format} that is the minimum size to represent the + given data. +\end{itemize} + +\hypertarget{example-6}{% +\paragraph{Example}\label{example-6}} + +\begin{verbatim} +Data: https://id.gs1.org/01/12312312312333/22/ABC%2d123?99=XYZ%2f987#test +Options: +Encoder: gs1dldatamatrix +\end{verbatim} + +\hypertarget{gs1-qr-digital-link-code}{% +\subsubsection{GS1 QR Digital Link +Code}\label{gs1-qr-digital-link-code}} + +\textbf{GS1 Digital Link QR Code} is an implementation of the +\protect\hyperlink{qr-code}{QR Code} barcode symbology containing a GS1 +Digital Link URI. + +Standards: ISO/IEC 18004, ITS - QR Code, GS1 Digital Link Standard: URI +Syntax. + +\hypertarget{data-and-options-31}{% +\paragraph{Data and Options}\label{data-and-options-31}} + +\begin{itemize} +\tightlist +\item + The data field input is provided as a GS1 Digital Link URI. +\item + \emph{Deprecated.} The \textbf{dontlint} option disables GS1 + Application Identifier syntax validation allowing images to be + generated for input that does not comply with GS1 standards. +\item + The \textbf{eclevel} option is used to specify the error correction + level: + + \begin{itemize} + \tightlist + \item + \texttt{eclevel=L} - Low + \item + \texttt{eclevel=M} - Medium (default) + \item + \texttt{eclevel=Q} - Quality + \item + \texttt{eclevel=H} - High + \end{itemize} +\item + The \textbf{version} option is used to specify the size of the symbol, + 1 to 40. +\item + If the \textbf{version} is unspecified the encoder will default to + creating a symbol that is the minimum size to represent the given data + at the selected error correction level. +\end{itemize} + +\hypertarget{example-7}{% +\paragraph{Example}\label{example-7}} + +\begin{verbatim} +Data: https://id.gs1.org/01/12312312312333/22/ABC%2d123?99=XYZ%2f987#test +Options: +Encoder: gs1dlqrcode +\end{verbatim} + +\hypertarget{gs1-128}{% +\subsubsection{GS1-128}\label{gs1-128}} \textbf{GS1-128} is an implementation of the \protect\hyperlink{code-128}{Code 128} barcode symbology which carries @@ -1919,16 +2740,17 @@ Variants: composite 2D component is required. \item \protect\hyperlink{ean-14}{EAN-14} is a variant of GS1-128 that should - be used when encoding a fourteen-digit GTIN. + be used when encoding a lone fourteen-digit GTIN. \item \protect\hyperlink{sscc-18}{SSCC-18} is a variant of GS1-128 that - should be used when encoding an eighteen-digit SSCC. + should be used when encoding a lone eighteen-digit SSCC. \end{itemize} Standards: ISO/IEC 15417, ANSI/AIM BC4-1999 ISS, BS EN 799, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-24} +\hypertarget{data-and-options-32}{% +\paragraph{Data and Options}\label{data-and-options-32}} \begin{itemize} \tightlist @@ -1937,14 +2759,24 @@ Specifications. \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 Application Identifier standard format}. \item - The \textbf{linkagea} option specifies that the symbol includes a - \emph{CC-A} or \emph{CC-B} GS1 composite 2D component. + Note that it is not necessary to specify \emph{FNC1} characters since + the encoder will insert these automatically where necessary. +\item + \emph{Deprecated.} The \textbf{dontlint} option disables GS1 + Application Identifier syntax validation allowing images to be + generated for input that does not comply with GS1 standards. \item - The \textbf{linkagec} option specifies that the symbol includes a - \emph{CC-C} GS1 composite 2D component. + \emph{Deprecated: For internal use.} The \textbf{linkagea} option + specifies that the symbol includes a \emph{CC-A} or \emph{CC-B} GS1 + composite 2D component. +\item + \emph{Deprecated: For internal use.} The \textbf{linkagec} option + specifies that the symbol includes a \emph{CC-C} GS1 composite 2D + component. \end{itemize} -\paragraph{Examples}\label{examples-18} +\hypertarget{examples-22}{% +\paragraph{Examples}\label{examples-22}} GTIN \emph{95012345678903}; Weight \emph{0.123kg}: @@ -1967,149 +2799,61 @@ Encoder: gs1-128 \includegraphics{images/ean128-2.eps} -\hypertarget{ean-14}{\subsubsection{EAN-14}\label{ean-14}} +\hypertarget{gs1-dotcode}{% +\subsubsection{GS1 DotCode}\label{gs1-dotcode}} -\textbf{EAN-14} is an implementation of the -\protect\hyperlink{gs1-128}{GS1-128} barcode symbology with \emph{AI -(01)} that is typically used to encode a GTIN-14. - -Also known as: UCC-14. +\textbf{GS1 DotCode} is an implementation of the +\protect\hyperlink{dotcode}{DotCode} barcode symbology with +\protect\hyperlink{gs1-application-identifier-standard-format}{GS1 +formatted} data. -Standards: ISO/IEC 15417, ANSI/AIM BC4-1999 ISS, BS EN 799, GS1 General -Specifications. +Standards: AIM - ISS DotCode, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-25} +\hypertarget{data-and-options-33}{% +\paragraph{Data and Options}\label{data-and-options-33}} \begin{itemize} \tightlist \item The data field input is provided in \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 - Application Identifier standard format} and must be a solitary - \emph{AI (01)} with thirteen or fourteen digits of a GTIN, i.e. - \texttt{(01)...}. -\item - Arbitrary spacing may be placed between the digits to format the human - readable text without interfering with the encoded data. -\item - If thirteen digits of primary data are supplied then the check digit - is calculated automatically. Otherwise the provided check digit must - be correct. -\end{itemize} - -\paragraph{Examples}\label{examples-19} - -Identical symbols, input provided with and without a check digit: - -\begin{verbatim} -Data: (01)04601234567893 -Options: includetext -Encoder: ean14 -\end{verbatim} - -\begin{verbatim} -Data: (01)0460123456789 -Options: includetext -Encoder: ean14 -\end{verbatim} - -\includegraphics{images/ean14-1.eps} - -\hypertarget{itf-14}{\subsubsection{ITF-14}\label{itf-14}} - -\textbf{ITF-14} is an implementation of the -\protect\hyperlink{interleaved-2-of-5}{Interleaved 2 of 5} barcode -symbology that is typically used to encode a GTIN-14, GTIN-13 or -GTIN-12. - -Also known as: UPC Shipping Container Symbol, SCS, UPC Case Code. - -Standards: ISO/IEC 16390, ANSI/AIM BC2-1995 USS, BS EN 801, GS1 General -Specifications. - -\paragraph{Data and Options}\label{data-and-options-26} - -\begin{itemize} -\tightlist + Application Identifier standard format}. \item - The data consists of either thirteen or fourteen digits. + Note that it is not necessary to specify \emph{FNC1} characters since + the encoder will insert these automatically where necessary. \item - Arbitrary spacing may be placed between the digits to format the human - readable text without interfering with the encoded data. + \emph{Deprecated.} The \textbf{dontlint} option disables GS1 + Application Identifier syntax validation allowing images to be + generated for input that does not comply with GS1 standards. \item - If thirteen digits are supplied then the check digit is calculated - automatically. Otherwise the provided check digit must be correct. -\end{itemize} - -\paragraph{Examples}\label{examples-20} - -Identical symbols, input provided with and without a check digit: - -\begin{verbatim} -Data: 04601234567893 -Options: includetext -Encoder: itf14 -\end{verbatim} - -\begin{verbatim} -Data: 0460123456789 -Options: includetext -Encoder: itf14 -\end{verbatim} - -\includegraphics{images/itf-14-1.eps} - -\hypertarget{sscc-18}{\subsubsection{SSCC-18}\label{sscc-18}} - -\textbf{SSCC-18} is an implementation of the -\protect\hyperlink{gs1-128}{GS1-128} barcode symbology with \emph{AI -(00)} that is typically used to encode an eighteen-digit shipping -container serial number. - -Also known as: EAN-18, NVE. - -Standards: ISO/IEC 15417, ANSI/AIM BC4-1999 ISS, BS EN 799, GS1 General -Specifications. - -\paragraph{Data and Options}\label{data-and-options-27} - -\begin{itemize} -\tightlist + The \textbf{ratio} is used to specify the aspect ratio of the symbol. + The default is 1.5. \item - The data field input is provided in - \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 - Application Identifier standard format} and must be a solitary - \emph{AI (00)} with seventeen or eighteen digits of a Serial Shipping - Container Code, i.e. \texttt{(00)0...}. -\item - Arbitrary spacing may be placed between the digits to format the human - readable text without interfering with the encoded data. + The \textbf{columns} and \textbf{rows} options are used to specify the + size of the symbol. When these are not specified a symbol is generated + that maintains the selected aspect ratio. \item - The mandatory check digit is calculated automatically and any user - provided check digit is discarded. + \emph{Deprecated: Use only if performance is a concern.} The + \textbf{fast} option is used to enable the optional high-speed symbol + masking algorithm. \end{itemize} -\paragraph{Example}\label{example-4} - -Identical symbols, input provided with and without a check digit: - -\begin{verbatim} -Data: (00)006141411234567890 -Options: includetext -Encoder: sscc18 -\end{verbatim} +\hypertarget{examples-23}{% +\paragraph{Examples}\label{examples-23}} \begin{verbatim} -Data: (00)00614141123456789 -Options: includetext -Encoder: sscc18 +Data: (235)5vBZIF%!<B;?oa%(01)01234567890128(8008)19052001 +Options: rows=16 +Encoder: gs1dotcode \end{verbatim} -\includegraphics{images/sscc18-1.eps} +\includegraphics{images/gs1dotcode-1.eps} -\subsection{GS1 DataBar Family}\label{gs1-databar-family} +\hypertarget{gs1-databar-family}{% +\subsection{GS1 DataBar Family}\label{gs1-databar-family}} -\hypertarget{gs1-databar-omnidirectional}{\subsubsection{GS1 DataBar +\hypertarget{gs1-databar-omnidirectional}{% +\subsubsection{GS1 DataBar Omnidirectional}\label{gs1-databar-omnidirectional}} \textbf{GS1 DataBar Omnidirectional} is a fixed-length, linear barcode @@ -2134,26 +2878,25 @@ Variants: Standards: ISO/IEC 24724, ITS Reduced Space Symbology (RSS), AIM ISS - Reduced Space Symbology (RSS), GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-28} +\hypertarget{data-and-options-34}{% +\paragraph{Data and Options}\label{data-and-options-34}} \begin{itemize} \tightlist \item - The data field input is provided in - \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 - Application Identifier standard format} and must be a solitary - \emph{AI (01)} with thirteen or fourteen digits of a GTIN, i.e. - \texttt{(01)...}. + The data field input is must be a solitary \emph{AI (01)} with + thirteen or fourteen digits of a GTIN, i.e. \texttt{(01)...}. \item If thirteen digits of \emph{AI (01)} data are supplied then the check - digit is calculated automatically, otherwise the digits are encoded as - supplied. + digit is calculated automatically, otherwise the provided check digit + will be verified. \item - The \textbf{linkage} option signifies the presence of a GS1 composite - 2D component. + \emph{Deprecated: For internal use.} The \textbf{linkage} option + signifies the presence of a GS1 composite 2D component. \end{itemize} -\paragraph{Examples}\label{examples-21} +\hypertarget{examples-24}{% +\paragraph{Examples}\label{examples-24}} Identical symbols, input provided with and without a check digit: @@ -2171,8 +2914,8 @@ Encoder: databaromni \includegraphics{images/databaromni-1.eps} -\hypertarget{gs1-databar-stacked-omnidirectional}{\subsubsection{GS1 -DataBar Stacked +\hypertarget{gs1-databar-stacked-omnidirectional}{% +\subsubsection{GS1 DataBar Stacked Omnidirectional}\label{gs1-databar-stacked-omnidirectional}} \textbf{GS1 DataBar Stacked Omnidirectional} is a fixed-length, stacked @@ -2200,26 +2943,25 @@ Variants: Standards: ISO/IEC 24724, ITS Reduced Space Symbology (RSS), AIM ISS - Reduced Space Symbology (RSS), GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-29} +\hypertarget{data-and-options-35}{% +\paragraph{Data and Options}\label{data-and-options-35}} \begin{itemize} \tightlist \item - The data field input is provided in - \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 - Application Identifier standard format} and must be a solitary - \emph{AI (01)} with thirteen or fourteen digits of a GTIN, i.e. - \texttt{(01)...}. + The data field input must be a solitary \emph{AI (01)} with thirteen + or fourteen digits of a GTIN, i.e. \texttt{(01)...}. \item If thirteen digits of \emph{AI (01)} data are supplied then the check - digit is calculated automatically, otherwise the digits are encoded as - supplied. + digit is calculated automatically, otherwise the provided check digit + will be verified. \item - The \textbf{linkage} option signifies the presence of a GS1 composite - 2D component. + \emph{Deprecated: For internal use.} The \textbf{linkage} option + signifies the presence of a GS1 composite 2D component. \end{itemize} -\paragraph{Examples}\label{examples-22} +\hypertarget{examples-25}{% +\paragraph{Examples}\label{examples-25}} Identical symbols, input provided with and without a check digit: @@ -2237,8 +2979,8 @@ Encoder: databarstackedomni \includegraphics{images/databarstackedomni-1.eps} -\hypertarget{gs1-databar-expanded}{\subsubsection{GS1 DataBar -Expanded}\label{gs1-databar-expanded}} +\hypertarget{gs1-databar-expanded}{% +\subsubsection{GS1 DataBar Expanded}\label{gs1-databar-expanded}} \textbf{GS1 DataBar Expanded} is a variable-length, linear barcode symbology that can be used to encode a GTIN-14 alongside a number of @@ -2258,12 +3000,17 @@ Variants: \protect\hyperlink{gs1-composite-symbols}{GS1 DataBar Expanded Composite} is a variant of GS1 DataBar Expanded that should be used when a CC-A or CC-B GS1 composite 2D component is required. +\item + \protect\hyperlink{gs1-north-american-coupon-code}{GS1 North American + Coupon Code} is an applicaiton of GS1 DataBar Expanded for use with a + paperless coupon system. \end{itemize} Standards: ISO/IEC 24724, ITS Reduced Space Symbology (RSS), AIM ISS - Reduced Space Symbology (RSS), GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-30} +\hypertarget{data-and-options-36}{% +\paragraph{Data and Options}\label{data-and-options-36}} \begin{itemize} \tightlist @@ -2272,6 +3019,13 @@ Reduced Space Symbology (RSS), GS1 General Specifications. \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 Application Identifier standard format}. \item + Note that it is not necessary to specify \emph{FNC1} characters since + the encoder will insert these automatically where necessary. +\item + \emph{Deprecated.} The \textbf{dontlint} option disables GS1 + Application Identifier syntax validation allowing images to be + generated for input that does not comply with GS1 standards. +\item If the data contains a number of application identifiers matching any of the specifications below then they should be provided in this given order for maximum encoding efficiency: @@ -2296,11 +3050,12 @@ Reduced Space Symbology (RSS), GS1 General Specifications. \texttt{(01)...} \end{itemize} \item - The \textbf{linkage} option signifies the presence of a GS1 composite - 2D component. + \emph{Deprecated: For internal use.} The \textbf{linkage} option + signifies the presence of a GS1 composite 2D component. \end{itemize} -\paragraph{Examples}\label{examples-23} +\hypertarget{examples-26}{% +\paragraph{Examples}\label{examples-26}} \begin{verbatim} Data: (01)95012345678903(3103)000123 @@ -2310,8 +3065,9 @@ Encoder: databarexpanded \includegraphics{images/databarexpanded-1.eps} -\hypertarget{gs1-databar-expanded-stacked}{\subsubsection{GS1 DataBar -Expanded Stacked}\label{gs1-databar-expanded-stacked}} +\hypertarget{gs1-databar-expanded-stacked}{% +\subsubsection{GS1 DataBar Expanded +Stacked}\label{gs1-databar-expanded-stacked}} \textbf{GS1 DataBar Expanded Stacked} is a variable-length, stacked-linear barcode symbology that can be used to encode a GTIN-14 @@ -2332,12 +3088,17 @@ Variants: \protect\hyperlink{gs1-composite-symbols}{GS1 DataBar Expanded Stacked Composite} is a variant of GS1 DataBar Expanded Stacked that should be used when a CC-A or CC-B GS1 composite 2D component is required. +\item + \protect\hyperlink{gs1-north-american-coupon-code}{GS1 North American + Coupon Code} is an applicaiton of GS1 DataBar Expanded for use with a + paperless coupon system. \end{itemize} Standards: ISO/IEC 24724, ITS Reduced Space Symbology (RSS), AIM ISS - Reduced Space Symbology (RSS), GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-31} +\hypertarget{data-and-options-37}{% +\paragraph{Data and Options}\label{data-and-options-37}} \begin{itemize} \tightlist @@ -2346,6 +3107,13 @@ Reduced Space Symbology (RSS), GS1 General Specifications. \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 Application Identifier standard format}. \item + Note that it is not necessary to specify \emph{FNC1} characters since + the encoder will insert these automatically where necessary. +\item + \emph{Deprecated.} The \textbf{dontlint} option disables GS1 + Application Identifier syntax validation allowing images to be + generated for input that does not comply with GS1 standards. +\item If the data contains a number of application identifiers matching any of the specifications below then they should be provided in this given order for maximum encoding efficiency: @@ -2374,11 +3142,12 @@ Reduced Space Symbology (RSS), GS1 General Specifications. segments per row which must be an even number. The default is \emph{4}. \item - The \textbf{linkage} option signifies the presence of a GS1 composite - 2D component. + \emph{Deprecated: For internal use.} The \textbf{linkage} option + signifies the presence of a GS1 composite 2D component. \end{itemize} -\paragraph{Examples}\label{examples-24} +\hypertarget{examples-27}{% +\paragraph{Examples}\label{examples-27}} \begin{verbatim} Data: (01)95012345678903(3103)000123 @@ -2388,8 +3157,8 @@ Encoder: databarexpandedstacked \includegraphics{images/databarexpandedstacked-1.eps} -\hypertarget{gs1-databar-truncated}{\subsubsection{GS1 DataBar -Truncated}\label{gs1-databar-truncated}} +\hypertarget{gs1-databar-truncated}{% +\subsubsection{GS1 DataBar Truncated}\label{gs1-databar-truncated}} \textbf{GS1 DataBar Truncated} is a fixed-length, linear barcode symbology that can be used to encode a GTIN-14 for in-house @@ -2414,25 +3183,25 @@ Variants: Standards: ISO/IEC 24724, ITS Reduced Space Symbology (RSS), AIM ISS - Reduced Space Symbology (RSS), GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-32} +\hypertarget{data-and-options-38}{% +\paragraph{Data and Options}\label{data-and-options-38}} \begin{itemize} \tightlist \item - The data field input is provided in - \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 - Application Identifier standard format} and must be a solitary - \emph{AI (01)} with 13 or 14 digits of a GTIN, i.e. \texttt{(01)...}. + The data field input must be a solitary \emph{AI (01)} with 13 or 14 + digits of a GTIN, i.e. \texttt{(01)...}. \item If thirteen digits of \emph{AI (01)} data are supplied then the check - digit is calculated automatically, otherwise the digits are encoded as - supplied. + digit is calculated automatically, otherwise the provided check digit + will be verified. \item - The \textbf{linkage} option signifies the presence of a GS1 composite - 2D component. + \emph{Deprecated: For internal use.} The \textbf{linkage} option + signifies the presence of a GS1 composite 2D component. \end{itemize} -\paragraph{Examples}\label{examples-25} +\hypertarget{examples-28}{% +\paragraph{Examples}\label{examples-28}} Identical symbols, input provided with and without a check digit: @@ -2450,8 +3219,8 @@ Encoder: databartruncated \includegraphics{images/databartruncated-1.eps} -\hypertarget{gs1-databar-stacked}{\subsubsection{GS1 DataBar -Stacked}\label{gs1-databar-stacked}} +\hypertarget{gs1-databar-stacked}{% +\subsubsection{GS1 DataBar Stacked}\label{gs1-databar-stacked}} \textbf{GS1 DataBar Stacked} is a fixed-length, stacked linear barcode symbology that can be used to encode a GTIN-14 for in-house @@ -2476,26 +3245,25 @@ Variants: Standards: ISO/IEC 24724, ITS Reduced Space Symbology (RSS), AIM ISS - Reduced Space Symbology (RSS), GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-33} +\hypertarget{data-and-options-39}{% +\paragraph{Data and Options}\label{data-and-options-39}} \begin{itemize} \tightlist \item - The data field input is provided in - \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 - Application Identifier standard format} and must be a solitary - \emph{AI (01)} with thirteen or fourteen digits of a GTIN, i.e. - \texttt{(01)...}. + The data field input must be a solitary \emph{AI (01)} with thirteen + or fourteen digits of a GTIN, i.e. \texttt{(01)...}. \item If thirteen digits of \emph{AI (01)} data are supplied then the check - digit is calculated automatically, otherwise the digits are encoded as - supplied. + digit is calculated automatically, otherwise the provided check digit + will be verified. \item - The \textbf{linkage} option signifies the presence of a GS1 composite - 2D component. + \emph{Deprecated: For internal use.} The \textbf{linkage} option + signifies the presence of a GS1 composite 2D component. \end{itemize} -\paragraph{Examples}\label{examples-26} +\hypertarget{examples-29}{% +\paragraph{Examples}\label{examples-29}} Identical symbols, input provided with and without a check digit: @@ -2513,8 +3281,8 @@ Encoder: databarstacked \includegraphics{images/databarstacked-1.eps} -\hypertarget{gs1-databar-limited}{\subsubsection{GS1 DataBar -Limited}\label{gs1-databar-limited}} +\hypertarget{gs1-databar-limited}{% +\subsubsection{GS1 DataBar Limited}\label{gs1-databar-limited}} \textbf{GS1 DataBar Limited} is fixed-length, linear barcode symbology that can be used to encode a GTIN-14 beginning with \emph{0} or \emph{1} @@ -2535,27 +3303,26 @@ Variants: Standards: ISO/IEC 24724, ITS Reduced Space Symbology (RSS), AIM ISS - Reduced Space Symbology (RSS), GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-34} +\hypertarget{data-and-options-40}{% +\paragraph{Data and Options}\label{data-and-options-40}} \begin{itemize} \tightlist \item - The data field input is provided in - \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 - Application Identifier standard format} and must be a solitary - \emph{AI (01)} with thirteen or fourteen digits of a GTIN starting - with \emph{0} or \emph{1}, i.e. \texttt{(01)0...} or - \texttt{(01)1...}. + The data field input must be a solitary \emph{AI (01)} with thirteen + or fourteen digits of a GTIN starting with \emph{0} or \emph{1}, i.e. + \texttt{(01)0...} or \texttt{(01)1...}. \item If thirteen digits of \emph{AI (01)} data are supplied then the check - digit is calculated automatically, otherwise the digits are encoded as - supplied. + digit is calculated automatically, otherwise the provided check digit + will be verified. \item - The \textbf{linkage} option signifies the presence of a GS1 composite - 2D component. + \emph{Deprecated: For internal use.} The \textbf{linkage} option + signifies the presence of a GS1 composite 2D component. \end{itemize} -\paragraph{Examples}\label{examples-27} +\hypertarget{examples-30}{% +\paragraph{Examples}\label{examples-30}} Identical symbols, input provided with and without a check digit: @@ -2573,15 +3340,59 @@ Encoder: databarlimited \includegraphics{images/databarlimited-1.eps} -\subsection{Postal Symbols}\label{postal-symbols} +\hypertarget{gs1-north-american-coupon-code}{% +\subsubsection{GS1 North American Coupon +Code}\label{gs1-north-american-coupon-code}} + +\textbf{GS1 North American Coupon Code} is an implementation of the +\protect\hyperlink{gs1-databar-expanded}{GS1 DataBar Expanded} barcode +symbology with AI (8110) that is used as a paperless coupon system at +point of sale. + +Also known as: GS1 DataBar Coupon, U.S. Coupon Code. + +Standards: North American Coupon Application Guideline Using GS1 DataBar +Expanded Symbols, ISO/IEC 24724, GS1 General Specifications. + +\hypertarget{data-and-options-41}{% +\paragraph{Data and Options}\label{data-and-options-41}} + +\begin{itemize} +\tightlist +\item + The data field input is provided in + \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 + Application Identifier standard format} and must be a solitary AI + (8110). +\item + The \textbf{segments} option is used to specify the maximum number of + segments per row which must be an even number. The default is + \emph{4}. +\end{itemize} + +\hypertarget{examples-31}{% +\paragraph{Examples}\label{examples-31}} + +\begin{verbatim} +Data: (8110)106141416543213500110000310123196000 +Options: includetext segments=8 +Encoder: gs1northamericancoupon +\end{verbatim} + +\includegraphics{images/gs1northamericancoupon-1.eps} + +\hypertarget{postal-symbols}{% +\subsection{Postal Symbols}\label{postal-symbols}} +\hypertarget{australia-post-4-state-customer-code}{% \subsubsection{Australia Post 4 State Customer -Code}\label{australia-post-4-state-customer-code} +Code}\label{australia-post-4-state-customer-code}} The \textbf{Australia Post 4 State Customer Code} is a barcode used by the Australian Postal Service to encode the data on letter mail. -\paragraph{Data and Options}\label{data-and-options-35} +\hypertarget{data-and-options-42}{% +\paragraph{Data and Options}\label{data-and-options-42}} \begin{itemize} \tightlist @@ -2607,20 +3418,23 @@ the Australian Postal Service to encode the data on letter mail. Otherwise the customer information field is encoded using the default character encoding, \texttt{custinfoenc=character}, which permits any of the following characters: - \item - Upper case letters \texttt{A-Z} - \item - Lower case letters \texttt{a-z} - \item - Digits \texttt{0-9} - \item - Symbols \texttt{space} and \texttt{\#} + + \begin{itemize} + \tightlist + \item + Upper case letters \texttt{A-Z} + \item + Lower case letters \texttt{a-z} + \item + Digits \texttt{0-9} + \item + Symbols \texttt{space} and \texttt{\#} + \end{itemize} \end{itemize} -\item - The maditory Reed-Solomon check bars are calculated automatically. \end{itemize} -\paragraph{Examples}\label{examples-28} +\hypertarget{examples-32}{% +\paragraph{Examples}\label{examples-32}} FCC 62 symbol with character customer data: @@ -2642,7 +3456,8 @@ Encoder: auspost \includegraphics{images/auspost-2.eps} -\subsubsection{Deutsche Post Identcode}\label{deutsche-post-identcode} +\hypertarget{deutsche-post-identcode}{% +\subsubsection{Deutsche Post Identcode}\label{deutsche-post-identcode}} \textbf{Deutsche Post Identcode} is an implementation of the \protect\hyperlink{interleaved-2-of-5}{Interleaved 2 of 5} barcode @@ -2650,7 +3465,8 @@ symbology that is used by German Post for mail routing. Also known as: DHL Identcode. -\paragraph{Data and Options}\label{data-and-options-36} +\hypertarget{data-and-options-43}{% +\paragraph{Data and Options}\label{data-and-options-43}} \begin{itemize} \tightlist @@ -2671,10 +3487,11 @@ Also known as: DHL Identcode. \end{itemize} \item If eleven digits are supplied then the check digit is calculated - automatically. Otherwise the provided check digit must be correct. + automatically. Otherwise the provided check digit will be verified. \end{itemize} -\paragraph{Example}\label{example-5} +\hypertarget{example-8}{% +\paragraph{Example}\label{example-8}} Identical symbols, input provided with an without a check digit: @@ -2692,7 +3509,8 @@ Encoder: identcode \includegraphics{images/identcode-1.eps} -\subsubsection{Deutsche Post Leitcode}\label{deutsche-post-leitcode} +\hypertarget{deutsche-post-leitcode}{% +\subsubsection{Deutsche Post Leitcode}\label{deutsche-post-leitcode}} The \textbf{Deutsche Post Leitcode} barcode symbology is an implementation of the \protect\hyperlink{interleaved-2-of-5}{Interleaved @@ -2700,7 +3518,8 @@ implementation of the \protect\hyperlink{interleaved-2-of-5}{Interleaved Also known as: DHL Leitcode. -\paragraph{Data and Options}\label{data-and-options-37} +\hypertarget{data-and-options-44}{% +\paragraph{Data and Options}\label{data-and-options-44}} \begin{itemize} \tightlist @@ -2723,10 +3542,11 @@ Also known as: DHL Leitcode. \end{itemize} \item If thirteen digits are supplied then the check digit is calculated - automatically. Otherwise the provided check digit must be correct. + automatically. Otherwise the provided check digit will be verified. \end{itemize} -\paragraph{Examples}\label{examples-29} +\hypertarget{examples-33}{% +\paragraph{Examples}\label{examples-33}} Identical symbols, input provided with and without a check digit: @@ -2744,13 +3564,15 @@ Encoder: leitcode \includegraphics{images/leitcode-1.eps} +\hypertarget{japan-post-4-state-barcode}{% \subsubsection{Japan Post 4 State -Barcode}\label{japan-post-4-state-barcode} +Barcode}\label{japan-post-4-state-barcode}} The \textbf{Japan Post 4 state barcode} symbology is used by the Japan Post service to encode the delivery point identifier on letter mail. -\paragraph{Data and Options}\label{data-and-options-38} +\hypertarget{data-and-options-45}{% +\paragraph{Data and Options}\label{data-and-options-45}} \begin{itemize} \tightlist @@ -2768,7 +3590,8 @@ Post service to encode the delivery point identifier on letter mail. \end{itemize} \end{itemize} -\paragraph{Example}\label{example-6} +\hypertarget{example-9}{% +\paragraph{Example}\label{example-9}} \begin{verbatim} Data: 6540123789-A-K-Z @@ -2778,17 +3601,19 @@ Encoder: japanpost \includegraphics{images/japanpost-1.eps} -\subsubsection{MaxiCode}\label{maxicode} +\hypertarget{maxicode}{% +\subsubsection{MaxiCode}\label{maxicode}} The \textbf{MaxiCode} barcode symbology is a 2D barcode based on a hexagonal matrix surrounding a bulls eye pattern. It can encode a structured carrier message and full 256 character extended-ASCII. -Also known as: UPS Code, Code 6. +Also known as: UPS Code, Code 6, Dense Code. Standards: ISO/IEC 16023, ANSI/AIM BC10 - ISS MaxiCode. -\paragraph{Data and Options}\label{data-and-options-39} +\hypertarget{data-and-options-46}{% +\paragraph{Data and Options}\label{data-and-options-46}} \begin{itemize} \tightlist @@ -2805,9 +3630,11 @@ Standards: ISO/IEC 16023, ANSI/AIM BC10 - ISS MaxiCode. \texttt{mode=3} - Formatted data containing a Structured Carrier Message with an alphanumeric (international) postal code. \item - \texttt{mode=4} - Unstructured data using standard error correction. + \texttt{mode=4} - Unstructured extended ASCII data using standard + error correction. \item - \texttt{mode=5} - Unstructured data using enhanced error correction. + \texttt{mode=5} - Unstructured extended ASCII data using enhanced + error correction. \item \texttt{mode=6} - Barcode reader programming. \end{itemize} @@ -2817,10 +3644,23 @@ Standards: ISO/IEC 16023, ANSI/AIM BC10 - ISS MaxiCode. enhanced error correction, otherwise it will select \texttt{mode=4} which provides standard error correction. \item + The default interpretation of data by readers is in accordance with + ISO/IEC 8859-1. When supported by the receiver characters from other + code pages can be encoded using Extended Channel Interpretation (ECI). +\item When the \textbf{parse} option is specified, any instances of \texttt{\^{}NNN} in the data field are replaced with their equivalent ASCII value, useful for specifying unprintable characters. \item + When the \textbf{parsefnc} option is specified, non-data function + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI999999}: ECI indicators + \end{itemize} +\item If \texttt{mode=4}, \texttt{mode=5} or \texttt{mode=6} the data field may contain any extended ASCII data. \item @@ -2846,7 +3686,8 @@ Standards: ISO/IEC 16023, ANSI/AIM BC10 - ISS MaxiCode. by the structured carrier message. \end{itemize} -\paragraph{Examples}\label{examples-30} +\hypertarget{examples-34}{% +\paragraph{Examples}\label{examples-34}} \begin{verbatim} Data: This is MaxiCode @@ -2886,16 +3727,18 @@ Encoder: maxicode \includegraphics{images/maxicode-4.eps} +\hypertarget{royal-mail-4-state-customer-code}{% \subsubsection{Royal Mail 4 State Customer -Code}\label{royal-mail-4-state-customer-code} +Code}\label{royal-mail-4-state-customer-code}} The \textbf{Royal Mail 4 State Customer Code} is a barcode symbology used by the British Postal Service to encode the postcode and delivery point identifier on letter mail. -Also known as: RM4SCC, CBC. +Also known as: RM4SCC, CBC, BPO 4 State Code -\paragraph{Data and Options}\label{data-and-options-40} +\hypertarget{data-and-options-47}{% +\paragraph{Data and Options}\label{data-and-options-47}} \begin{itemize} \tightlist @@ -2915,7 +3758,8 @@ Also known as: RM4SCC, CBC. be included in the data field \end{itemize} -\paragraph{Example}\label{example-7} +\hypertarget{example-10}{% +\paragraph{Example}\label{example-10}} \begin{verbatim} Data: LE28HS9Z @@ -2925,16 +3769,53 @@ Encoder: royalmail \includegraphics{images/rm4scc-1.eps} +\hypertarget{royal-mail-mailmark}{% +\subsubsection{Royal Mail Mailmark}\label{royal-mail-mailmark}} + +\textbf{Royal Mail Mailmark} is an implementation of the +\protect\hyperlink{data-matrix}{Data Matrix} (ECC 200) barcode symbology +for application within the Royal Mail postal system. + +Standards: Royal Mail Mailmark Barcode Definition Document + +\hypertarget{data-and-options-48}{% +\paragraph{Data and Options}\label{data-and-options-48}} + +\begin{itemize} +\tightlist +\item + The data field input consists of 45 characters of Mailmark structured + data (including required space padding) followed by variable-length, + free-formatted customer data. +\item + Note: Due to the fixed-length field format of the message data it is + important to carefully preserve spaces in the data field. +\item + The mandatory \textbf{type} option is used to specify the size of the + symbol, either \texttt{7}, \texttt{9} or \texttt{29}. +\end{itemize} + +\hypertarget{example-11}{% +\paragraph{Example}\label{example-11}} + +\begin{verbatim} +Data: JGB 012100123412345678AB19XY1A 0 www.xyz.com +Options: type=29 +Encoder: mailmark +\end{verbatim} + +\hypertarget{royal-tnt-post-4-state-barcode}{% \subsubsection{Royal TNT Post 4 state -barcode}\label{royal-tnt-post-4-state-barcode} +barcode}\label{royal-tnt-post-4-state-barcode}} The \textbf{Royal TNT Post 4 state barcode} symbology is used by the Dutch Postal Service to encode the delivery point identifier on letter mail. -Also known as: KIX. +Also known as: KIX, Klant IndeX. -\paragraph{Data and Options}\label{data-and-options-41} +\hypertarget{data-and-options-49}{% +\paragraph{Data and Options}\label{data-and-options-49}} \begin{itemize} \tightlist @@ -2950,7 +3831,8 @@ Also known as: KIX. \end{itemize} \end{itemize} -\paragraph{Example}\label{example-8} +\hypertarget{example-12}{% +\paragraph{Example}\label{example-12}} \begin{verbatim} Data: 1231FZ13XHS @@ -2960,7 +3842,8 @@ Encoder: kix \includegraphics{images/kix-1.eps} -\subsubsection{USPS Intelligent Mail}\label{usps-intelligent-mail} +\hypertarget{usps-intelligent-mail}{% +\subsubsection{USPS Intelligent Mail}\label{usps-intelligent-mail}} The \textbf{USPS Intelligent Mail} barcode is used by the US Postal service to encode the delivery and sender information on letter mail. @@ -2969,7 +3852,8 @@ Also known as: USPS OneCode. Standards: USPS-STD-11. -\paragraph{Data and Options}\label{data-and-options-42} +\hypertarget{data-and-options-50}{% +\paragraph{Data and Options}\label{data-and-options-50}} \begin{itemize} \tightlist @@ -2993,7 +3877,8 @@ Standards: USPS-STD-11. be included in the data field. \end{itemize} -\paragraph{Example}\label{example-9} +\hypertarget{example-13}{% +\paragraph{Example}\label{example-13}} \begin{verbatim} Data: 0123456709498765432101234567891 @@ -3003,12 +3888,14 @@ Encoder: onecode \includegraphics{images/onecode-1.eps} -\subsubsection{USPS POSTNET}\label{usps-postnet} +\hypertarget{usps-postnet}{% +\subsubsection{USPS POSTNET}\label{usps-postnet}} The \textbf{USPS POSTNET} barcode symbology is used by the US Postal service to encode the ZIP code information on letter mail. -\paragraph{Data and Options}\label{data-and-options-43} +\hypertarget{data-and-options-51}{% +\paragraph{Data and Options}\label{data-and-options-51}} \begin{itemize} \tightlist @@ -3019,7 +3906,8 @@ service to encode the ZIP code information on letter mail. included in the data field. \end{itemize} -\paragraph{Example}\label{example-10} +\hypertarget{example-14}{% +\paragraph{Example}\label{example-14}} \begin{verbatim} Data: 12345123412 @@ -3029,12 +3917,14 @@ Encoder: postnet \includegraphics{images/postnet-1.eps} -\subsubsection{USPS PLANET}\label{usps-planet} +\hypertarget{usps-planet}{% +\subsubsection{USPS PLANET}\label{usps-planet}} The \textbf{USPS PLANET} barcode symbology is used by the US Postal service to encode the ZIP code information on letter mail. -\paragraph{Data and Options}\label{data-and-options-44} +\hypertarget{data-and-options-52}{% +\paragraph{Data and Options}\label{data-and-options-52}} \begin{itemize} \tightlist @@ -3045,7 +3935,8 @@ service to encode the ZIP code information on letter mail. included in the data field. \end{itemize} -\paragraph{Example}\label{example-11} +\hypertarget{example-15}{% +\paragraph{Example}\label{example-15}} \begin{verbatim} Data: 01234567890 @@ -3055,12 +3946,14 @@ Encoder: planet \includegraphics{images/planet-1.eps} -\subsubsection{USPS FIM Symbols}\label{usps-fim-symbols} +\hypertarget{usps-fim-symbols}{% +\subsubsection{USPS FIM Symbols}\label{usps-fim-symbols}} The \textbf{USPS FIM} encoder is used to generate static predefined barcode symbols. -\paragraph{Data and Options}\label{data-and-options-45} +\hypertarget{data-and-options-53}{% +\paragraph{Data and Options}\label{data-and-options-53}} \begin{itemize} \tightlist @@ -3080,7 +3973,8 @@ barcode symbols. \end{itemize} \end{itemize} -\paragraph{Examples}\label{examples-31} +\hypertarget{examples-35}{% +\paragraph{Examples}\label{examples-35}} A USPS FIM A symbol: @@ -3122,16 +4016,19 @@ Encoder: symbol \includegraphics{images/fimd-1.eps} -\subsection{Pharmaceutical Symbols}\label{pharmaceutical-symbols} +\hypertarget{pharmaceutical-symbols}{% +\subsection{Pharmaceutical Symbols}\label{pharmaceutical-symbols}} -\subsubsection{Italian Pharmacode}\label{italian-pharmacode} +\hypertarget{italian-pharmacode}{% +\subsubsection{Italian Pharmacode}\label{italian-pharmacode}} \textbf{Italian Pharmacode} is a discrete, fixed length, self-checking barcode symbology used for pharmaceutical products in Italy. Also known as: Code 32, IMH, Radix 32. -\paragraph{Data and Options}\label{data-and-options-46} +\hypertarget{data-and-options-54}{% +\paragraph{Data and Options}\label{data-and-options-54}} \begin{itemize} \tightlist @@ -3141,10 +4038,11 @@ Also known as: Code 32, IMH, Radix 32. omitted. \item The mandatory check digit is calculated automatically if it is not - provided. + provided, otherwise the provided check digit is verified. \end{itemize} -\paragraph{Examples}\label{examples-32} +\hypertarget{examples-36}{% +\paragraph{Examples}\label{examples-36}} Identical symbols, input provided with and without a check digit: @@ -3162,12 +4060,13 @@ Encoder: code32 \includegraphics{images/code32-1.eps} -\hypertarget{pharmacode}{\subsubsection{Pharmacode}\label{pharmacode}} +\hypertarget{pharmacode}{% +\subsubsection{Pharmacode}\label{pharmacode}} \textbf{Pharmacode} is a binary barcode symbology that is used by the Pharmaceutical industry. -Also known as: Pharmaceutical Binary Code. +Also known as: Pharmaceutical Binary Code. Laetus Code. Variants: @@ -3178,7 +4077,8 @@ Variants: variant of the Pharmacode barcode. \end{itemize} -\paragraph{Data and Options}\label{data-and-options-47} +\hypertarget{data-and-options-55}{% +\paragraph{Data and Options}\label{data-and-options-55}} \begin{itemize} \tightlist @@ -3191,7 +4091,8 @@ Variants: wide bars and inter-bar spaces respectively. \end{itemize} -\paragraph{Example}\label{example-12} +\hypertarget{example-16}{% +\paragraph{Example}\label{example-16}} \begin{verbatim} Data: 117480 @@ -3201,13 +4102,14 @@ Encoder: pharmacode \includegraphics{images/pharmacode-1.eps} -\hypertarget{two-track-pharmacode}{\subsubsection{Two-Track -Pharmacode}\label{two-track-pharmacode}} +\hypertarget{two-track-pharmacode}{% +\subsubsection{Two-Track Pharmacode}\label{two-track-pharmacode}} \textbf{Two-Track Pharmacode} is a binary barcode symbology used by the Pharmaceutical industry. -Also known as: Two-track Pharmaceutical Binary Code. +Also known as: Two-track Pharmaceutical Binary Code, Two-track Laetus +Code. Variants: @@ -3218,7 +4120,8 @@ Variants: Two-track Pharmacode barcode. \end{itemize} -\paragraph{Data and Options}\label{data-and-options-48} +\hypertarget{data-and-options-56}{% +\paragraph{Data and Options}\label{data-and-options-56}} \begin{itemize} \tightlist @@ -3227,7 +4130,8 @@ Variants: \texttt{64570080} inclusive. \end{itemize} -\paragraph{Example}\label{example-13} +\hypertarget{example-17}{% +\paragraph{Example}\label{example-17}} \begin{verbatim} Data: 117480 @@ -3237,7 +4141,8 @@ Encoder: pharmacode2 \includegraphics{images/pharmacode2-1.eps} -\subsubsection{PZN}\label{pzn} +\hypertarget{pzn}{% +\subsubsection{PZN}\label{pzn}} \textbf{PZN} is a discrete, fixed length, self-checking barcode symbology used for pharmaceutical products in Germany. @@ -3249,12 +4154,13 @@ Variants: \begin{itemize} \tightlist \item - PZN-7. + PZN7 is the seven-digit format. \item - PZN-8. + PZN8 is the eight-digit format. \end{itemize} -\paragraph{Data and Options}\label{data-and-options-49} +\hypertarget{data-and-options-57}{% +\paragraph{Data and Options}\label{data-and-options-57}} \begin{itemize} \tightlist @@ -3265,13 +4171,15 @@ Variants: The \textbf{pzn8} option specifies that a PZN8 symbol is required, in which case the data field must contain seven digits or eight digits. \item - The mandatory check digit is calculated automatically if not provided. + The mandatory check digit is calculated automatically if not provided, + otherwise the provided check digit is verified. \item Note: by definition, not all six-digit or seven-digit number sequences are valid inputs. \end{itemize} -\paragraph{Examples}\label{examples-33} +\hypertarget{examples-37}{% +\paragraph{Examples}\label{examples-37}} Identical PZN7 symbols, input provided with and without a check digit: @@ -3305,8 +4213,8 @@ Encoder: pzn \includegraphics{images/pzn-2.eps} -\hypertarget{hibc-symbols}{\subsection{HIBC -Symbols}\label{hibc-symbols}} +\hypertarget{hibc-symbols}{% +\subsection{HIBC Symbols}\label{hibc-symbols}} \textbf{HIBC barcodes} use a number of general symbologies as carrier symbols for data structured according to the LIC and PAS structured data @@ -3343,7 +4251,8 @@ Standards: ANSI/HIBC Provider Applications Standard, ANSI/HIBC Supplier Labelling Standard, ANSI/HIBC Positive Identification for Patient Safety, ANSI/HIBC Syntax Standard. -\paragraph{Data and Options}\label{data-and-options-50} +\hypertarget{data-and-options-58}{% +\paragraph{Data and Options}\label{data-and-options-58}} \begin{itemize} \tightlist @@ -3357,8 +4266,8 @@ Safety, ANSI/HIBC Syntax Standard. input. \end{itemize} -\hypertarget{hibc-code-39}{\subsubsection{HIBC Code -39}\label{hibc-code-39}} +\hypertarget{hibc-code-39}{% +\subsubsection{HIBC Code 39}\label{hibc-code-39}} \begin{verbatim} Data: A123BJC5D6E71 @@ -3368,8 +4277,8 @@ Encoder: hibccode39 \includegraphics{images/hibccode39-1.eps} -\hypertarget{hibc-code-128}{\subsubsection{HIBC Code -128}\label{hibc-code-128}} +\hypertarget{hibc-code-128}{% +\subsubsection{HIBC Code 128}\label{hibc-code-128}} \begin{verbatim} Data: A123BJC5D6E71 @@ -3379,8 +4288,8 @@ Encoder: hibccode128 \includegraphics{images/hibccode128-1.eps} -\hypertarget{hibc-pdf417}{\subsubsection{HIBC -PDF417}\label{hibc-pdf417}} +\hypertarget{hibc-pdf417}{% +\subsubsection{HIBC PDF417}\label{hibc-pdf417}} \begin{verbatim} Data: A123BJC5D6E71 @@ -3390,8 +4299,8 @@ Encoder: hibcpdf417 \includegraphics{images/hibcpdf417-1.eps} -\hypertarget{hibc-micropdf417}{\subsubsection{HIBC -MicroPDF417}\label{hibc-micropdf417}} +\hypertarget{hibc-micropdf417}{% +\subsubsection{HIBC MicroPDF417}\label{hibc-micropdf417}} \begin{verbatim} Data: A123BJC5D6E71 @@ -3401,8 +4310,8 @@ Encoder: hibcmicropdf417 \includegraphics{images/hibcmicropdf417-1.eps} -\hypertarget{hibc-qr-code}{\subsubsection{HIBC QR -Code}\label{hibc-qr-code}} +\hypertarget{hibc-qr-code}{% +\subsubsection{HIBC QR Code}\label{hibc-qr-code}} \begin{verbatim} Data: A123BJC5D6E71 @@ -3412,8 +4321,8 @@ Encoder: hibcqrcode \includegraphics{images/hibcqrcode-1.eps} -\hypertarget{hibc-data-matrix}{\subsubsection{HIBC Data -Matrix}\label{hibc-data-matrix}} +\hypertarget{hibc-data-matrix}{% +\subsubsection{HIBC Data Matrix}\label{hibc-data-matrix}} \begin{verbatim} Data: A123BJC5D6E71 @@ -3423,8 +4332,8 @@ Encoder: hibcdatamatrix \includegraphics{images/hibcdatamatrix-1.eps} -\hypertarget{hibc-codablock-f}{\subsubsection{HIBC Codablock -F}\label{hibc-codablock-f}} +\hypertarget{hibc-codablock-f}{% +\subsubsection{HIBC Codablock F}\label{hibc-codablock-f}} \begin{verbatim} Data: A123BJC5D6E71 @@ -3434,9 +4343,11 @@ Encoder: hibccodablockf \includegraphics{images/hibccodablockf-1.eps} -\subsection{Less-used Symbols}\label{less-used-symbols} +\hypertarget{less-used-symbols}{% +\subsection{Less-used Symbols}\label{less-used-symbols}} -\subsubsection{BC412}\label{bc412} +\hypertarget{bc412}{% +\subsubsection{BC412}\label{bc412}} The \textbf{BC412} barcode symbology is single width, variable length barcode that is used for silicon wafer identification by the @@ -3444,7 +4355,8 @@ semiconductor manufacturing industry. Also known as: BC412 SEMI, BC412 IBM. -\paragraph{Data and Options}\label{data-and-options-51} +\hypertarget{data-and-options-59}{% +\paragraph{Data and Options}\label{data-and-options-59}} \begin{itemize} \tightlist @@ -3474,7 +4386,8 @@ Also known as: BC412 SEMI, BC412 IBM. bars. \end{itemize} -\paragraph{Examples}\label{examples-34} +\hypertarget{examples-38}{% +\paragraph{Examples}\label{examples-38}} \begin{verbatim} Data: BC412 @@ -3500,7 +4413,8 @@ Encoder: bc412 \includegraphics{images/bc412-3.eps} -\subsubsection{Channel Code}\label{channel-code} +\hypertarget{channel-code}{% +\subsubsection{Channel Code}\label{channel-code}} \textbf{Channel Code} is a linear, continuous, self-checking, bidirectional barcode symbology that encodes between two and seven @@ -3508,7 +4422,8 @@ digits in a short space. Standards: ANSI/AIM BC12 - USS Channel Code. -\paragraph{Data and Options}\label{data-and-options-52} +\hypertarget{data-and-options-60}{% +\paragraph{Data and Options}\label{data-and-options-60}} \begin{itemize} \tightlist @@ -3541,7 +4456,8 @@ Standards: ANSI/AIM BC12 - USS Channel Code. The \textbf{includecheck} option appends an optional check bar suffix. \end{itemize} -\paragraph{Examples}\label{examples-35} +\hypertarget{examples-39}{% +\paragraph{Examples}\label{examples-39}} A channel 3 symbol holding the value five: @@ -3583,7 +4499,8 @@ Encoder: channelcode \includegraphics{images/channelcode-4.eps} -\subsubsection{Codabar}\label{codabar} +\hypertarget{codabar}{% +\subsubsection{Codabar}\label{codabar}} \textbf{Codabar} is a linear, discrete, self-checking, bidirectional barcode symbology that can encode digits, six symbols and four delimiter @@ -3595,7 +4512,8 @@ USS-Codabar, ABC Codabar, Monarch, Code 2 of 7. Standards: ANSI/AIM BC3 - USS Codabar, BS EN 798. -\paragraph{Data and Options}\label{data-and-options-53} +\hypertarget{data-and-options-61}{% +\paragraph{Data and Options}\label{data-and-options-61}} \begin{itemize} \tightlist @@ -3630,7 +4548,8 @@ Standards: ANSI/AIM BC3 - USS Codabar, BS EN 798. characters appear in the human readable text. \end{itemize} -\paragraph{Example}\label{example-14} +\hypertarget{example-18}{% +\paragraph{Example}\label{example-18}} \begin{verbatim} Data: A0123456789B @@ -3640,8 +4559,8 @@ Encoder: rationalizedCodabar \includegraphics{images/codabar-1.eps} -\hypertarget{codablock-f}{\subsubsection{Codablock -F}\label{codablock-f}} +\hypertarget{codablock-f}{% +\subsubsection{Codablock F}\label{codablock-f}} The \textbf{Codablock F} barcode symbology is 2D stacked-linear barcode that consists of a number of stacked \protect\hyperlink{code-128}{Code @@ -3658,12 +4577,15 @@ Variants: Standards: USS Codablock F. -\paragraph{Data and Options}\label{data-and-options-54} +\hypertarget{data-and-options-62}{% +\paragraph{Data and Options}\label{data-and-options-62}} \begin{itemize} \tightlist \item - The data field can consist of any extended-ASCII data. + The data field can consist of any extended-ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. \item \emph{FNC4} function characters will be inserted automatically to allow the encoding of extended ASCII characters. @@ -3673,7 +4595,19 @@ Standards: USS Codablock F. ASCII value, useful for specifying unprintable characters. \item When the \textbf{parsefnc} option is specified, non-data function - characters can be specified by \texttt{\^{}FNC1} or \texttt{\^{}FNC3}. + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1 + \item + \texttt{\^{}FNC2}: FNC2 + \item + \texttt{\^{}FNC3}: FNC3 + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI999999}: ECI indicators + \end{itemize} \item The \textbf{columns} option specifies the number of columns in the symbol, default 8. @@ -3695,7 +4629,8 @@ Standards: USS Codablock F. bars enclosing the rows in points. The default is 1. \end{itemize} -\paragraph{Examples}\label{examples-36} +\hypertarget{examples-40}{% +\paragraph{Examples}\label{examples-40}} \begin{verbatim} Data: Codablock F @@ -3721,7 +4656,8 @@ Encoder: codablockf \includegraphics{images/codablockf-3.eps} -\subsubsection{Code 11}\label{code-11} +\hypertarget{code-11}{% +\subsubsection{Code 11}\label{code-11}} \textbf{Code 11} is a linear, discrete, non-self-checking, bidirectional, numeric barcode symbology that is primarily used for @@ -3729,7 +4665,8 @@ labelling telecommunication equipment. Also known as: USD-8. -\paragraph{Data and Options}\label{data-and-options-55} +\hypertarget{data-and-options-63}{% +\paragraph{Data and Options}\label{data-and-options-63}} \begin{itemize} \tightlist @@ -3743,7 +4680,8 @@ Also known as: USD-8. For 10 or more data digits two check digits are used. \end{itemize} -\paragraph{Example}\label{example-15} +\hypertarget{example-19}{% +\paragraph{Example}\label{example-19}} \begin{verbatim} Data: 0123456789 @@ -3753,7 +4691,8 @@ Encoder: code11 \includegraphics{images/code11-1.eps} -\subsubsection{Code 16K}\label{code-16k} +\hypertarget{code-16k}{% +\subsubsection{Code 16K}\label{code-16k}} The \textbf{Code 16K} barcode symbology is 2D stacked-linear barcode that can encode full 256 character extended-ASCII with the use of the @@ -3763,12 +4702,15 @@ Also known as: USS-16K Standards: ANSI/AIM BC7 - USS Code 16K, BS EN 12323. -\paragraph{Data and Options}\label{data-and-options-56} +\hypertarget{data-and-options-64}{% +\paragraph{Data and Options}\label{data-and-options-64}} \begin{itemize} \tightlist \item - The input can consist of any 256-bit extended ASCII data. + The data field can consist of any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. \item \emph{FNC4} function characters will be inserted automatically to allow the encoding of extended ASCII characters. @@ -3778,8 +4720,17 @@ Standards: ANSI/AIM BC7 - USS Code 16K, BS EN 12323. ASCII value, useful for specifying unprintable characters. \item When the \textbf{parsefnc} option is specified, non-data function - characters can be specified by \texttt{\^{}FNC1} through - \texttt{\^{}FNC3}. + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1 + \item + \texttt{\^{}FNC2}: FNC2 + \item + \texttt{\^{}FNC3}: FNC3 + \end{itemize} \item The \textbf{mode} option specifies the mode for the symbol. It is usual to leave this unspecified in which case the most appropriate @@ -3826,7 +4777,8 @@ Standards: ANSI/AIM BC7 - USS Code 16K, BS EN 12323. bars enclosing the rows in points. The default is 1. \end{itemize} -\paragraph{Examples}\label{examples-37} +\hypertarget{examples-41}{% +\paragraph{Examples}\label{examples-41}} \begin{verbatim} Data: Abcd-1234567890-wxyZ @@ -3852,7 +4804,8 @@ Encoder: code16k \includegraphics{images/code16k-3.eps} -\hypertarget{code-25}{\subsubsection{Code 25}\label{code-25}} +\hypertarget{code-25}{% +\subsubsection{Code 25}\label{code-25}} \textbf{Code 2 of 5} is a simple low density numeric barcode symbology. @@ -3873,7 +4826,8 @@ Variants: \protect\hyperlink{coop-2-of-5}{COOP 2 of 5}. \end{itemize} -\paragraph{Data and Options}\label{data-and-options-57} +\hypertarget{data-and-options-65}{% +\paragraph{Data and Options}\label{data-and-options-65}} \begin{itemize} \tightlist @@ -3882,7 +4836,8 @@ Variants: \item The \textbf{includecheck} option calculates the check digit. \item - The \textbf{version} option determines which variant to use: + \emph{Deprecated}: The \textbf{version} option determines which + variant to use: \begin{itemize} \tightlist @@ -3903,7 +4858,8 @@ Variants: \end{itemize} \end{itemize} -\paragraph{Examples}\label{examples-38} +\hypertarget{examples-42}{% +\paragraph{Examples}\label{examples-42}} \begin{verbatim} Data: 01234567 @@ -3913,8 +4869,145 @@ Encoder: code2of5 \includegraphics{images/code25-1.eps} -\hypertarget{iata-2-of-5}{\subsubsection{IATA 2 of -5}\label{iata-2-of-5}} +\hypertarget{dotcode}{% +\subsubsection{DotCode}\label{dotcode}} + +The \textbf{DotCode} symbology is 2D matrix-style barcode that can +encode full 256 character extended-ASCII. + +Also known as: Ribbon Code + +Variants: + +\begin{itemize} +\tightlist +\item + \protect\hyperlink{gs1-dotcode}{GS1 DotCode} is a variant of DotCode + that should be used when encoding data that is in + \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 + Application Identifier standard format}. +\end{itemize} + +Standards: AIM - ISS DotCode. + +\hypertarget{data-and-options-66}{% +\paragraph{Data and Options}\label{data-and-options-66}} + +\begin{itemize} +\tightlist +\item + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. +\item + When the \textbf{parse} option is specified, any instances of + \texttt{\^{}NNN} in the data field are replaced with their equivalent + ASCII value. This is useful for specifying unprintable characters. +\item + When the \textbf{parsefnc} option is specified, non-data function + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1. \emph{Recommendation: Use + \protect\hyperlink{gs1-dotcode}{GS1 DotCode} for encoding GS1 AI + syntax data.} + \item + \texttt{\^{}FNC2}: FNC2 + \item + \texttt{\^{}FNC3}: FNC3 + \end{itemize} +\item + The \textbf{ratio} is used to specify the aspect ratio of the symbol. + The default is 1.5. +\item + The \textbf{columns} and \textbf{rows} options are used to specify the + size of the symbol. When these are not specified a symbol is generated + that maintains the selected aspect ratio. +\item + \emph{Deprecated: Use only if performance is a concern.} The + \textbf{fast} option is used to enable the optional high-speed symbol + masking algorithm. +\end{itemize} + +\hypertarget{examples-43}{% +\paragraph{Examples}\label{examples-43}} + +\begin{verbatim} +Data: This is DotCode +Options: inkspread=0.16 +Encoder: dotcode +\end{verbatim} + +\includegraphics{images/dotcode-1.eps} + +\hypertarget{ultracode}{% +\subsubsection{Ultracode}\label{ultracode}} + +The \textbf{Ultracode} symbology is a colour, 2D matrix-style barcode +symbology that can encode full 256 character extended-ASCII. + +Standards: AIM ISS - Ultracode. + +\hypertarget{data-and-options-67}{% +\paragraph{Data and Options}\label{data-and-options-67}} + +\begin{itemize} +\tightlist +\item + The data field can contain any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. +\item + When the \textbf{parse} option is specified, any instances of + \texttt{\^{}NNN} in the data field are replaced with their equivalent + ASCII value, useful for specifying unprintable characters. +\item + When the \textbf{parsefnc} option is specified, non-data function + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1 + \item + \texttt{\^{}FNC3}: FNC3 + \end{itemize} +\item + The \textbf{eclevel} option is used to specify the error correction + level: + + \begin{itemize} + \tightlist + \item + \texttt{eclevel=EC0} - Error detection only + \item + \texttt{eclevel=EC1} - Low + \item + \texttt{eclevel=EC2} - Medium (default) + \item + \texttt{eclevel=EC3} + \item + \texttt{eclevel=EC4} + \item + \texttt{eclevel=EC5} - Highest + \end{itemize} +\end{itemize} + +\hypertarget{examples-44}{% +\paragraph{Examples}\label{examples-44}} + +\begin{verbatim} +Data: Nice colours! +Options: eclevel=EC3 +Encoder: ultracode +\end{verbatim} + +\includegraphics{images/ultracode-1.eps} + +\hypertarget{iata-2-of-5}{% +\subsubsection{IATA 2 of 5}\label{iata-2-of-5}} \textbf{IATA 2 of 5} is a variant of the \protect\hyperlink{code-25}{Code 2 of 5} barcode symbology. @@ -3935,7 +5028,8 @@ Variants: \protect\hyperlink{coop-2-of-5}{COOP 2 of 5}. \end{itemize} -\paragraph{Data and Options}\label{data-and-options-58} +\hypertarget{data-and-options-68}{% +\paragraph{Data and Options}\label{data-and-options-68}} \begin{itemize} \tightlist @@ -3945,7 +5039,8 @@ Variants: The \textbf{includecheck} option calculates the check digit. \end{itemize} -\paragraph{Examples}\label{examples-39} +\hypertarget{examples-45}{% +\paragraph{Examples}\label{examples-45}} \begin{verbatim} Data: 01234567 @@ -3955,8 +5050,8 @@ Encoder: iata2of5 \includegraphics{images/code25-2.eps} -\hypertarget{matrix-2-of-5}{\subsubsection{Matrix 2 of -5}\label{matrix-2-of-5}} +\hypertarget{matrix-2-of-5}{% +\subsubsection{Matrix 2 of 5}\label{matrix-2-of-5}} \textbf{Matrix 2 of 5} is a variant of the \protect\hyperlink{code-25}{Code 2 of 5} barcode symbology. @@ -3976,7 +5071,8 @@ Variants: \protect\hyperlink{coop-2-of-5}{COOP 2 of 5}. \end{itemize} -\paragraph{Data and Options}\label{data-and-options-59} +\hypertarget{data-and-options-69}{% +\paragraph{Data and Options}\label{data-and-options-69}} \begin{itemize} \tightlist @@ -3986,8 +5082,8 @@ Variants: The \textbf{includecheck} option calculates the check digit. \end{itemize} -\hypertarget{datalogic-2-of-5}{\subsubsection{Datalogic 2 of -5}\label{datalogic-2-of-5}} +\hypertarget{datalogic-2-of-5}{% +\subsubsection{Datalogic 2 of 5}\label{datalogic-2-of-5}} \textbf{Datalogic 2 of 5} is a variant of the \protect\hyperlink{code-25}{Code 2 of 5} barcode symbology. @@ -4007,7 +5103,8 @@ Variants: \protect\hyperlink{coop-2-of-5}{COOP 2 of 5}. \end{itemize} -\paragraph{Data and Options}\label{data-and-options-60} +\hypertarget{data-and-options-70}{% +\paragraph{Data and Options}\label{data-and-options-70}} \begin{itemize} \tightlist @@ -4017,8 +5114,8 @@ Variants: The \textbf{includecheck} option calculates the check digit. \end{itemize} -\hypertarget{coop-2-of-5}{\subsubsection{COOP 2 of -5}\label{coop-2-of-5}} +\hypertarget{coop-2-of-5}{% +\subsubsection{COOP 2 of 5}\label{coop-2-of-5}} \textbf{COOP 2 of 5} is a variant of the \protect\hyperlink{code-25}{Code 2 of 5} barcode symbology. @@ -4038,7 +5135,8 @@ Variants: \protect\hyperlink{matrix-2-of-5}{Matrix 2 of 5}. \end{itemize} -\paragraph{Data and Options}\label{data-and-options-61} +\hypertarget{data-and-options-71}{% +\paragraph{Data and Options}\label{data-and-options-71}} \begin{itemize} \tightlist @@ -4048,7 +5146,8 @@ Variants: The \textbf{includecheck} option calculates the check digit. \end{itemize} -\subsubsection{Code 49}\label{code-49} +\hypertarget{code-49}{% +\subsubsection{Code 49}\label{code-49}} The \textbf{Code 49} barcode symbology is 2D stacked-linear barcode that can encode 128 character ASCII. @@ -4057,7 +5156,8 @@ Also known as: USS-49. Standards: ANSI/AIM BC6 - USS Code 49. -\paragraph{Data and Options}\label{data-and-options-62} +\hypertarget{data-and-options-72}{% +\paragraph{Data and Options}\label{data-and-options-72}} \begin{itemize} \tightlist @@ -4069,8 +5169,17 @@ Standards: ANSI/AIM BC6 - USS Code 49. ASCII value, useful for specifying unprintable characters. \item When the \textbf{parsefnc} option is specified, non-data function - characters can be specified by \texttt{\^{}FNC1} through - \texttt{\^{}FNC3}. + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1 + \item + \texttt{\^{}FNC2}: FNC2 + \item + \texttt{\^{}FNC3}: FNC3 + \end{itemize} \item The \textbf{mode} option specifies the mode for the symbol. It is usual to leave this unspecified in which case the most appropriate @@ -4096,7 +5205,7 @@ Standards: ANSI/AIM BC6 - USS Code 49. \end{itemize} \item The \textbf{pos} option specifies this symbol to be part of multi-part - structured data, i.e.~selecting \texttt{mode=3}. For example + structured data, i.e. selecting \texttt{mode=3}. For example \texttt{pos=25} specifies this to be the second symbol in a group of five symbols. \item @@ -4113,7 +5222,8 @@ Standards: ANSI/AIM BC6 - USS Code 49. bars enclosing the rows in points. The default is \emph{1}. \end{itemize} -\paragraph{Examples}\label{examples-40} +\hypertarget{examples-46}{% +\paragraph{Examples}\label{examples-46}} \begin{verbatim} Data: MULTIPLE ROWS IN CODE 49 @@ -4139,7 +5249,8 @@ Encoder: code49 \includegraphics{images/code49-3.eps} -\subsubsection{Code One}\label{code-one} +\hypertarget{code-one}{% +\subsubsection{Code One}\label{code-one}} \textbf{Code One} was the earliest public domain 2D matrix-style barcode. It is used by the health care and recycling industry and can @@ -4149,13 +5260,17 @@ Also known as: Code 1, Code 1S. Standards: AIM USS - Code One. -\paragraph{Data and Options}\label{data-and-options-63} +\hypertarget{data-and-options-73}{% +\paragraph{Data and Options}\label{data-and-options-73}} \begin{itemize} \tightlist \item The data field can consist of any ASCII data for \emph{standard} and - \emph{T-type} symbols. + \emph{T-type} symbols. The default interpretation of data by readers + is in accordance with ISO/IEC 8859-1. When supported by the receiver + characters from other code pages can be encoded using Extended Channel + Interpretation (ECI). \item Note: \emph{S-type} symbols are special in that they represent a numeric value so may only contain digits. @@ -4166,7 +5281,17 @@ Standards: AIM USS - Code One. \texttt{\^{}029} for \emph{GS}, etc. \item When the \textbf{parsefnc} option is specified, non-data function - characters can be specified by \texttt{\^{}FNC1}, \texttt{\^{}FNC3}. + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1 + \item + \texttt{\^{}FNC3}: FNC3 + \item + \texttt{\^{}ECI000000} to \texttt{\^{}ECI999999}: ECI indicators + \end{itemize} \item The \textbf{version} option is used to specify the size and type of the symbol: @@ -4186,7 +5311,8 @@ Standards: AIM USS - Code One. \end{itemize} \end{itemize} -\paragraph{Examples}\label{examples-41} +\hypertarget{examples-47}{% +\paragraph{Examples}\label{examples-47}} \begin{verbatim} Data: Code One @@ -4220,8 +5346,8 @@ Encoder: codeone \includegraphics{images/codeone-4.eps} -\hypertarget{msi-plessey}{\subsubsection{MSI -Plessey}\label{msi-plessey}} +\hypertarget{msi-plessey}{% +\subsubsection{MSI Plessey}\label{msi-plessey}} \textbf{MSI Plessey} is a continuous, non-self-checking, arbitrary length, numeric barcode symbology. @@ -4237,7 +5363,8 @@ Variants: which MSI Modified Plessey was based. \end{itemize} -\paragraph{Data and Options}\label{data-and-options-64} +\hypertarget{data-and-options-74}{% +\paragraph{Data and Options}\label{data-and-options-74}} \begin{itemize} \tightlist @@ -4276,7 +5403,8 @@ Variants: correct representation. \end{itemize} -\paragraph{Examples}\label{examples-42} +\hypertarget{examples-48}{% +\paragraph{Examples}\label{examples-48}} \begin{verbatim} Data: 0123456789 @@ -4302,7 +5430,8 @@ Encoder: msi \includegraphics{images/msi-3.eps} -\hypertarget{plessey}{\subsubsection{Plessey}\label{plessey}} +\hypertarget{plessey}{% +\subsubsection{Plessey}\label{plessey}} \textbf{Plessey} is a continuous, arbitrary length barcode symbology for encoding hexadecimal data. @@ -4318,7 +5447,8 @@ Variants: the Plessey (UK) barcode developed by the MSI Data Corporation. \end{itemize} -\paragraph{Data and Options}\label{data-and-options-65} +\hypertarget{data-and-options-75}{% +\paragraph{Data and Options}\label{data-and-options-75}} \begin{itemize} \tightlist @@ -4343,7 +5473,8 @@ Variants: symbol. \end{itemize} -\paragraph{Examples}\label{examples-43} +\hypertarget{examples-49}{% +\paragraph{Examples}\label{examples-49}} Equivalent symbols, the latter displaying the two mandatory check characters: @@ -4374,7 +5505,8 @@ Encoder: plessey \includegraphics{images/plessey-3.eps} -\subsubsection{PosiCode}\label{posicode} +\hypertarget{posicode}{% +\subsubsection{PosiCode}\label{posicode}} \textbf{PosiCode} is a continuous, variable length, non-self-checking, bidirectional barcode symbology that is designed for use within printing @@ -4382,7 +5514,8 @@ processes where it is difficult to precisely control the width of a bar. Standards: ITS PosiCode. -\paragraph{Data and Options}\label{data-and-options-66} +\hypertarget{data-and-options-76}{% +\paragraph{Data and Options}\label{data-and-options-76}} \begin{itemize} \tightlist @@ -4392,10 +5525,16 @@ Standards: ITS PosiCode. \begin{itemize} \tightlist \item - For \emph{standard} symbols: Any 256-bit extended ASCII data. - \item - \emph{FNC4} function characters will be inserted automatically to - allow the encoding of extended ASCII characters. + For \emph{standard} symbols: Any extended ASCII data. The default + interpretation of data by readers is in accordance with ISO/IEC + 8859-1. + + \begin{itemize} + \tightlist + \item + \emph{FNC4} function characters will be inserted automatically to + allow the encoding of extended ASCII characters. + \end{itemize} \item For \emph{limited} symbols: letters \texttt{A-Z}, digits \texttt{0-9}, symbols \texttt{-} and \texttt{.} @@ -4422,14 +5561,24 @@ Standards: ITS PosiCode. \texttt{\^{}029} for \emph{GS}, etc. \item When the \textbf{parsefnc} option is specified, non-data function - characters can be specified by \texttt{\^{}FNC1} through - \texttt{\^{}FNC3}. + characters can be specified by escape sequences: + + \begin{itemize} + \tightlist + \item + \texttt{\^{}FNC1}: FNC1 + \item + \texttt{\^{}FNC2}: FNC2 + \item + \texttt{\^{}FNC3}: FNC3 + \end{itemize} \item The \textbf{inkspread} option can be used to adjust the width of the bars. \end{itemize} -\paragraph{Example PosiCode}\label{example-posicode} +\hypertarget{example-posicode}{% +\paragraph{Example PosiCode}\label{example-posicode}} Equivalent ways to generate a PosiCode A symbol: @@ -4477,7 +5626,8 @@ Encoder: posicode \includegraphics{images/posicode-4.eps} -\paragraph{Example Limited PosiCode}\label{example-limited-posicode} +\hypertarget{example-limited-posicode}{% +\paragraph{Example Limited PosiCode}\label{example-limited-posicode}} Limited PosiCode A with narrowed bars: @@ -4499,7 +5649,8 @@ Encoder: posicode \includegraphics{images/posicode-6.eps} -\hypertarget{telepen}{\subsubsection{Telepen}\label{telepen}} +\hypertarget{telepen}{% +\subsubsection{Telepen}\label{telepen}} \textbf{Telepen} is an arbitrary length barcode symbology for encoding all 128 ASCII characters without the need for shift characters. @@ -4516,7 +5667,8 @@ Variants: Standards: USS Telepen. -\paragraph{Data and Options}\label{data-and-options-67} +\hypertarget{data-and-options-77}{% +\paragraph{Data and Options}\label{data-and-options-77}} \begin{itemize} \tightlist @@ -4536,7 +5688,8 @@ Standards: USS Telepen. encoded using the \emph{parse} option.} \end{itemize} -\paragraph{Examples}\label{examples-44} +\hypertarget{examples-50}{% +\paragraph{Examples}\label{examples-50}} \begin{verbatim} Data: Telepen @@ -4554,8 +5707,8 @@ Encoder: telepen \includegraphics{images/telepen-2.eps} -\hypertarget{telepen-numeric}{\subsubsection{Telepen -Numeric}\label{telepen-numeric}} +\hypertarget{telepen-numeric}{% +\subsubsection{Telepen Numeric}\label{telepen-numeric}} \textbf{Telepen Numeric} is a variant of the Telepen symbology for efficient encoding of numeric data. @@ -4570,7 +5723,8 @@ Variants: Standards: USS Telepen. -\paragraph{Data and Options}\label{data-and-options-68} +\hypertarget{data-and-options-78}{% +\paragraph{Data and Options}\label{data-and-options-78}} \begin{itemize} \tightlist @@ -4586,7 +5740,8 @@ Standards: USS Telepen. The mandatory check digit is automatically included. \end{itemize} -\paragraph{Examples}\label{examples-45} +\hypertarget{examples-51}{% +\paragraph{Examples}\label{examples-51}} \begin{verbatim} Data: 123456 @@ -4612,8 +5767,8 @@ Encoder: telepennumeric \includegraphics{images/telepen-5.eps} -\hypertarget{gs1-composite-symbols}{\subsection{GS1 Composite -Symbols}\label{gs1-composite-symbols}} +\hypertarget{gs1-composite-symbols}{% +\subsection{GS1 Composite Symbols}\label{gs1-composite-symbols}} \textbf{GS1 Composite} barcode symbologies consist of a primary component beneath a 2D component (variations of @@ -4677,7 +5832,8 @@ Variants: Standards: ISO/IEC 24723, ITS EAN.UCC Composite Symbology, AIM ISS - EAN.UCC Composite Symbology, GS1 General Specifications. -\paragraph{Data and Options}\label{data-and-options-69} +\hypertarget{data-and-options-79}{% +\paragraph{Data and Options}\label{data-and-options-79}} \begin{itemize} \tightlist @@ -4693,6 +5849,13 @@ EAN.UCC Composite Symbology, GS1 General Specifications. \protect\hyperlink{gs1-application-identifier-standard-format}{GS1 Application Identifier standard format}. \item + Note that it is not necessary to specify \emph{FNC1} characters since + the encoder will insert these automatically where necessary. +\item + \emph{Deprecated.} The \textbf{dontlint} option disables GS1 + Application Identifier syntax validation allowing images to be + generated for input that does not comply with GS1 standards. +\item For maximum efficiency, if the data for the 2D component contains a number of application identifiers matching any of the specifications below then they should be provided in this given order: @@ -4707,8 +5870,9 @@ EAN.UCC Composite Symbology, GS1 General Specifications. \texttt{(90)\{0-3\ digits\ not\ starting\ 0\}\{upper\ alpha\}...} \end{itemize} \item - The \textbf{ccversion} option is used to select a specific 2D - component: + \emph{Deprecated: Default is best unless your application dictates + otherwise.} The \textbf{ccversion} option is used to select a specific + 2D component: \begin{itemize} \tightlist @@ -4719,17 +5883,17 @@ EAN.UCC Composite Symbology, GS1 General Specifications. \item \texttt{ccversion=c} - \protect\hyperlink{cc-c}{CC-C} (\protect\hyperlink{gs1-128-composite}{GS1-128 Composite} only) + \item + If \textbf{ccversion} is not specified a CC-A component will be + selected if the data will fit, otherwise a CC-B component will be + used. In the case of \protect\hyperlink{gs1-128-composite}{GS1-128 + Composite} a CC-C component will be used if the data does not fit + within either a CC-A or CC-B component. \end{itemize} -\item - If \textbf{ccversion} is not specified a CC-A component will be - selected if the data will fit, otherwise a CC-B component will be - used. In the case of \protect\hyperlink{gs1-128-composite}{GS1-128 - Composite} a CC-C component will be used if the data does not fit - within either a CC-A or CC-B component. \end{itemize} -\hypertarget{ean-13-composite}{\subsubsection{EAN-13 -Composite}\label{ean-13-composite}} +\hypertarget{ean-13-composite}{% +\subsubsection{EAN-13 Composite}\label{ean-13-composite}} \begin{verbatim} Data: 331234567890|(99)1234-abcd @@ -4739,8 +5903,8 @@ Encoder: ean13composite \includegraphics{images/ean13composite-1.eps} -\hypertarget{ean-8-composite}{\subsubsection{EAN-8 -Composite}\label{ean-8-composite}} +\hypertarget{ean-8-composite}{% +\subsubsection{EAN-8 Composite}\label{ean-8-composite}} \begin{verbatim} Data: 12345670|(21)A12345678 @@ -4750,8 +5914,8 @@ Encoder: ean8composite \includegraphics{images/ean8composite-1.eps} -\hypertarget{upc-a-composite}{\subsubsection{UPC-A -Composite}\label{upc-a-composite}} +\hypertarget{upc-a-composite}{% +\subsubsection{UPC-A Composite}\label{upc-a-composite}} \begin{verbatim} Data: 01600033610|(99)1234-abcd @@ -4761,8 +5925,8 @@ Encoder: upcacomposite \includegraphics{images/upcacomposite-1.eps} -\hypertarget{upc-e-composite}{\subsubsection{UPC-E -Composite}\label{upc-e-composite}} +\hypertarget{upc-e-composite}{% +\subsubsection{UPC-E Composite}\label{upc-e-composite}} \begin{verbatim} Data: 0121230|(15)021231 @@ -4772,8 +5936,8 @@ Encoder: upcecomposite \includegraphics{images/upcecomposite-1.eps} -\hypertarget{gs1-databar-omnidirectional-composite}{\subsubsection{GS1 -DataBar Omnidirectional +\hypertarget{gs1-databar-omnidirectional-composite}{% +\subsubsection{GS1 DataBar Omnidirectional Composite}\label{gs1-databar-omnidirectional-composite}} \begin{verbatim} @@ -4784,8 +5948,8 @@ Encoder: databaromnicomposite \includegraphics{images/databaromnicomposite-1.eps} -\hypertarget{gs1-databar-stacked-omnidirectional-composite}{\subsubsection{GS1 -DataBar Stacked Omnidirectional +\hypertarget{gs1-databar-stacked-omnidirectional-composite}{% +\subsubsection{GS1 DataBar Stacked Omnidirectional Composite}\label{gs1-databar-stacked-omnidirectional-composite}} \begin{verbatim} @@ -4796,8 +5960,9 @@ Encoder: databarstackedomnicomposite \includegraphics{images/databarstackedomnicomposite-1.eps} -\hypertarget{gs1-databar-expanded-composite}{\subsubsection{GS1 DataBar -Expanded Composite}\label{gs1-databar-expanded-composite}} +\hypertarget{gs1-databar-expanded-composite}{% +\subsubsection{GS1 DataBar Expanded +Composite}\label{gs1-databar-expanded-composite}} \begin{verbatim} Data: (01)93712345678904(3103)001234|(91)1A2B3C4D5E @@ -4807,8 +5972,8 @@ Encoder: databarexpandedcomposite \includegraphics{images/databarexpandedcomposite-1.eps} -\hypertarget{gs1-databar-expanded-stacked-composite}{\subsubsection{GS1 -DataBar Expanded Stacked +\hypertarget{gs1-databar-expanded-stacked-composite}{% +\subsubsection{GS1 DataBar Expanded Stacked Composite}\label{gs1-databar-expanded-stacked-composite}} \begin{verbatim} @@ -4819,8 +5984,9 @@ Encoder: databarexpandedstackedcomposite \includegraphics{images/databarexpandedstackedcomposite-1.eps} -\hypertarget{gs1-databar-truncated-composite}{\subsubsection{GS1 DataBar -Truncated Composite}\label{gs1-databar-truncated-composite}} +\hypertarget{gs1-databar-truncated-composite}{% +\subsubsection{GS1 DataBar Truncated +Composite}\label{gs1-databar-truncated-composite}} \begin{verbatim} Data: (01)03612345678904|(11)990102 @@ -4830,8 +5996,9 @@ Encoder: databartruncatedcomposite \includegraphics{images/databartruncatedcomposite-1.eps} -\hypertarget{gs1-databar-stacked-composite}{\subsubsection{GS1 DataBar -Stacked Composite}\label{gs1-databar-stacked-composite}} +\hypertarget{gs1-databar-stacked-composite}{% +\subsubsection{GS1 DataBar Stacked +Composite}\label{gs1-databar-stacked-composite}} \begin{verbatim} Data: (01)03412345678900|(17)010200 @@ -4841,8 +6008,9 @@ Encoder: databarstackedcomposite \includegraphics{images/databarstackedcomposite-1.eps} -\hypertarget{gs1-databar-limited-composite}{\subsubsection{GS1 DataBar -Limited Composite}\label{gs1-databar-limited-composite}} +\hypertarget{gs1-databar-limited-composite}{% +\subsubsection{GS1 DataBar Limited +Composite}\label{gs1-databar-limited-composite}} \begin{verbatim} Data: (01)03512345678907|(21)abcdefghijklmnopqrstuv @@ -4852,8 +6020,8 @@ Encoder: databarlimitedcomposite \includegraphics{images/databarlimitedcomposite-1.eps} -\hypertarget{gs1-128-composite}{\subsubsection{GS1-128 -Composite}\label{gs1-128-composite}} +\hypertarget{gs1-128-composite}{% +\subsubsection{GS1-128 Composite}\label{gs1-128-composite}} GS1-128 Composite with a CC-A 2D component: @@ -4875,7 +6043,8 @@ Encoder: gs1-128composite \includegraphics{images/ean128composite-2.eps} -\hypertarget{cc-a}{\subsubsection{CC-A}\label{cc-a}} +\hypertarget{cc-a}{% +\subsubsection{CC-A}\label{cc-a}} Isolated CC-A 2D component: @@ -4887,7 +6056,8 @@ Encoder: gs1-cc \includegraphics{images/gs1composite-1.eps} -\hypertarget{cc-b}{\subsubsection{CC-B}\label{cc-b}} +\hypertarget{cc-b}{% +\subsubsection{CC-B}\label{cc-b}} Isolated CC-B 2D component: @@ -4899,7 +6069,8 @@ Encoder: gs1-cc \includegraphics{images/gs1composite-2.eps} -\hypertarget{cc-c}{\subsubsection{CC-C}\label{cc-c}} +\hypertarget{cc-c}{% +\subsubsection{CC-C}\label{cc-c}} Isolated CC-C 2D component: @@ -4911,15 +6082,18 @@ Encoder: gs1-cc \includegraphics{images/gs1composite-3.eps} -\subsection{Raw Symbols}\label{raw-symbols} +\hypertarget{raw-symbols}{% +\subsection{Raw Symbols}\label{raw-symbols}} -\subsubsection{DAFT}\label{daft} +\hypertarget{daft}{% +\subsubsection{DAFT}\label{daft}} \textbf{DAFT} is an encoder for directly specifying the descender, ascender, full-height, tracker-bar succession for a custom 4 state barcode symbol. -\paragraph{Data and Options}\label{data-and-options-70} +\hypertarget{data-and-options-80}{% +\paragraph{Data and Options}\label{data-and-options-80}} \begin{itemize} \tightlist @@ -4929,7 +6103,8 @@ barcode symbol. ascender, full-height and tracker bars of a custom 4 state symbol. \end{itemize} -\paragraph{Example}\label{example-16} +\hypertarget{example-20}{% +\paragraph{Example}\label{example-20}} \begin{verbatim} Data: FATDAFTDAD @@ -4939,13 +6114,15 @@ Encoder: daft \includegraphics{images/daft-1.eps} -\subsubsection{Flattermarken}\label{flattermarken} +\hypertarget{flattermarken}{% +\subsubsection{Flattermarken}\label{flattermarken}} \textbf{Flattermarken} are identification marks used in book production that facilitate the proper arrangement of bound sections by a book binder. -\paragraph{Data and Options}\label{data-and-options-71} +\hypertarget{data-and-options-81}{% +\paragraph{Data and Options}\label{data-and-options-81}} \begin{itemize} \tightlist @@ -4969,7 +6146,8 @@ binder. encoder should be used instead. \end{itemize} -\paragraph{Example}\label{example-17} +\hypertarget{example-21}{% +\paragraph{Example}\label{example-21}} \begin{verbatim} Data: 1304 @@ -4979,12 +6157,14 @@ Encoder: flattermarken \includegraphics{images/flattermarken-1.eps} -\hypertarget{raw}{\subsubsection{Raw}\label{raw}} +\hypertarget{raw}{% +\subsubsection{Raw}\label{raw}} The \textbf{raw} encoder is used for directly specifying the space/bar succession of a custom barcode symbol. -\paragraph{Data and Options}\label{data-and-options-72} +\hypertarget{data-and-options-82}{% +\paragraph{Data and Options}\label{data-and-options-82}} \begin{itemize} \tightlist @@ -4993,7 +6173,8 @@ succession of a custom barcode symbol. the bars and spaces of a custom symbol. \end{itemize} -\paragraph{Example}\label{example-18} +\hypertarget{example-22}{% +\paragraph{Example}\label{example-22}} \begin{verbatim} Data: 331132131313411122131311333213114131131221323 @@ -5003,9 +6184,11 @@ Encoder: raw \includegraphics{images/raw-1.eps} -\subsection{Partial Symbols}\label{partial-symbols} +\hypertarget{partial-symbols}{% +\subsection{Partial Symbols}\label{partial-symbols}} -\hypertarget{ean-2}{\subsubsection{EAN-2}\label{ean-2}} +\hypertarget{ean-2}{% +\subsubsection{EAN-2}\label{ean-2}} \textbf{EAN-2} is the two-digit add-on code that accompanies a EAN or UPC type barcode symbol such as an \protect\hyperlink{isbn}{ISBN} or @@ -5013,7 +6196,8 @@ UPC type barcode symbol such as an \protect\hyperlink{isbn}{ISBN} or Also known as: Two-Digit Add-On, Two-Digit Supplement, UPC-2 -\paragraph{Data and Options}\label{data-and-options-73} +\hypertarget{data-and-options-83}{% +\paragraph{Data and Options}\label{data-and-options-83}} \begin{itemize} \tightlist @@ -5023,7 +6207,8 @@ Also known as: Two-Digit Add-On, Two-Digit Supplement, UPC-2 The \textbf{includetext} option should normally be supplied. \end{itemize} -\paragraph{Example}\label{example-19} +\hypertarget{example-23}{% +\paragraph{Example}\label{example-23}} \begin{verbatim} Data: 05 @@ -5033,7 +6218,8 @@ Encoder: ean2 \includegraphics{images/ean2-1.eps} -\hypertarget{ean-5}{\subsubsection{EAN-5}\label{ean-5}} +\hypertarget{ean-5}{% +\subsubsection{EAN-5}\label{ean-5}} \textbf{EAN-5} is the five-digit add-on code that accompanies an EAN or UPC type barcode symbol such as an \protect\hyperlink{isbn}{ISBN} or @@ -5041,7 +6227,8 @@ UPC type barcode symbol such as an \protect\hyperlink{isbn}{ISBN} or Also known as: Five-Digit Add-On, Five-Digit Supplement, UPC-5 -\paragraph{Data and Options}\label{data-and-options-74} +\hypertarget{data-and-options-84}{% +\paragraph{Data and Options}\label{data-and-options-84}} \begin{itemize} \tightlist @@ -5051,7 +6238,8 @@ Also known as: Five-Digit Add-On, Five-Digit Supplement, UPC-5 The \textbf{includetext} option should normally be supplied. \end{itemize} -\paragraph{Example}\label{example-20} +\hypertarget{example-24}{% +\paragraph{Example}\label{example-24}} \begin{verbatim} Data: 90200 @@ -5061,14 +6249,14 @@ Encoder: ean5 \includegraphics{images/ean5-1.eps} -\hypertarget{gs1-application-identifier-standard-format}{\subsection{GS1 -Application Identifier Standard +\hypertarget{gs1-application-identifier-standard-format}{% +\subsection{GS1 Application Identifier Standard Format}\label{gs1-application-identifier-standard-format}} Certain barcode symbologies (including \protect\hyperlink{gs1-128}{GS1-128}, -\protect\hyperlink{gs1-databar-omnidirectional}{GS1 DataBar -Omnidirectional}, \protect\hyperlink{gs1-datamatrix}{GS1 DataMatrix}, +\protect\hyperlink{gs1-databar-expanded}{GS1 DataBar Expanded}, +\protect\hyperlink{gs1-datamatrix}{GS1 DataMatrix}, \protect\hyperlink{gs1-qr-code}{GS1 QR Code} and \protect\hyperlink{gs1-composite-symbols}{GS1 Composite Symbols}) represent standardized GS1 data and require that their data field is @@ -5102,25 +6290,37 @@ Identifier standard format will take care of parsing the input and inserting any necessary \emph{FNC1} characters to delimit variable length fields. +Note: Instances of parentheses, \texttt{(} and \texttt{)}, within +Application Identifier values in the input must be escaped using the +\protect\hyperlink{input-processingux5cux23parse}{\texttt{parse} option} +as \texttt{\^{}040} and \texttt{\^{}041}, respectively. + +\hypertarget{gs1-application-identifier-linting}{% \paragraph{GS1 Application Identifier -Definitions}\label{gs1-application-identifier-definitions} +Linting}\label{gs1-application-identifier-linting}} -The Application Identifier definitions are provided in the +The input is checked against the structural rules for the GS1 +Application Identifiers, as described in +\href{https://www.linkedin.com/pulse/gs1-application-identifier-syntax-dictionary-terry-burton/}{this +article}, unless the \textbf{dontlint} option is given. The Application +Identifier definitions are provided in the \href{http://www.gs1.org/barcodes-epcrfid-id-keys/gs1-general-specifications}{GS1 -General Specifications}. A summary is available -\href{http://en.wikipedia.org/wiki/GS1-128\#Full_list_of_Application_Identifiers}{here} -however this may be out of date. +General Specifications}. -\section{Options Reference}\label{options-reference} +\hypertarget{options-reference}{% +\section{Options Reference}\label{options-reference}} -\subsection{Check Digits}\label{check-digits} +\hypertarget{check-digits}{% +\subsection{Check Digits}\label{check-digits}} -\subsubsection{includecheck}\label{includecheck} +\hypertarget{includecheck}{% +\subsubsection{includecheck}\label{includecheck}} Generate check digit(s) for symbologies where the use of check digits is optional. -\paragraph{Example}\label{example-21} +\hypertarget{example-25}{% +\paragraph{Example}\label{example-25}} Calculate the optional check characters of this Code 93 symbol: @@ -5132,11 +6332,13 @@ Encoder: code93 \includegraphics{images/optincludecheck.eps} -\subsubsection{includecheckintext}\label{includecheckintext} +\hypertarget{includecheckintext}{% +\subsubsection{includecheckintext}\label{includecheckintext}} Show the calculated check digit in the human readable text. -\paragraph{Notes}\label{notes} +\hypertarget{notes}{% +\paragraph{Notes}\label{notes}} \begin{itemize} \tightlist @@ -5148,7 +6350,8 @@ Show the calculated check digit in the human readable text. then that part is not displayed. \end{itemize} -\paragraph{Example}\label{example-22} +\hypertarget{example-26}{% +\paragraph{Example}\label{example-26}} Display the check digit of this Royal Mail barcode: @@ -5160,16 +6363,72 @@ Encoder: royalmail \includegraphics{images/optincludecheckintext.eps} -\subsection{Input Processing}\label{input-processing} +\hypertarget{input-processing}{% +\subsection{Input Processing}\label{input-processing}} -\subsubsection{parse}\label{parse} +\hypertarget{parse}{% +\subsubsection{parse}\label{parse}} In supporting barcode symbologies, when the \emph{parse} option is specified, any instances of \texttt{\^{}NNN} in the data field are replaced with their equivalent ASCII value, useful for specifying unprintable characters. -\paragraph{Example}\label{example-23} +Additionally, control character names can be used to specify equivalent +ASCII values, as follows: + +\begin{longtable}[]{@{}lr@{}} +\toprule() +Sequence & ASCII value \\ +\midrule() +\endhead +\texttt{\^{}NUL} & 0 \\ +\texttt{\^{}SOH} & 1 \\ +\texttt{\^{}STX} & 2 \\ +\texttt{\^{}ETX} & 3 \\ +\texttt{\^{}EOT} & 4 \\ +\texttt{\^{}ENQ} & 5 \\ +\texttt{\^{}ACK} & 6 \\ +\texttt{\^{}BEL} & 7 \\ +\texttt{\^{}BS} & 8 \\ +\texttt{\^{}TAB} & 9 \\ +\texttt{\^{}LF} & 10 \\ +\texttt{\^{}VT} & 11 \\ +\texttt{\^{}FF} & 12 \\ +\texttt{\^{}CR} & 13 \\ +\texttt{\^{}DLE} & 16 \\ +\texttt{\^{}DC1} & 17 \\ +\texttt{\^{}DC2} & 18 \\ +\texttt{\^{}DC3} & 19 \\ +\texttt{\^{}DC4} & 20 \\ +\texttt{\^{}NAK} & 21 \\ +\texttt{\^{}SYN} & 22 \\ +\texttt{\^{}ETB} & 23 \\ +\texttt{\^{}CAN} & 24 \\ +\texttt{\^{}EM} & 25 \\ +\texttt{\^{}SUB} & 26 \\ +\texttt{\^{}ESC} & 27 \\ +\texttt{\^{}FS} & 28 \\ +\texttt{\^{}GS} & 29 \\ +\texttt{\^{}RS} & 30 \\ +\texttt{\^{}US} & 31 \\ +\bottomrule() +\end{longtable} + +ASCII control characters \texttt{SO} and \texttt{SI} cannot be encoded +by name (since \texttt{SO} would prefix clash with \texttt{SOH}). + +Note: When this option is enabled, literal instances of "\^{}" in the +data should be escaped as \texttt{\^{}094} to avoid replacement if the +subsequent data characters represent a valid substitution. For example, +literal "\^{}123" in the input data can be escaped as +\texttt{\^{}094123}, literal "\^{}RS" in the data can be escaped as +\texttt{\^{}094RS}, and literal "\^{}ABC" in the data cam be escaped as +\texttt{\^{}094ABC} (in case \texttt{\^{}ABC} becomes a valid +substitution in the future). + +\hypertarget{example-27}{% +\paragraph{Example}\label{example-27}} Equivalent symbols: @@ -5187,17 +6446,22 @@ Encoder: datamatrix \includegraphics{images/optparse.eps} -\subsubsection{parsefnc}\label{parsefnc} +\hypertarget{parsefnc}{% +\subsubsection{parsefnc}\label{parsefnc}} In supporting barcode symbologies, when the \textbf{parsefnc} option is specified, non-data function characters can be specified by escaped -combinations such as \texttt{\^{}FNC1}, \texttt{\^{}FNC4} and -\texttt{\^{}SFT/}. +combinations such as \texttt{\^{}FNC1}, \texttt{\^{}FNC4}, +\texttt{\^{}SFT/} and \texttt{\^{}ECI000003}. -\paragraph{Example}\label{example-24} +Note: When this option is enabled, literal instances of \texttt{\^{}} in +the input data can be escaped as \texttt{\^{}\^{}}. -Code 93 including a special shift combination \texttt{(/)A} representing -\emph{!}: +\hypertarget{example-28}{% +\paragraph{Example}\label{example-28}} + +Manually-composed Code 93 Extended demonstrating use of the special +shift combination \texttt{(/)A} to represent \emph{!}: \begin{verbatim} Data: TERRY^SFT/A @@ -5207,13 +6471,16 @@ Encoder: code93 \includegraphics{images/optparsefnc.eps} -\subsection{Symbol Dimensions}\label{symbol-dimensions} +\hypertarget{symbol-dimensions}{% +\subsection{Symbol Dimensions}\label{symbol-dimensions}} -\subsubsection{height}\label{height} +\hypertarget{height}{% +\subsubsection{height}\label{height}} Height of longest bar, in inches. -\paragraph{Example}\label{example-25} +\hypertarget{example-29}{% +\paragraph{Example}\label{example-29}} A 1/2 inch tall EAN-13: @@ -5225,11 +6492,13 @@ Encoder: ean13 \includegraphics{images/optheight.eps} -\subsubsection{width}\label{width} +\hypertarget{width}{% +\subsubsection{width}\label{width}} Stretch the symbol to precisely this width, in inches. -\paragraph{Notes}\label{notes-1} +\hypertarget{notes-1}{% +\paragraph{Notes}\label{notes-1}} \begin{itemize} \tightlist @@ -5241,7 +6510,8 @@ Stretch the symbol to precisely this width, in inches. \protect\hyperlink{resizing-symbols}{resizing symbols}. \end{itemize} -\paragraph{Example}\label{example-26} +\hypertarget{example-30}{% +\paragraph{Example}\label{example-30}} A 2 inch wide Code 93 symbol: @@ -5253,9 +6523,14 @@ Encoder: code93 \includegraphics{images/optwidth.eps} -\subsection{Bar Properties}\label{bar-properties} +\hypertarget{element-properties}{% +\subsection{Element Properties}\label{element-properties}} + +These are options that allow you to compensate for print gain or print +loss resulting from the properties of the printing process or substrate. -\subsubsection{inkspread}\label{inkspread} +\hypertarget{inkspread}{% +\subsubsection{inkspread}\label{inkspread}} For linear barcodes, the amount by which to reduce the bar widths to compensate for inkspread, in points. @@ -5263,7 +6538,8 @@ compensate for inkspread, in points. For matrix barcodes, the amount by which the reduce the width and height of dark modules to compensate for inkspread, in points. -\paragraph{Notes}\label{notes-2} +\hypertarget{notes-2}{% +\paragraph{Notes}\label{notes-2}} \begin{itemize} \tightlist @@ -5271,7 +6547,8 @@ of dark modules to compensate for inkspread, in points. Negative values will increase the bar width. \end{itemize} -\paragraph{Example}\label{example-27} +\hypertarget{example-31}{% +\paragraph{Example}\label{example-31}} Code 39 for a printer with very runny ink: @@ -5283,7 +6560,8 @@ Encoder: code39 \includegraphics{images/optinkspread.eps} -\subsubsection{inkspreadh}\label{inkspreadh} +\hypertarget{inkspreadh}{% +\subsubsection{inkspreadh}\label{inkspreadh}} For matrix barcodes, the amount by which the reduce the width of dark modules to compensate for inkspread, in points. @@ -5291,18 +6569,28 @@ modules to compensate for inkspread, in points. Note: inkspreadh is most useful for stacked-linear type barcodes such as PDF417 and Codablock F. -\subsubsection{inkspreadv}\label{inkspreadv} +\hypertarget{inkspreadv}{% +\subsubsection{inkspreadv}\label{inkspreadv}} For matrix barcodes, the amount by which the reduce the height of dark modules to compensate for inkspread, in points. -\subsection{Text Properties}\label{text-properties} +\hypertarget{dotty}{% +\subsubsection{dotty}\label{dotty}} + +For matrix barcodes, render the modules as dots rather than squares. The +dot radius can be adjusted using the \textbf{inkspread} option. -\subsubsection{includetext}\label{includetext} +\hypertarget{text-properties}{% +\subsection{Text Properties}\label{text-properties}} + +\hypertarget{includetext}{% +\subsubsection{includetext}\label{includetext}} Show human readable text for data in symbol. -\paragraph{Notes}\label{notes-3} +\hypertarget{notes-3}{% +\paragraph{Notes}\label{notes-3}} \begin{itemize} \tightlist @@ -5311,7 +6599,8 @@ Show human readable text for data in symbol. then it is not displayed \end{itemize} -\paragraph{Example}\label{example-28} +\hypertarget{example-32}{% +\paragraph{Example}\label{example-32}} Display the text encoded in this Code 39 symbol: @@ -5323,11 +6612,13 @@ Encoder: code39 \includegraphics{images/optincludetext.eps} -\subsubsection{textfont}\label{textfont} +\hypertarget{textfont}{% +\subsubsection{textfont}\label{textfont}} -The font name for text. +The PostScript font name for text. -\paragraph{Notes}\label{notes-4} +\hypertarget{notes-4}{% +\paragraph{Notes}\label{notes-4}} \begin{itemize} \tightlist @@ -5337,9 +6628,19 @@ The font name for text. \item This option should be used in combination with the \textbf{includetext} option. +\item + The PostScript font name for a font file can be determined with the + following command from the fontconfig library: + + \begin{itemize} + \tightlist + \item + \texttt{fc-scan\ -\/-format\ "\%\{postscriptname\}\textbackslash{}n"\ /usr/share/fonts/truetype/somefont.ttf} + \end{itemize} \end{itemize} -\paragraph{Example}\label{example-29} +\hypertarget{example-33}{% +\paragraph{Example}\label{example-33}} Customise the human readable text of this USPS POSTNET symbol @@ -5351,11 +6652,13 @@ Encoder: postnet \includegraphics{images/opttextfont.eps} -\subsubsection{textsize}\label{textsize} +\hypertarget{textsize}{% +\subsubsection{textsize}\label{textsize}} The font size of the text in points. -\paragraph{Note}\label{note} +\hypertarget{note}{% +\paragraph{Note}\label{note}} \begin{itemize} \tightlist @@ -5364,7 +6667,8 @@ The font size of the text in points. \textbf{includetext} option. \end{itemize} -\paragraph{Example}\label{example-30} +\hypertarget{example-34}{% +\paragraph{Example}\label{example-34}} Customise the human readable text of this USPS POSTNET symbol @@ -5376,11 +6680,13 @@ Encoder: postnet \includegraphics{images/opttextfont.eps} -\subsubsection{textgaps}\label{textgaps} +\hypertarget{textgaps}{% +\subsubsection{textgaps}\label{textgaps}} The inter-character spacing of the text. -\paragraph{Note}\label{note-1} +\hypertarget{note-1}{% +\paragraph{Note}\label{note-1}} \begin{itemize} \tightlist @@ -5389,9 +6695,25 @@ The inter-character spacing of the text. option. \end{itemize} -\subsection{Text Positioning}\label{text-positioning} +\hypertarget{alttext}{% +\subsubsection{alttext}\label{alttext}} -\subsubsection{textxalign}\label{textxalign} +Specify text to display other than what is provided in the data field. + +\hypertarget{note-2}{% +\paragraph{Note}\label{note-2}} + +\begin{itemize} +\tightlist +\item + This option should be used in combination with the includetext option. +\end{itemize} + +\hypertarget{text-positioning}{% +\subsection{Text Positioning}\label{text-positioning}} + +\hypertarget{textxalign}{% +\subsubsection{textxalign}\label{textxalign}} The \textbf{textxalign} option is used to specify where to horizontally position the text. @@ -5412,20 +6734,8 @@ position the text. \texttt{textxalign=justify} \end{itemize} -\paragraph{Notes}\label{notes-5} - -\begin{itemize} -\tightlist -\item - By default (in the absence of \textbf{textxalign} or - \textbf{textyalign}), each character of text is placed immediately - below the corresponding modules where this is possible. -\item - Where there isn't such a direct relationship then the default is to - position the text centrally beneath the symbol. -\end{itemize} - -\subsubsection{textyalign}\label{textyalign} +\hypertarget{textyalign}{% +\subsubsection{textyalign}\label{textyalign}} The \textbf{textyalign} option is used to specify where to vertically position the text. @@ -5440,7 +6750,20 @@ position the text. \texttt{textyalign=above} \end{itemize} -\paragraph{Notes}\label{notes-6} +\hypertarget{textxoffset}{% +\subsubsection{textxoffset}\label{textxoffset}} + +The horizontal position of the text in points relative to the default +position. + +\hypertarget{textyoffset}{% +\subsubsection{textyoffset}\label{textyoffset}} + +The vertical position of the text in points relative to the default +position. + +\hypertarget{notes-5}{% +\paragraph{Notes}\label{notes-5}} \begin{itemize} \tightlist @@ -5449,27 +6772,20 @@ position the text. \textbf{textyalign}), each character of text is placed immediately below the corresponding modules where this is possible. \item - Where there isn't such a direct relationship then the default is to - position the text centrally beneath the symbol. + Where there isn\textquotesingle t such a direct relationship then the + default is to position the text centrally beneath the symbol. \end{itemize} -\subsubsection{textxoffset}\label{textxoffset} - -The horizontal position of the text in points relative to the default -position. - -\subsubsection{textyoffset}\label{textyoffset} - -The vertical position of the text in points relative to the default -position. - -\subsection{Border Properties}\label{border-properties} +\hypertarget{border-properties}{% +\subsection{Border Properties}\label{border-properties}} -\subsubsection{showborder}\label{showborder} +\hypertarget{showborder}{% +\subsubsection{showborder}\label{showborder}} Display a border around the symbol. -\paragraph{Example}\label{example-31} +\hypertarget{example-35}{% +\paragraph{Example}\label{example-35}} Display a customised border around this Codabar symbol: @@ -5481,49 +6797,60 @@ Encoder: rationalizedCodabar \includegraphics{images/optborder.eps} -\subsubsection{borderwidth}\label{borderwidth} +\hypertarget{borderwidth}{% +\subsubsection{borderwidth}\label{borderwidth}} Width of the border, in points. -\subsubsection{borderleft}\label{borderleft} +\hypertarget{borderleft}{% +\subsubsection{borderleft}\label{borderleft}} Gap between the left edge of the border and the symbol, in points. -\subsubsection{borderright}\label{borderright} +\hypertarget{borderright}{% +\subsubsection{borderright}\label{borderright}} Gap between the right edge of the border and the symbol, in points. -\subsubsection{bordertop}\label{bordertop} +\hypertarget{bordertop}{% +\subsubsection{bordertop}\label{bordertop}} Gap between the top edge of the border and the symbol, in points. -\subsubsection{borderbottom}\label{borderbottom} +\hypertarget{borderbottom}{% +\subsubsection{borderbottom}\label{borderbottom}} Gap between the bottom edge of the border and the symbol, in points. -\subsection{Symbol Colors}\label{symbol-colors} +\hypertarget{symbol-colors}{% +\subsection{Symbol Colors}\label{symbol-colors}} -\subsubsection{barcolor}\label{barcolor} +\hypertarget{barcolor}{% +\subsubsection{barcolor}\label{barcolor}} Color of the bars or dark modules, either as a hex \texttt{RRGGBB} value or a hex \texttt{CCMMYYKK} value. -\subsubsection{backgroundcolor}\label{backgroundcolor} +\hypertarget{backgroundcolor}{% +\subsubsection{backgroundcolor}\label{backgroundcolor}} Color of the light background or light modules, either as a hex \texttt{RRGGBB} value or a hex \texttt{CCMMYYKK} value. -\subsubsection{bordercolor}\label{bordercolor} +\hypertarget{bordercolor}{% +\subsubsection{bordercolor}\label{bordercolor}} Color of the border, either as a hex \texttt{RRGGBB} value or a hex \texttt{CCMMYYKK} value. -\subsubsection{textcolor}\label{textcolor} +\hypertarget{textcolor}{% +\subsubsection{textcolor}\label{textcolor}} Color of the respective component, either as a hex \texttt{RRGGBB} value or a hex \texttt{CCMMYYKK} value. -\paragraph{Examples}\label{examples-46} +\hypertarget{examples-52}{% +\paragraph{Examples}\label{examples-52}} Colorized Code 11 symbol using the RGB colour space: @@ -5545,13 +6872,16 @@ Encoder: code11 \includegraphics{images/optcolorcmyk.eps} -\subsection{EAN-UPC Add Ons}\label{ean-upc-add-ons} +\hypertarget{ean-upc-add-ons}{% +\subsection{EAN-UPC Add Ons}\label{ean-upc-add-ons}} -\subsubsection{addontextfont}\label{addontextfont} +\hypertarget{addontextfont}{% +\subsubsection{addontextfont}\label{addontextfont}} The font name of the add on text. -\paragraph{Notes}\label{notes-7} +\hypertarget{notes-6}{% +\paragraph{Notes}\label{notes-6}} \begin{itemize} \tightlist @@ -5562,11 +6892,13 @@ The font name of the add on text. \textbf{includetext} option. \end{itemize} -\subsubsection{addontextsize}\label{addontextsize} +\hypertarget{addontextsize}{% +\subsubsection{addontextsize}\label{addontextsize}} The size of the add on text, in points -\paragraph{Notes}\label{notes-8} +\hypertarget{notes-7}{% +\paragraph{Notes}\label{notes-7}} \begin{itemize} \tightlist @@ -5575,7 +6907,8 @@ The size of the add on text, in points \textbf{includetext} option. \end{itemize} -\paragraph{Example}\label{example-32} +\hypertarget{example-36}{% +\paragraph{Example}\label{example-36}} Customise the human readable text of this USPS POSTNET symbol @@ -5587,23 +6920,28 @@ Encoder: postnet \includegraphics{images/opttextfont.eps} -\subsubsection{addontextxoffset}\label{addontextxoffset} +\hypertarget{addontextxoffset}{% +\subsubsection{addontextxoffset}\label{addontextxoffset}} Overrides the default horizontal positioning of the add on text. -\subsubsection{addontextyoffset}\label{addontextyoffset} +\hypertarget{addontextyoffset}{% +\subsubsection{addontextyoffset}\label{addontextyoffset}} Overrides the default vertical positioning of the add on text. -\subsection{EAN-UPC Guards}\label{ean-upc-guards} +\hypertarget{ean-upc-guards}{% +\subsection{EAN-UPC Guards}\label{ean-upc-guards}} -\subsubsection{guardwhitespace}\label{guardwhitespace} +\hypertarget{guardwhitespace}{% +\subsubsection{guardwhitespace}\label{guardwhitespace}} -Display white space guards. +Display whitespace guards. -\paragraph{Example}\label{example-33} +\hypertarget{example-37}{% +\paragraph{Example}\label{example-37}} -ISBN-13 with tiny white space guard: +ISBN-13 with tiny whitespace guard: \begin{verbatim} Data: 978-1-873671-00 @@ -5613,33 +6951,40 @@ Encoder: isbn \includegraphics{images/optguardsize.eps} -\subsubsection{guardwidth}\label{guardwidth} +\hypertarget{guardwidth}{% +\subsubsection{guardwidth}\label{guardwidth}} Width of the whitespace guards, in points. -\subsubsection{guardheight}\label{guardheight} +\hypertarget{guardheight}{% +\subsubsection{guardheight}\label{guardheight}} Height of the whitespace guards, in points. -\subsubsection{guardleftpos}\label{guardleftpos} +\hypertarget{guardleftpos}{% +\subsubsection{guardleftpos}\label{guardleftpos}} Override the default horizontal position of the left whitespace guard. -\subsubsection{guardrightpos}\label{guardrightpos} +\hypertarget{guardrightpos}{% +\subsubsection{guardrightpos}\label{guardrightpos}} Override the default horizontal position of the right whitespace guard. -\subsubsection{guardleftypos}\label{guardleftypos} +\hypertarget{guardleftypos}{% +\subsubsection{guardleftypos}\label{guardleftypos}} Override the default vertical position of the left whitespace guard. -\subsubsection{guardrightypos}\label{guardrightypos} +\hypertarget{guardrightypos}{% +\subsubsection{guardrightypos}\label{guardrightypos}} Override the default vertical position of the right whitespace guard. -\paragraph{Example}\label{example-34} +\hypertarget{example-38}{% +\paragraph{Example}\label{example-38}} -EAN-8 with very mangled white space guards: +EAN-8 with very mangled whitespace guards: \begin{verbatim} Data: 01335583 diff --git a/graphics/pstricks/contrib/pst-barcode/dvips/pst-barcode.pro b/graphics/pstricks/contrib/pst-barcode/dvips/pst-barcode.pro index 0e654a165b..6a6c95c977 100644 --- a/graphics/pstricks/contrib/pst-barcode/dvips/pst-barcode.pro +++ b/graphics/pstricks/contrib/pst-barcode/dvips/pst-barcode.pro @@ -1,9 +1,10 @@ %!PS -%% $Id: pst-barcode.pro 519 2017-08-22 07:47:55Z herbert $ -% Barcode Writer in Pure PostScript - Version 2017-04-04 -% http://bwipp.terryburton.co.uk +%% $Id: pst-barcode.pro 588 2022-08-23 16:49:51Z herbert $ + +% Barcode Writer in Pure PostScript - Version 2022-08-21 +% https://bwipp.terryburton.co.uk % -% Copyright (c) 2004-2017 Terry Burton +% Copyright (c) 2004-2022 Terry Burton % % Permission is hereby granted, free of charge, to any % person obtaining a copy of this software and associated @@ -28,9 +29,11 @@ % CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN % CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS % IN THE SOFTWARE. + % --BEGIN TEMPLATE-- + % --BEGIN RESOURCE preamble-- -%%BeginResource: Category uk.co.terryburton.bwipp 0.0 2017040400 29725 32822 +%%BeginResource: Category uk.co.terryburton.bwipp 0.0 2022082100 29733 32838 %%BeginData: 6 ASCII Lines currentglobal true setglobal @@ -42,20 +45,77 @@ setglobal %%EndResource % --END RESOURCE preamble-- -% --BEGIN RESOURCE raiseerror-- +% --BEGIN RESOURCE loadctx-- % --REQUIRES preamble-- -%%BeginResource: uk.co.terryburton.bwipp raiseerror 0.0 2017040400 153316 39839 -%%BeginData: 13 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp loadctx 0.0 2022082100 40205 39999 +%%BeginData: 25 ASCII Lines /setpacking where {pop currentpacking true setpacking} if 1 dict begin +/loadctx { + % Place a context dictionary just below the current dictionary, which can + % be populated with static data on the first run and then carried between + % invocations of the encoder + /ctxname exch def + ctx null ne { + ctx ctxname known not { + ctx ctxname 10 dict put + /ctxdef {ctx ctxname get begin exec end} def + } { + /ctxdef {pop} def % No need to redefine within the existing context + } ifelse + currentdict ctx ctxname get end begin begin + } { + /ctxdef {exec} def % No context provided, so define ephemerally + } ifelse +} +[/barcode] {null def} forall +bind def +/loadctx dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END RESOURCE loadctx-- + +% --BEGIN RESOURCE unloadctx-- +% --REQUIRES preamble-- +%%BeginResource: uk.co.terryburton.bwipp unloadctx 0.0 2022082100 38856 38677 +%%BeginData: 14 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +1 dict +begin +/unloadctx { + % Remove the context which is expected to be just underneath currentdict + ctx null ne { + currentdict end end begin + } if +} +[/barcode] {null def} forall +bind def +/unloadctx dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END RESOURCE unloadctx-- + +% --BEGIN RESOURCE raiseerror-- +% --REQUIRES preamble-- +%%BeginResource: uk.co.terryburton.bwipp raiseerror 0.0 2022082100 39029 38860 +%%BeginData: 15 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +begin /raiseerror { - $error exch /errorinfo exch put - $error exch /errorname exch put - $error /command null put - $error /newerror true put - stop -} bind def + $error exch /errorinfo exch put + $error exch /errorname exch put + $error /command null put + $error /newerror true put + stop +} +[/barcode] {null def} forall +bind def /raiseerror dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -63,12 +123,3111 @@ end %%EndResource % --END RESOURCE raiseerror-- +% --BEGIN RESOURCE parseinput-- +% --REQUIRES preamble loadctx unloadctx raiseerror-- +%%BeginResource: uk.co.terryburton.bwipp parseinput 0.0 2022082100 73377 69190 +%%BeginData: 174 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +begin +/parseinput { + + 20 dict begin + + /parseinput //loadctx exec + + /fncvals exch def + /barcode exch def + + /parse dup dup fncvals exch get def fncvals exch undef + /parsefnc dup dup fncvals exch get def fncvals exch undef + /parseonly dup dup fncvals exch known def fncvals exch undef + /eci dup dup fncvals exch known def fncvals exch undef + + % Control character names to ordinals +{ + << + [ + /NUL /SOH /STX /ETX /EOT /ENQ /ACK /BEL + /BS /TAB /LF /VT /FF /CR () () % SO and SI prefix clash with SOH + /DLE /DC1 /DC2 /DC3 /DC4 /NAK /SYN /ETB + /CAN /EM /SUB /ESC /FS /GS /RS /US + ] + 0 exch { + 1 index 1 add 3 1 roll exch 3 -1 roll + } forall pop + >> /ctrl exch def +} ctxdef + + /msg barcode length array def + /j 0 def + barcode { % loop + (^) search exch + % Copy characters up to a "^" + dup length exch + msg exch j exch [ exch {} forall ] putinterval + j add /j exch def + { % Found a "^" escape character + pop + 1 { % common exit + + parse not parsefnc not and { % "^" as is + msg j 94 put + /j j 1 add def + exit + } if + + % Encode "^" to start with + msg j 94 put + /j j 1 add def + + % parse + parse { + dup length 3 ge { % "^XXX" byte + dup 0 3 getinterval ctrl exch + 2 copy known { + /j j 1 sub def % Replace "^" with ordinal + get msg exch j exch put + /j j 1 add def + dup length 3 sub 3 exch getinterval + exit + } { + pop pop + } ifelse + } if + dup length 2 ge { % "^XX" to byte + dup 0 2 getinterval ctrl exch + 2 copy known { + /j j 1 sub def % Replace "^" with ordinal + get msg exch j exch put + /j j 1 add def + dup length 2 sub 2 exch getinterval + exit + } { + pop pop + } ifelse + } if + dup length 3 ge { % "^NNN" to byte + dup 0 3 getinterval true exch { + dup 48 lt exch 57 gt or { pop false } if + } forall + { + dup 0 3 getinterval cvi dup 255 gt { + pop pop + /bwipp.invalidOrdinal (Ordinal must be 000 to 255) //raiseerror exec + } if + /j j 1 sub def % Replace "^" with ordinal + msg exch j exch put + /j j 1 add def + dup length 3 sub 3 exch getinterval + } if + } if + } if + + parseonly + parsefnc not or + msg j 1 sub get 94 ne % Carat was substituted away + or {exit} if + + % parsefnc + /j j 1 sub def + dup length 3 lt { + pop + /bwipp.truncatedFNC (Function character truncated) //raiseerror exec + } if + dup 0 get 94 eq { % "^^" -> "^" + msg j 94 put + /j j 1 add def + dup length 1 sub 1 exch getinterval + exit + } if + dup 0 3 getinterval (ECI) eq eci and { % "^ECInnnnnn" -> -1nnnnnn + dup length 9 lt { + pop + /bwipp.truncatedECI (ECI truncated) //raiseerror exec + } if + dup 3 6 getinterval + dup { + dup 48 lt exch 57 gt or { + pop pop + /bwipp.invalidECI (ECI must be 000000 to 999999) //raiseerror exec + } if + } forall + 0 exch {48 sub sub 10 mul} forall 10 idiv 1000000 sub + msg exch j exch put + /j j 1 add def + dup length 9 sub 9 exch getinterval + exit + } if + dup length 4 lt { % "^FNCx" -> fncvals{FNCx} + pop + /bwipp.truncatedFNC (Function character truncated) //raiseerror exec + } if + dup 0 4 getinterval dup fncvals exch known not { + dup length 28 add string dup 28 4 -1 roll putinterval + dup 0 (Unknown function character: ) putinterval + exch pop + /bwipp.unknownFNC exch //raiseerror exec + } if + fncvals exch get + msg exch j exch put + /j j 1 add def + dup length 4 sub 4 exch getinterval + exit + + } repeat + } { % No more "^" characters + exit + } ifelse + } loop + + parseonly not { + msg 0 j getinterval + } { + j string + 0 1 j 1 sub { 1 index exch dup msg exch get put } for + } ifelse + + //unloadctx exec + + end + +} +[/barcode] {null def} forall +bind def +/parseinput dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END RESOURCE parseinput-- + +% --BEGIN RESOURCE gs1process-- +% --REQUIRES preamble loadctx unloadctx parseinput raiseerror-- +%%BeginResource: uk.co.terryburton.bwipp gs1process 0.0 2022082100 526019 593612 +%%BeginData: 2909 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +begin +/gs1process { + + 20 dict begin + + /gs1process //loadctx exec + +{ + % Extracted from the GS1 Syntax Dictionary + /gs1syntax << + + << + /parts [ + << /cset /N /min 18 /max 18 /opt false /linters [ /lintcsum /lintkey ] >> + ] + /dlpkey [ ] + >> + (00) exch dup + pop + + << + /parts [ + << /cset /N /min 14 /max 14 /opt false /linters [ /lintcsum /lintkey ] >> + ] + /ex [ (02) (255) (37) ] + /dlpkey [ [ (22) (10) (21) ] [ (235) ] ] + >> + (01) exch dup + pop + + << + /parts [ + << /cset /N /min 14 /max 14 /opt false /linters [ /lintcsum /lintkey ] >> + ] + /req [ [ (37) ] ] + >> + (02) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (01) (02) (8006) (8026) ] ] + >> + (10) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [ /lintyymmd0 ] >> + ] + /req [ [ (01) (02) (8006) (8026) ] ] + >> + (11) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [ /lintyymmd0 ] >> + ] + /req [ [ (8020) ] ] + >> + (12) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [ /lintyymmd0 ] >> + ] + /req [ [ (01) (02) (8006) (8026) ] ] + >> + (13) exch dup + (15) exch dup + (16) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [ /lintyymmd0 ] >> + ] + /req [ [ (01) (02) (255) (8006) (8026) ] ] + >> + (17) exch dup + pop + + << + /parts [ + << /cset /N /min 2 /max 2 /opt false /linters [] >> + ] + /req [ [ (01) (02) (8006) (8026) ] ] + >> + (20) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /ex [ (235) ] + /req [ [ (01) (8006) ] ] + >> + (21) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (01) ] ] + >> + (22) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 28 /opt false /linters [] >> + ] + /req [ [ (01) ] ] + >> + (235) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [] >> + ] + /req [ [ (01) (02) (8006) (8026) ] ] + >> + (240) exch dup + (241) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 6 /opt false /linters [] >> + ] + /req [ [ (01) (02) (8006) (8026) ] ] + >> + (242) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (01) ] ] + >> + (243) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [] >> + ] + /req [ [ (01) (8006) ] [ (21) ] ] + >> + (250) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [] >> + ] + /req [ [ (01) (8006) ] ] + >> + (251) exch dup + pop + + << + /parts [ + << /cset /N /min 13 /max 13 /opt false /linters [ /lintcsum /lintkey ] >> + << /cset /X /min 1 /max 17 /opt true /linters [] >> + ] + /dlpkey [ ] + >> + (253) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (414) ] ] + >> + (254) exch dup + pop + + << + /parts [ + << /cset /N /min 13 /max 13 /opt false /linters [ /lintcsum /lintkey ] >> + << /cset /N /min 1 /max 12 /opt true /linters [] >> + ] + /ex [ (01) (02) (415) (8006) (8020) (8026) ] + /dlpkey [ ] + >> + (255) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 8 /opt false /linters [] >> + ] + /req [ [ (01) (02) ] ] + >> + (30) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (310n) ] + /req [ [ (01) (02) ] ] + >> + (3100) exch dup + (3101) exch dup + (3102) exch dup + (3103) exch dup + (3104) exch dup + (3105) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (311n) ] + /req [ [ (01) (02) ] ] + >> + (3110) exch dup + (3111) exch dup + (3112) exch dup + (3113) exch dup + (3114) exch dup + (3115) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (312n) ] + /req [ [ (01) (02) ] ] + >> + (3120) exch dup + (3121) exch dup + (3122) exch dup + (3123) exch dup + (3124) exch dup + (3125) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (313n) ] + /req [ [ (01) (02) ] ] + >> + (3130) exch dup + (3131) exch dup + (3132) exch dup + (3133) exch dup + (3134) exch dup + (3135) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (314n) ] + /req [ [ (01) (02) ] ] + >> + (3140) exch dup + (3141) exch dup + (3142) exch dup + (3143) exch dup + (3144) exch dup + (3145) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (315n) ] + /req [ [ (01) (02) ] ] + >> + (3150) exch dup + (3151) exch dup + (3152) exch dup + (3153) exch dup + (3154) exch dup + (3155) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (316n) ] + /req [ [ (01) (02) ] ] + >> + (3160) exch dup + (3161) exch dup + (3162) exch dup + (3163) exch dup + (3164) exch dup + (3165) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (320n) ] + /req [ [ (01) (02) ] ] + >> + (3200) exch dup + (3201) exch dup + (3202) exch dup + (3203) exch dup + (3204) exch dup + (3205) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (321n) ] + /req [ [ (01) (02) ] ] + >> + (3210) exch dup + (3211) exch dup + (3212) exch dup + (3213) exch dup + (3214) exch dup + (3215) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (322n) ] + /req [ [ (01) (02) ] ] + >> + (3220) exch dup + (3221) exch dup + (3222) exch dup + (3223) exch dup + (3224) exch dup + (3225) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (323n) ] + /req [ [ (01) (02) ] ] + >> + (3230) exch dup + (3231) exch dup + (3232) exch dup + (3233) exch dup + (3234) exch dup + (3235) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (324n) ] + /req [ [ (01) (02) ] ] + >> + (3240) exch dup + (3241) exch dup + (3242) exch dup + (3243) exch dup + (3244) exch dup + (3245) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (325n) ] + /req [ [ (01) (02) ] ] + >> + (3250) exch dup + (3251) exch dup + (3252) exch dup + (3253) exch dup + (3254) exch dup + (3255) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (326n) ] + /req [ [ (01) (02) ] ] + >> + (3260) exch dup + (3261) exch dup + (3262) exch dup + (3263) exch dup + (3264) exch dup + (3265) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (327n) ] + /req [ [ (01) (02) ] ] + >> + (3270) exch dup + (3271) exch dup + (3272) exch dup + (3273) exch dup + (3274) exch dup + (3275) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (328n) ] + /req [ [ (01) (02) ] ] + >> + (3280) exch dup + (3281) exch dup + (3282) exch dup + (3283) exch dup + (3284) exch dup + (3285) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (329n) ] + /req [ [ (01) (02) ] ] + >> + (3290) exch dup + (3291) exch dup + (3292) exch dup + (3293) exch dup + (3294) exch dup + (3295) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (330n) ] + /req [ [ (00) (01) ] ] + >> + (3300) exch dup + (3301) exch dup + (3302) exch dup + (3303) exch dup + (3304) exch dup + (3305) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (331n) ] + /req [ [ (00) (01) ] ] + >> + (3310) exch dup + (3311) exch dup + (3312) exch dup + (3313) exch dup + (3314) exch dup + (3315) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (332n) ] + /req [ [ (00) (01) ] ] + >> + (3320) exch dup + (3321) exch dup + (3322) exch dup + (3323) exch dup + (3324) exch dup + (3325) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (333n) ] + /req [ [ (00) (01) ] ] + >> + (3330) exch dup + (3331) exch dup + (3332) exch dup + (3333) exch dup + (3334) exch dup + (3335) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (334n) ] + /req [ [ (00) (01) ] ] + >> + (3340) exch dup + (3341) exch dup + (3342) exch dup + (3343) exch dup + (3344) exch dup + (3345) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (335n) ] + /req [ [ (00) (01) ] ] + >> + (3350) exch dup + (3351) exch dup + (3352) exch dup + (3353) exch dup + (3354) exch dup + (3355) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (336n) ] + /req [ [ (00) (01) ] ] + >> + (3360) exch dup + (3361) exch dup + (3362) exch dup + (3363) exch dup + (3364) exch dup + (3365) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (337n) ] + /req [ [ (01) ] ] + >> + (3370) exch dup + (3371) exch dup + (3372) exch dup + (3373) exch dup + (3374) exch dup + (3375) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (340n) ] + /req [ [ (00) (01) ] ] + >> + (3400) exch dup + (3401) exch dup + (3402) exch dup + (3403) exch dup + (3404) exch dup + (3405) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (341n) ] + /req [ [ (00) (01) ] ] + >> + (3410) exch dup + (3411) exch dup + (3412) exch dup + (3413) exch dup + (3414) exch dup + (3415) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (342n) ] + /req [ [ (00) (01) ] ] + >> + (3420) exch dup + (3421) exch dup + (3422) exch dup + (3423) exch dup + (3424) exch dup + (3425) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (343n) ] + /req [ [ (00) (01) ] ] + >> + (3430) exch dup + (3431) exch dup + (3432) exch dup + (3433) exch dup + (3434) exch dup + (3435) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (344n) ] + /req [ [ (00) (01) ] ] + >> + (3440) exch dup + (3441) exch dup + (3442) exch dup + (3443) exch dup + (3444) exch dup + (3445) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (345n) ] + /req [ [ (00) (01) ] ] + >> + (3450) exch dup + (3451) exch dup + (3452) exch dup + (3453) exch dup + (3454) exch dup + (3455) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (346n) ] + /req [ [ (00) (01) ] ] + >> + (3460) exch dup + (3461) exch dup + (3462) exch dup + (3463) exch dup + (3464) exch dup + (3465) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (347n) ] + /req [ [ (00) (01) ] ] + >> + (3470) exch dup + (3471) exch dup + (3472) exch dup + (3473) exch dup + (3474) exch dup + (3475) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (348n) ] + /req [ [ (00) (01) ] ] + >> + (3480) exch dup + (3481) exch dup + (3482) exch dup + (3483) exch dup + (3484) exch dup + (3485) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (349n) ] + /req [ [ (00) (01) ] ] + >> + (3490) exch dup + (3491) exch dup + (3492) exch dup + (3493) exch dup + (3494) exch dup + (3495) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (350n) ] + /req [ [ (01) (02) ] ] + >> + (3500) exch dup + (3501) exch dup + (3502) exch dup + (3503) exch dup + (3504) exch dup + (3505) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (351n) ] + /req [ [ (01) (02) ] ] + >> + (3510) exch dup + (3511) exch dup + (3512) exch dup + (3513) exch dup + (3514) exch dup + (3515) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (352n) ] + /req [ [ (01) (02) ] ] + >> + (3520) exch dup + (3521) exch dup + (3522) exch dup + (3523) exch dup + (3524) exch dup + (3525) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (353n) ] + /req [ [ (00) (01) ] ] + >> + (3530) exch dup + (3531) exch dup + (3532) exch dup + (3533) exch dup + (3534) exch dup + (3535) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (354n) ] + /req [ [ (00) (01) ] ] + >> + (3540) exch dup + (3541) exch dup + (3542) exch dup + (3543) exch dup + (3544) exch dup + (3545) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (355n) ] + /req [ [ (00) (01) ] ] + >> + (3550) exch dup + (3551) exch dup + (3552) exch dup + (3553) exch dup + (3554) exch dup + (3555) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (356n) ] + /req [ [ (01) (02) ] ] + >> + (3560) exch dup + (3561) exch dup + (3562) exch dup + (3563) exch dup + (3564) exch dup + (3565) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (357n) ] + /req [ [ (01) (02) ] ] + >> + (3570) exch dup + (3571) exch dup + (3572) exch dup + (3573) exch dup + (3574) exch dup + (3575) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (360n) ] + /req [ [ (01) (02) ] ] + >> + (3600) exch dup + (3601) exch dup + (3602) exch dup + (3603) exch dup + (3604) exch dup + (3605) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (361n) ] + /req [ [ (01) (02) ] ] + >> + (3610) exch dup + (3611) exch dup + (3612) exch dup + (3613) exch dup + (3614) exch dup + (3615) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (362n) ] + /req [ [ (00) (01) ] ] + >> + (3620) exch dup + (3621) exch dup + (3622) exch dup + (3623) exch dup + (3624) exch dup + (3625) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (363n) ] + /req [ [ (00) (01) ] ] + >> + (3630) exch dup + (3631) exch dup + (3632) exch dup + (3633) exch dup + (3634) exch dup + (3635) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (364n) ] + /req [ [ (01) (02) ] ] + >> + (3640) exch dup + (3641) exch dup + (3642) exch dup + (3643) exch dup + (3644) exch dup + (3645) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (365n) ] + /req [ [ (01) (02) ] ] + >> + (3650) exch dup + (3651) exch dup + (3652) exch dup + (3653) exch dup + (3654) exch dup + (3655) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (366n) ] + /req [ [ (01) (02) ] ] + >> + (3660) exch dup + (3661) exch dup + (3662) exch dup + (3663) exch dup + (3664) exch dup + (3665) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (367n) ] + /req [ [ (00) (01) ] ] + >> + (3670) exch dup + (3671) exch dup + (3672) exch dup + (3673) exch dup + (3674) exch dup + (3675) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (368n) ] + /req [ [ (00) (01) ] ] + >> + (3680) exch dup + (3681) exch dup + (3682) exch dup + (3683) exch dup + (3684) exch dup + (3685) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (369n) ] + /req [ [ (00) (01) ] ] + >> + (3690) exch dup + (3691) exch dup + (3692) exch dup + (3693) exch dup + (3694) exch dup + (3695) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 8 /opt false /linters [] >> + ] + /req [ [ (00) ] [ (02) (8026) ] ] + >> + (37) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 15 /opt false /linters [] >> + ] + /ex [ (390n) (391n) (394n) (8111) ] + /req [ [ (255) (8020) ] ] + >> + (3900) exch dup + (3901) exch dup + (3902) exch dup + (3903) exch dup + (3904) exch dup + (3905) exch dup + (3906) exch dup + (3907) exch dup + (3908) exch dup + (3909) exch dup + pop + + << + /parts [ + << /cset /N /min 3 /max 3 /opt false /linters [ /lintiso4217 ] >> + << /cset /N /min 1 /max 15 /opt false /linters [] >> + ] + /ex [ (391n) ] + /req [ [ (8020) ] ] + >> + (3910) exch dup + (3911) exch dup + (3912) exch dup + (3913) exch dup + (3914) exch dup + (3915) exch dup + (3916) exch dup + (3917) exch dup + (3918) exch dup + (3919) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 15 /opt false /linters [] >> + ] + /ex [ (392n) (393n) ] + /req [ [ (01) ] [ (30) (31nn) (32nn) (35nn) (36nn) ] ] + >> + (3920) exch dup + (3921) exch dup + (3922) exch dup + (3923) exch dup + (3924) exch dup + (3925) exch dup + (3926) exch dup + (3927) exch dup + (3928) exch dup + (3929) exch dup + pop + + << + /parts [ + << /cset /N /min 3 /max 3 /opt false /linters [ /lintiso4217 ] >> + << /cset /N /min 1 /max 15 /opt false /linters [] >> + ] + /ex [ (393n) ] + /req [ [ (30) (31nn) (32nn) (35nn) (36nn) ] ] + >> + (3930) exch dup + (3931) exch dup + (3932) exch dup + (3933) exch dup + (3934) exch dup + (3935) exch dup + (3936) exch dup + (3937) exch dup + (3938) exch dup + (3939) exch dup + pop + + << + /parts [ + << /cset /N /min 4 /max 4 /opt false /linters [] >> + ] + /ex [ (394n) (8111) ] + /req [ [ (255) ] ] + >> + (3940) exch dup + (3941) exch dup + (3942) exch dup + (3943) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /ex [ (392n) (393n) (395n) (8005) ] + /req [ [ (30) (31nn) (32nn) (35nn) (36nn) ] ] + >> + (3950) exch dup + (3951) exch dup + (3952) exch dup + (3953) exch dup + (3954) exch dup + (3955) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [] >> + ] + >> + (400) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [ /lintkey ] >> + ] + /dlpkey [ ] + >> + (401) exch dup + pop + + << + /parts [ + << /cset /N /min 17 /max 17 /opt false /linters [ /lintcsum /lintkey ] >> + ] + /dlpkey [ ] + >> + (402) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [] >> + ] + /req [ [ (00) ] ] + >> + (403) exch dup + pop + + << + /parts [ + << /cset /N /min 13 /max 13 /opt false /linters [ /lintcsum /lintkey ] >> + ] + >> + (410) exch dup + (411) exch dup + (412) exch dup + (413) exch dup + pop + + << + /parts [ + << /cset /N /min 13 /max 13 /opt false /linters [ /lintcsum /lintkey ] >> + ] + /dlpkey [ [ (254) ] [ (7040) ] ] + >> + (414) exch dup + pop + + << + /parts [ + << /cset /N /min 13 /max 13 /opt false /linters [ /lintcsum /lintkey ] >> + ] + /req [ [ (8020) ] ] + >> + (415) exch dup + pop + + << + /parts [ + << /cset /N /min 13 /max 13 /opt false /linters [ /lintcsum /lintkey ] >> + ] + >> + (416) exch dup + pop + + << + /parts [ + << /cset /N /min 13 /max 13 /opt false /linters [ /lintcsum /lintkey ] >> + ] + /dlpkey [ [ (7040) ] ] + >> + (417) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /ex [ (421) ] + >> + (420) exch dup + pop + + << + /parts [ + << /cset /N /min 3 /max 3 /opt false /linters [ /lintiso3166 ] >> + << /cset /X /min 1 /max 9 /opt false /linters [] >> + ] + /ex [ (4307) ] + >> + (421) exch dup + pop + + << + /parts [ + << /cset /N /min 3 /max 3 /opt false /linters [ /lintiso3166 ] >> + ] + /ex [ (426) ] + /req [ [ (01) (02) (8006) (8026) ] ] + >> + (422) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 15 /opt false /linters [ /lintiso3166list ] >> + ] + /ex [ (426) ] + /req [ [ (01) (02) ] ] + >> + (423) exch dup + pop + + << + /parts [ + << /cset /N /min 3 /max 3 /opt false /linters [ /lintiso3166 ] >> + ] + /ex [ (426) ] + /req [ [ (01) (02) ] ] + >> + (424) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 15 /opt false /linters [ /lintiso3166list ] >> + ] + /ex [ (426) ] + /req [ [ (01) (02) ] ] + >> + (425) exch dup + pop + + << + /parts [ + << /cset /N /min 3 /max 3 /opt false /linters [ /lintiso3166 ] >> + ] + /req [ [ (01) (02) ] ] + >> + (426) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 3 /opt false /linters [] >> + ] + /req [ [ (01) (02) ] [ (422) ] ] + >> + (427) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 35 /opt false /linters [ /lintpcenc ] >> + ] + /req [ [ (00) ] ] + >> + (4300) exch dup + (4301) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 70 /opt false /linters [ /lintpcenc ] >> + ] + /req [ [ (00) ] ] + >> + (4302) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 70 /opt false /linters [ /lintpcenc ] >> + ] + /req [ [ (4302) ] ] + >> + (4303) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 70 /opt false /linters [ /lintpcenc ] >> + ] + /req [ [ (00) ] ] + >> + (4304) exch dup + (4305) exch dup + (4306) exch dup + pop + + << + /parts [ + << /cset /X /min 2 /max 2 /opt false /linters [ /lintiso3166alpha2 ] >> + ] + /req [ [ (00) ] ] + >> + (4307) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [] >> + ] + /req [ [ (00) ] ] + >> + (4308) exch dup + pop + + << + /parts [ + << /cset /N /min 20 /max 20 /opt false /linters [ /lintlatlong ] >> + ] + /req [ [ (00) ] ] + >> + (4309) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 35 /opt false /linters [ /lintpcenc ] >> + ] + /req [ [ (00) ] ] + >> + (4310) exch dup + (4311) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 70 /opt false /linters [ /lintpcenc ] >> + ] + /req [ [ (00) ] ] + >> + (4312) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 70 /opt false /linters [ /lintpcenc ] >> + ] + /req [ [ (4312) ] ] + >> + (4313) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 70 /opt false /linters [ /lintpcenc ] >> + ] + /req [ [ (00) ] ] + >> + (4314) exch dup + (4315) exch dup + (4316) exch dup + pop + + << + /parts [ + << /cset /X /min 2 /max 2 /opt false /linters [ /lintiso3166alpha2 ] >> + ] + /req [ [ (00) ] ] + >> + (4317) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (00) ] ] + >> + (4318) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [] >> + ] + /req [ [ (00) ] ] + >> + (4319) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 35 /opt false /linters [ /lintpcenc ] >> + ] + /req [ [ (00) ] ] + >> + (4320) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 1 /opt false /linters [ /lintyesno ] >> + ] + /req [ [ (00) ] ] + >> + (4321) exch dup + (4322) exch dup + (4323) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [ /lintyymmd0 ] >> + << /cset /N /min 4 /max 4 /opt false /linters [ /linthhmm ] >> + ] + /req [ [ (00) ] ] + >> + (4324) exch dup + (4325) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [ /lintyymmdd ] >> + ] + /req [ [ (00) ] ] + >> + (4326) exch dup + pop + + << + /parts [ + << /cset /N /min 13 /max 13 /opt false /linters [] >> + ] + /req [ [ (01) (02) (8006) (8026) ] ] + >> + (7001) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [] >> + ] + /req [ [ (01) (02) ] ] + >> + (7002) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [ /lintyymmdd ] >> + << /cset /N /min 4 /max 4 /opt false /linters [ /linthhmm ] >> + ] + /req [ [ (01) (02) ] ] + >> + (7003) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 4 /opt false /linters [] >> + ] + /req [ [ (01) ] [ (10) ] ] + >> + (7004) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 12 /opt false /linters [] >> + ] + /req [ [ (01) (02) ] ] + >> + (7005) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [ /lintyymmdd ] >> + ] + /req [ [ (01) (02) ] ] + >> + (7006) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [ /lintyymmdd ] >> + << /cset /N /min 6 /max 6 /opt true /linters [ /lintyymmdd ] >> + ] + /req [ [ (01) (02) ] ] + >> + (7007) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 3 /opt false /linters [] >> + ] + /req [ [ (01) (02) ] ] + >> + (7008) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 10 /opt false /linters [] >> + ] + /req [ [ (01) (02) ] ] + >> + (7009) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 2 /opt false /linters [] >> + ] + /req [ [ (01) (02) ] ] + >> + (7010) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [ /lintyymmdd ] >> + << /cset /N /min 4 /max 4 /opt true /linters [ /linthhmm ] >> + ] + /req [ [ (01) (02) ] ] + >> + (7011) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (01) (8006) ] [ (416) ] ] + >> + (7020) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (01) (8006) ] ] + >> + (7021) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (7021) ] ] + >> + (7022) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [ /lintkey ] >> + ] + >> + (7023) exch dup + pop + + << + /parts [ + << /cset /N /min 3 /max 3 /opt false /linters [ /lintiso3166999 ] >> + << /cset /X /min 1 /max 27 /opt false /linters [] >> + ] + /req [ [ (01) (02) ] ] + >> + (7030) exch dup + (7031) exch dup + (7032) exch dup + (7033) exch dup + (7034) exch dup + (7035) exch dup + (7036) exch dup + (7037) exch dup + (7038) exch dup + (7039) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 1 /opt false /linters [] >> + << /cset /X /min 1 /max 1 /opt false /linters [] >> + << /cset /X /min 1 /max 1 /opt false /linters [] >> + << /cset /X /min 1 /max 1 /opt false /linters [ /lintimporteridx ] >> + ] + >> + (7040) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (01) ] ] + >> + (710) exch dup + (711) exch dup + (712) exch dup + (713) exch dup + (714) exch dup + (715) exch dup + pop + + << + /parts [ + << /cset /X /min 2 /max 2 /opt false /linters [] >> + << /cset /X /min 1 /max 28 /opt false /linters [] >> + ] + /req [ [ (01) (8004) ] ] + >> + (7230) exch dup + (7231) exch dup + (7232) exch dup + (7233) exch dup + (7234) exch dup + (7235) exch dup + (7236) exch dup + (7237) exch dup + (7238) exch dup + (7239) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (01) (8006) ] ] + >> + (7240) exch dup + pop + + << + /parts [ + << /cset /N /min 4 /max 4 /opt false /linters [ /lintnonzero ] >> + << /cset /N /min 5 /max 5 /opt false /linters [ /lintnonzero ] >> + << /cset /N /min 3 /max 3 /opt false /linters [ /lintnonzero ] >> + << /cset /N /min 1 /max 1 /opt false /linters [ /lintwinding ] >> + << /cset /N /min 1 /max 1 /opt false /linters [] >> + ] + /req [ [ (01) ] ] + >> + (8001) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + >> + (8002) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 1 /opt false /linters [ /lintzero ] >> + << /cset /N /min 13 /max 13 /opt false /linters [ /lintcsum /lintkey ] >> + << /cset /X /min 1 /max 16 /opt true /linters [] >> + ] + /dlpkey [ ] + >> + (8003) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [ /lintkey ] >> + ] + /dlpkey [ [ (7040) ] ] + >> + (8004) exch dup + pop + + << + /parts [ + << /cset /N /min 6 /max 6 /opt false /linters [] >> + ] + /req [ [ (01) (02) ] ] + >> + (8005) exch dup + pop + + << + /parts [ + << /cset /N /min 14 /max 14 /opt false /linters [ /lintcsum ] >> + << /cset /N /min 4 /max 4 /opt false /linters [ /lintpieceoftotal ] >> + ] + /ex [ (01) (37) ] + /dlpkey [ [ (22) (10) (21) ] ] + >> + (8006) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 34 /opt false /linters [ /lintiban ] >> + ] + /req [ [ (415) ] ] + >> + (8007) exch dup + pop + + << + /parts [ + << /cset /N /min 8 /max 8 /opt false /linters [ /lintyymmddhh ] >> + << /cset /N /min 1 /max 4 /opt true /linters [ /lintmmoptss ] >> + ] + /req [ [ (01) (02) ] ] + >> + (8008) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 50 /opt false /linters [] >> + ] + /req [ [ (00) (01) ] ] + >> + (8009) exch dup + pop + + << + /parts [ + << /cset /Y /min 1 /max 30 /opt false /linters [ /lintkey ] >> + ] + /dlpkey [ [ (8011) ] ] + >> + (8010) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 12 /opt false /linters [ /lintnozeroprefix ] >> + ] + /req [ [ (8010) ] ] + >> + (8011) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 20 /opt false /linters [] >> + ] + /req [ [ (01) (8006) ] ] + >> + (8012) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 25 /opt false /linters [ /lintcsumalpha /lintkey ] >> + ] + /dlpkey [ ] + >> + (8013) exch dup + pop + + << + /parts [ + << /cset /N /min 18 /max 18 /opt false /linters [ /lintcsum ] >> + ] + /dlpkey [ [ (8019) ] ] + >> + (8017) exch dup + pop + + << + /parts [ + << /cset /N /min 18 /max 18 /opt false /linters [ /lintcsum ] >> + ] + /ex [ (8017) ] + /dlpkey [ [ (8019) ] ] + >> + (8018) exch dup + pop + + << + /parts [ + << /cset /N /min 1 /max 10 /opt false /linters [] >> + ] + /req [ [ (8017) (8018) ] ] + >> + (8019) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 25 /opt false /linters [] >> + ] + /req [ [ (415) ] ] + >> + (8020) exch dup + pop + + << + /parts [ + << /cset /N /min 14 /max 14 /opt false /linters [ /lintcsum ] >> + << /cset /N /min 4 /max 4 /opt false /linters [ /lintpieceoftotal ] >> + ] + /ex [ (02) (8006) ] + /req [ [ (37) ] ] + >> + (8026) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 70 /opt false /linters [ /lintcouponcode ] >> + ] + >> + (8110) exch dup + pop + + << + /parts [ + << /cset /N /min 4 /max 4 /opt false /linters [] >> + ] + /req [ [ (255) ] ] + >> + (8111) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 70 /opt false /linters [ /lintcouponposoffer ] >> + ] + >> + (8112) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 70 /opt false /linters [] >> + ] + /req [ [ (01) ] ] + >> + (8200) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 30 /opt false /linters [] >> + ] + >> + (90) exch dup + pop + + << + /parts [ + << /cset /X /min 1 /max 90 /opt false /linters [] >> + ] + >> + (91) exch dup + (92) exch dup + (93) exch dup + (94) exch dup + (95) exch dup + (96) exch dup + (97) exch dup + (98) exch dup + (99) exch dup + pop + + >> def +} ctxdef + + % Extract AIs and vals from provided GS1 data in the indicated format + + /ai eq { % Bracketed AI element string + + % Parse out AIs and values + (\() anchorsearch not { + pop /bwipp.GS1aiMissingOpenParen (AIs must start with '\(') //raiseerror exec + } if + pop + mark exch { % loop + dup () eq {pop exit} if + (\)) search not { + cleartomark /bwipp.GS1aiMissingCloseParen (AIs must end with '\)') //raiseerror exec + } if + exch pop exch + (\() search { exch pop exch } { () } ifelse + } loop + counttomark dup 0 gt {dup 2 idiv 1 add -1 exch {-1 roll} for} {pop} ifelse + counttomark 2 idiv array astore /ais exch def + counttomark array astore [ exch { % Expand ordinals of the form ^NNN to ASCII + << /parse parse /parseonly true /parsefnc false >> //parseinput exec + } forall ] /vals exch def + pop + + } { % Digital Link URI + + % Validate and strip the scheme + (http://) anchorsearch not { + (https://) anchorsearch not { + pop /bwipp.GS1dlURIbadScheme (Scheme must be http:// or https://) //raiseerror exec + } if} if + pop + + % Strip the domain + (/) search not { + pop /bwipp.GS1dlMissingDomainOrPathInfo (URI must contain a domain and path info) //raiseerror exec + } if + pop pop + + % Fragment delimits end of data + (#) search { + exch pop exch pop + } if + + % Query parameter marker splits path info and query parameters + (?) search not { + () exch null exch + } if + /pp exch def + pop + /qp exch def + + % Find positions of character immediately following "/" in the path info + mark 0 + 0 pp { + (/) search not {pop exit} if + length 1 add exch pop 2 index add exch + } loop + counttomark 1 sub array astore /pipos exch def pop pop + pipos length 1 le { + /bwipp.GS1dlNoAIinfo (The path was too short to contain AI info) //raiseerror exec + } if + + % Walk backwards to find the right-most path element that is a valid dlpkey + false + pipos length 2 sub -2 0 { + dup + dup pipos exch get + exch pipos exch 1 add get 1 index sub 1 sub pp 3 1 roll getinterval + dup gs1syntax exch known { + gs1syntax exch get /dlpkey known { + exch pop true exit + } if + } { + pop + } ifelse + pop + } for + not { + /bwipp.GS1dlNoAIinfo (The path does not contain a valid primary key) //raiseerror exec + } if + pipos exch get dup pp length exch sub pp 3 1 roll getinterval /pp exch def + + /uriunescape { + /in exch def + /out in length string def + 0 0 { + 1 index in length ge {exit} if + in 2 index get + dup 43 eq { % "+" -> " " + pop out 1 index 32 put + 1 add exch 1 add exch + } { + dup 37 eq 3 index in length 2 sub lt and { % "%nn" -> ord + pop + (< >) 4 string copy dup 1 in 5 index 1 add 2 getinterval putinterval cvx + stopped { + pop pop /bwipp.GS1dlBadHexCharacter (Invalid hex character) //raiseerror exec + } if + 0 get out exch 2 index exch put + 1 add exch 3 add exch + } { + out exch 2 index exch put + 1 add exch 1 add exch + } ifelse } ifelse + } loop + out exch 0 exch getinterval /out exch def + pop + out + } def + + /ais 99 array def + /vals 99 array def + 0 + + % Extract AIs from the path components + pp { + (/) search { + ais exch 4 index exch put + pop + (/) search {exch pop} {() exch} ifelse + vals exch 3 index exch uriunescape put + } { + pop exit + } ifelse + exch 1 add exch + } loop + + % Validate the key-qualifiers in the path info sequence + dup 1 gt { + false + gs1syntax ais 0 get get /dlpkey get { + /seq exch def + /i 1 def /j 0 def + { + i ais length ge {exit} if + j seq length ge {exit} if + ais i get seq j get eq { + /i i 1 add def + } if + /j j 1 add def + } loop + i 2 index eq {pop true exit} if + } forall + not { + pop /bwipp.GS1dlBadPathInfo (The AIs in the path are not a valid key-qualifier sequence for the key) //raiseerror exec + } if + } if + + % Extract AIs from the query parameters + qp { + dup () eq {pop exit} if + (&) search {exch pop} {() exch} ifelse + (=) search { + true 1 index {dup 48 ge exch 57 le and and} forall { + ais exch 5 index exch put + pop + vals exch 3 index exch uriunescape put + exch 1 add exch + } { % Ignore non-numeric parameters + pop pop pop + } ifelse + } { % Ignore singletons and empty parameters + pop + } ifelse + } loop + + /ais ais 0 3 index getinterval def + /vals vals 0 3 index getinterval def + pop + + % Expand any extracted GTINs + 0 1 ais length 1 sub { + dup ais exch get (01) eq { + dup vals exch get + dup length dup 8 eq exch dup 12 eq exch 13 eq or or { + (00000000000000) 14 string copy dup 3 -1 roll dup length 14 exch sub exch putinterval + vals exch 2 index exch put + } { + pop + } ifelse + } if + pop + } for + + } ifelse + + % AIs not requiring FNC1 separation +{ + /aifixed << [ + (00) (01) (02) (03) (04) + (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) + % (23) % Reassigned to variable-length AI (235)! + (31) (32) (33) (34) (35) (36) + (41) + ] {dup} forall >> def +} ctxdef + + /fncs [ + ais { + true exch + dup length 2 ge { + 0 2 getinterval aifixed exch known {pop false} if + } { + pop + } ifelse + } forall + ] def + + + % Linter routines for validating AI components + + /lintnumeric { + true exch { + dup 48 lt exch 57 gt or { pop false exit } if + } forall + not { pop /bwipp.GS1notNumeric (Not numeric) false exit } if + } def + + /lintcset82 { + true exch { + 1 string dup 0 4 -1 roll put + (!"%&'()*+,-./0123456789:;<=>?ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz) + exch search not { pop pop false exit } if + pop pop pop + } forall + not { pop /bwipp.GS1badCSET82character (Invalid CSET 82 character) false exit } if + } def + + /lintcset39 { + true exch { + 1 string dup 0 4 -1 roll put + (#-/0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) + exch search not { pop pop false exit } if + pop pop pop + } forall + not { pop /bwipp.GS1badCSET39character (Invalid CSET 39 character) false exit } if + } def + + /lintkey { + dup length 2 lt { pop pop /bwipp.GS1keyTooShort (Key is too short) false exit } if + dup 0 get dup 48 lt exch 57 gt or exch + 1 get dup 48 lt exch 57 gt or or { + pop /bwipp.GS1badGCP (Non-numeric company prefix) false exit + } if + } def + + /lintimporteridx { + (-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz) + exch search not {pop pop /bwipp.GS1badImporterIndex (Invalid importer index) false exit} if + pop pop pop + } def + + /lintcsum { + mark exch + dup length 2 mod 0 eq {3} {1} ifelse + exch { 48 sub 1 index mul exch 4 exch sub } forall pop + 0 counttomark 1 sub {add} repeat exch pop + 10 mod 0 ne { pop /bwipp.GS1badChecksum (Bad checksum) false exit } if + } def + +{ + /cset82 << + 0 (!"%&'\(\)*+,-./0123456789:;<=>?ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz) + { exch dup 1 add } forall pop + >> def + + /cset32 << + 0 (23456789ABCDEFGHJKLMNPQRSTUVWXYZ) + { exch dup 1 add } forall pop + >> def +} ctxdef + + /lintcsumalpha { + dup length 2 lt { pop pop /bwipp.GS1alphaTooShort (Alphanumeric string is too short to check) false exit} if + dup length 2 sub + 2 copy + 0 exch getinterval mark exch { + dup cset82 exch known { cset82 exch get } { -1 exit } ifelse + } forall + dup -1 eq { cleartomark pop pop pop /bwipp.GS1UnknownCSET82Character (Unknown CSET 82 character) false exit} if + counttomark array astore exch pop + 3 1 roll + 2 getinterval mark exch { + dup cset32 exch known { cset32 exch get } { -1 exit } ifelse + } forall + dup -1 eq { cleartomark pop pop /bwipp.GS1UnknownCSET32Character (Unknown CSET 32 character) false exit} if + counttomark array astore exch pop + dup 0 get 5 bitshift exch 1 get add exch + [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 ] + 1 index length + dup 2 index length gt { pop pop pop pop pop /bwipp.GS1alphaTooLong (Alphanumeric string is too long to check) false exit} if + 0 exch getinterval {exch} forall + 0 exch { 3 -1 roll exch mul add } forall 1021 mod + ne { pop /bwipp.GS1badAlphaCheckCharacters (Bad alphanumeric check characters) false exit} if + } def + +{ + /iso3166 << [ + /004 /008 /010 /012 /016 /020 /024 /028 /031 /032 /036 /040 /044 /048 + /050 /051 /052 /056 /060 /064 /068 /070 /072 /074 /076 /084 /086 /090 /092 /096 + /100 /104 /108 /112 /116 /120 /124 /132 /136 /140 /144 /148 + /152 /156 /158 /162 /166 /170 /174 /175 /178 /180 /184 /188 /191 /192 /196 + /203 /204 /208 /212 /214 /218 /222 /226 /231 /232 /233 /234 /238 /239 /242 /246 /248 + /250 /254 /258 /260 /262 /266 /268 /270 /275 /276 /288 /292 /296 + /300 /304 /308 /312 /316 /320 /324 /328 /332 /334 /336 /340 /344 /348 + /352 /356 /360 /364 /368 /372 /376 /380 /384 /388 /392 /398 + /400 /404 /408 /410 /414 /417 /418 /422 /426 /428 /430 /434 /438 /440 /442 /446 + /450 /454 /458 /462 /466 /470 /474 /478 /480 /484 /492 /496 /498 /499 + /500 /504 /508 /512 /516 /520 /524 /528 /531 /533 /534 /535 /540 /548 + /554 /558 /562 /566 /570 /574 /578 /580 /581 /583 /584 /585 /586 /591 /598 + /600 /604 /608 /612 /616 /620 /624 /626 /630 /634 /638 /642 /643 /646 + /652 /654 /659 /660 /662 /663 /666 /670 /674 /678 /682 /686 /688 /690 /694 + /702 /703 /704 /705 /706 /710 /716 /724 /728 /729 /732 /740 /744 /748 + /752 /756 /760 /762 /764 /768 /772 /776 /780 /784 /788 /792 /795 /796 /798 + /800 /804 /807 /818 /826 /831 /832 /833 /834 /840 + /850 /854 /858 /860 /862 /876 /882 /887 /894 + ] {dup} forall >> def +} ctxdef + + /lintiso3166 { + iso3166 exch known not { pop /bwipp.GS1UnknownCountry (Unknown country code) false exit } if + } def + + /lintiso3166999 { + dup /999 ne { + iso3166 exch known not { pop /bwipp.GS1UnknownCountryOr999 (Unknown country code or not 999) false exit } if + } { + pop + } ifelse + } def + + /lintiso3166list { + dup length 3 mod 0 ne { + pop pop /bwipp.GS1BadCountryListLength (Not a group of three-digit country codes) false exit + } if + true + 0 3 3 index length 1 sub { + 2 index exch 3 getinterval + iso3166 exch known not { pop pop false exit } if + } for + not { pop /bwipp.GS1UnknownCountry (Unknown country code) false exit } if + pop + } def + +{ + /iso3166alpha2 << [ + /AD /AE /AF /AG /AI /AL /AM /AO /AQ /AR /AS /AT /AU /AW /AX /AZ + /BA /BB /BD /BE /BF /BG /BH /BI /BJ /BL /BM /BN /BO /BQ /BR /BS /BT /BV /BW /BY /BZ + /CA /CC /CD /CF /CG /CH /CI /CK /CL /CM /CN /CO /CR /CU /CV /CW /CX /CY /CZ + /DE /DJ /DK /DM /DO /DZ + /EC /EE /EG /EH /ER /ES /ET + /FI /FJ /FK /FM /FO /FR + /GA /GB /GD /GE /GF /GG /GH /GI /GL /GM /GN /GP /GQ /GR /GS /GT /GU /GW /GY + /HK /HM /HN /HR /HT /HU + /ID /IE /IL /IM /IN /IO /IQ /IR /IS /IT /JE /JM /JO /JP + /KE /KG /KH /KI /KM /KN /KP /KR /KW /KY /KZ + /LA /LB /LC /LI /LK /LR /LS /LT /LU /LV /LY + /MA /MC /MD /ME /MF /MG /MH /MK /ML /MM /MN /MO /MP /MQ /MR /MS /MT /MU /MV /MW /MX /MY /MZ + /NA /NC /NE /NF /NG /NI /NL /NO /NP /NR /NU /NZ + /OM + /PA /PE /PF /PG /PH /PK /PL /PM /PN /PR /PS /PT /PW /PY + /QA + /RE /RO /RS /RU /RW + /SA /SB /SC /SD /SE /SG /SH /SI /SJ /SK /SL /SM /SN /SO /SR /SS /ST /SV /SX /SY /SZ + /TC /TD /TF /TG /TH /TJ /TK /TL /TM /TN /TO /TR /TT /TV /TW /TZ + /UA /UG /UM /US /UY /UZ + /VA /VC /VE /VG /VI /VN /VU + /WF /WS + /YE /YT + /ZA /ZM /ZW + ] {dup} forall >> def +} ctxdef + + /lintiso3166alpha2 { + iso3166alpha2 exch known not { pop /bwipp.GS1UnknownCountryAlpha (Unknown country alpha code) false exit } if + } def + +{ + /iso4217 << [ + /008 /012 /032 /036 /044 /048 + /050 /051 /052 /060 /064 /068 /072 /084 /090 /096 + /104 /108 /116 /124 /132 /136 /144 + /152 /156 /170 /174 /188 /191 /192 + /203 /208 /214 /222 /230 /232 /238 /242 /262 /270 /292 + /320 /324 /328 /332 /340 /344 /348 + /352 /356 /360 /364 /368 /376 /388 /392 /398 + /400 /404 /408 /410 /414 /417 /418 + /422 /426 /430 /434 /446 + /454 /458 /462 /480 /484 /496 /498 + /504 /512 /516 /524 /532 /533 /548 + /554 /558 /566 /578 /586 /590 /598 + /600 /604 /608 /634 /643 /646 /654 /682 /690 /694 + /702 /704 /706 /710 /728 /748 + /752 /756 /760 /764 /776 /780 /784 /788 + /800 /807 /818 /826 /834 /840 /858 /860 /882 /886 + /901 /925 /927 /928 /929 /930 /931 /932 /933 /934 /936 /938 + /940 /941 /943 /944 /946 /947 /948 /949 + /950 /951 /952 /953 /955 /956 /957 /958 /959 + /960 /961 /962 /963 /964 /965 /967 /968 /969 + /970 /971 /972 /973 /975 /976 /977 /978 /979 + /980 /981 /984 /985 /986 /990 /994 /997 /999 + ] {dup} forall >> def +} ctxdef + + /lintiso4217 { + iso4217 exch known not { pop /bwipp.GS1UnknownCurrency (Unknown currency code) false exit } if + } def + + /lintiban { + dup length 4 le { pop pop /bwipp.GS1tooShort (IBAN too short) false exit } if + dup true exch { + 1 string dup 0 4 -1 roll put + (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) + exch search not { pop pop false exit } if + pop pop pop + } forall + not { pop /bwipp.GS1badIBANcharacter (Invalid IBAN character) false exit } if + dup mark exch mark exch {} forall counttomark -4 roll counttomark array astore exch pop { + 48 sub dup 9 gt {7 sub dup 10 idiv exch 10 mod} if + } forall counttomark array astore exch pop + 0 exch {exch 10 mul add 97 mod} forall + 1 ne { pop pop /bwipp.GS1badIBANchecksum (IBAN checksum incorrect) false exit } if + 0 2 getinterval lintiso3166alpha2 + } def + + /lintzero { + (0) ne { pop /bwipp.GS1zeroRequired (Zero is required) false exit } if + } def + + /lintnonzero { + false exch { 48 ne {pop true} if } forall + not { pop /bwipp.GS1zeroNotPermitted (Zero not permitted) false exit } if + } def + + /lintnozeroprefix { + dup length 1 gt exch 0 get 48 eq and { + pop /bwipp.GS1badZeroPrefix (Zero prefix is not permitted) false exit + } if + } def + + /lintyymmd0 { + dup 2 2 getinterval cvi dup 1 lt exch 12 gt or { pop /bwipp.GS1badMonth (Invalid month) false exit } if + dup 0 2 getinterval cvi dup 21 sub % Update 20YY periodically for century calculation + dup 51 ge {pop 1900 add} { -50 le {2100 add} {2000 add} ifelse} ifelse % YYYY + dup 400 mod 0 eq exch dup 4 mod 0 eq exch 100 mod 0 ne and or % Leap year? + [ 31 3 -1 roll {29} {28} ifelse 31 30 31 30 31 31 30 31 30 31 ] + 1 index 2 2 getinterval cvi 1 sub get + exch 4 2 getinterval cvi lt { pop /bwipp.GS1badDay (Invalid day of month) false exit } if + } def + + /lintyymmdd { + dup length 6 ne { pop /bwipp.GS1badDateLength (Invalid length for date) false exit } if + dup 4 2 getinterval cvi 1 lt { pop /bwipp.GS1badDay (Invalid day of month) false exit } if + lintyymmd0 + } def + + /lintyymmddhh { + dup length 8 ne { pop /bwipp.GS1badYYMMDDHHLength (Invalid length for date with hour) false exit } if + dup 6 2 getinterval cvi 23 gt { pop pop /bwipp.GS1badHour (Invalid hour of day) false exit } if + 0 6 getinterval lintyymmdd + } def + + /linthhmm { + dup 0 2 getinterval cvi 23 gt { pop pop /bwipp.GS1badHour (Invalid hour of day) false exit } if + 2 2 getinterval cvi 59 gt { pop /bwipp.GS1badMinute (Invalid minute in the hour) false exit } if + } def + + /lintmmoptss { + dup length dup 2 ne exch 4 ne and { + pop /bwipp.GS1badTimeLength (Invalid length for optional minutes and seconds) false exit + } if + dup 0 2 getinterval cvi 59 gt { pop pop /bwipp.GS1badMinute (Invalid minute in the hour) false exit } if + dup length 4 ge { + dup 2 2 getinterval cvi 59 gt { pop pop /bwipp.GS1badSecond (Invalid second in the minute) false exit } if + } if + pop + } def + + /lintyesno { + dup (0) ne exch (1) ne and { + pop /bwipp.GS1badBoolean (Neither 0 nor 1 for yes or no) false exit + } if + } def + + /lintwinding { + dup (0) ne exch dup (1) ne exch (9) ne and and { + pop /bwipp.GS1badWinding (Invalid winding direction) false exit + } if + } def + + /lintpieceoftotal { + dup length 2 mod 0 ne { pop pop /bwipp.GS1badPieceTotalLength (Invalid piece/total length) false exit } if + dup dup length 2 idiv 0 exch getinterval cvi + dup 0 eq { pop pop pop /bwipp.GS1badPieceNumber (Invalid piece number) false exit } if + exch dup length 2 idiv dup getinterval cvi + dup 0 eq { pop pop pop /bwipp.GS1badPieceTotal (Invalid total number) false exit } if + gt { pop /bwipp.GS1pieceExceedsTotal (Piece number exceeds total) false exit } if + } def + + /lintpcenc { + { + (%) search not {pop exit} if + pop pop dup length 2 lt { pop pop /bwipp.GS1badPercentEscape (Invalid % escape) false exit } if + dup 0 2 getinterval true exch { + 1 string dup 0 4 -1 roll put + (0123456789ABCDEFabcdef) + exch search not { pop pop false exit } if + pop pop pop + } forall + not { pop pop /bwipp.GS1badPercentChars (Invalid characters for percent encoding) false exit } if + } loop + } def + + /lintcouponcode { + dup true exch { + dup 48 lt exch 57 gt or { pop false exit } if + } forall + not { pop pop /bwipp.GS1couponNotNumeric (Coupon not numeric) false exit } if + + % GCP VLI and value + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortGCPVLI (Coupon too short: Missing GCP VLI) false exit + } if + dup 0 1 getinterval cvi dup 6 gt { + pop pop /bwipp.GS1couponBadGCPVLI (Coupon GCP length indicator must be 0-6) false exit + } if + 6 add 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShortGCP (Coupon too short: GCP truncated) false exit + } if + dup 2 index length exch sub getinterval + + % Offer Code + dup length 6 lt { + pop pop /bwipp.GS1couponTooShortOfferCode (Coupon too short: Offer Code truncated) false exit + } if + dup length 6 sub 6 exch getinterval + + % Save Value VLI and value + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortSaveValueVLI (Coupon too short: Missing Save Value VLI) false exit + } if + dup 0 1 getinterval cvi dup dup 1 lt exch 5 gt or { + pop pop /bwipp.GS1couponBadSaveValueVLI (Coupon Save Value length indicator must be 1-5) false exit + } if + 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShortSaveValue (Coupon too short: Save Value truncated) false exit + } if + dup 2 index length exch sub getinterval + + % 1st Purchase Requirement VLI and value + dup length 1 lt { + pop pop /bwipp.GS1couponTooShort1stPurchaseRequirementVLI (Coupon too short: Missing 1st Purchase Requirement VLI) false exit + } if + dup 0 1 getinterval cvi dup dup 1 lt exch 5 gt or { + pop pop /bwipp.GS1couponBad1stPurchaseRequirementVLI (Coupon 1st Purchase Requirement length indicator must be 1-5) false exit + } if + 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShort1stPurchaseRequirement (Coupon too short: 1st Purchase Requirement truncated) false exit + } if + dup 2 index length exch sub getinterval + + % 1st Purchase Requirement Code + dup length 1 lt { + pop pop /bwipp.GS1couponTooShort1stPurchaseRequirementCode (Coupon too short: Missing 1st Purchase Requirement Code) false exit + } if + dup 0 1 getinterval cvi dup 4 gt exch 9 ne and { + pop pop /bwipp.GS1couponBad1stPurchaseRequirementCode (Coupon 1st Purchase Requirement Code must be 0-4 or 9) false exit + } if + dup length 1 sub 1 exch getinterval + + % 1st Purchase Family Code + dup length 3 lt { + pop pop /bwipp.GS1couponTooShort1stPurchaseFamilyCode (Coupon too short: 1st Purchase Family Code truncated) false exit + } if + dup length 3 sub 3 exch getinterval + + % Optional field 1 + dup length 1 ge { dup 0 1 getinterval cvi 1 eq { + 1 dup 2 index length exch sub getinterval + + % Additional Purchase Rules Code + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortAdditionalPurchaseRulesCode (Coupon too short: Missing Additional Purchase Rules Code) false exit + } if + dup 0 1 getinterval cvi 3 gt { + pop pop /bwipp.GS1couponBadAdditionalPurchaseRulesCode (Coupon Additional Purchase Rules Code must be 0-3) false exit + } if + dup length 1 sub 1 exch getinterval + + % 2nd Purchase RequirementVLI and value + dup length 1 lt { + pop pop /bwipp.GS1couponTooShort2ndPurchaseRequirementVLI (Coupon too short: Missing 2nd Purchase Requirement VLI) false exit + } if + dup 0 1 getinterval cvi dup dup 1 lt exch 5 gt or { + pop pop /bwipp.GS1couponBad2ndPurchaseRequirementVLI (Coupon 2nd Purchase Requirement length indicator must be 1-5) false exit + } if + 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShort2ndPurchaseRequirement (Coupon too short: 2nd Purchase Requirement truncated) false exit + } if + dup 2 index length exch sub getinterval + + % 2nd Purchase Requirement Code + dup length 1 lt { + pop pop /bwipp.GS1couponTooShort2ndPurchaseRequirementCode (Coupon too short: Missing 2nd Purchase Requirement Code) false exit + } if + dup 0 1 getinterval cvi dup 4 gt exch 9 ne and { + pop pop /bwipp.GS1couponBad2ndPurchaseRequirementCode (Coupon 2nd Purchase Requirement Code must be 0-4 or 9) false exit + } if + dup length 1 sub 1 exch getinterval + + % 2nd Purchase Family Code + dup length 3 lt { + pop pop /bwipp.GS1couponTooShort2ndPurchaseFamilyCode (Coupon too short: 2nd Purchase Family Code truncated) false exit + } if + dup length 3 sub 3 exch getinterval + + % 2nd Purchase GCP VLI and value + dup length 1 lt { + pop pop /bwipp.GS1couponTooShort2ndPurchaseGCPVLI (Coupon too short: Missing 2nd Purchase GCP VLI) false exit + } if + dup 0 1 getinterval cvi dup dup 6 gt exch 9 ne and { + pop pop /bwipp.GS1couponBad2ndPurchaseGCPVLI (Coupon 2nd Purchase GCP length indicator must be 0-6 or 9) false exit + } if + dup 9 ne {6 add} {pop 0} ifelse 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShort2ndPurchaseGCP (Coupon too short: 2nd Purchase GCP truncated) false exit + } if + dup 2 index length exch sub getinterval + + } if } if + + % Optional field 2 + dup length 1 ge { dup 0 1 getinterval cvi 2 eq { + 1 dup 2 index length exch sub getinterval + + % 3rd Purchase RequirementVLI and value + dup length 1 lt { + pop pop /bwipp.GS1couponTooShort3rdPurchaseRequirementVLI (Coupon too short: Missing 3rd Purchase Requirement VLI) false exit + } if + dup 0 1 getinterval cvi dup dup 1 lt exch 5 gt or { + pop pop /bwipp.GS1couponBad3rdPurchaseRequirementVLI (Coupon 3rd Purchase Requirement length indicator must be 1-5) false exit + } if + 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShort3rdPurchaseRequirement (Coupon too short: 3rd Purchase Requirement truncated) false exit + } if + dup 2 index length exch sub getinterval + + % 3rd Purchase Requirement Code + dup length 1 lt { + pop pop /bwipp.GS1couponTooShort3rdPurchaseRequirementCode (Coupon too short: Missing 3rd Purchase Requirement Code) false exit + } if + dup 0 1 getinterval cvi dup 4 gt exch 9 ne and { + pop pop /bwipp.GS1couponBad3rdPurchaseRequirementCode (Coupon 3rd Purchase Requirement Code must be 0-4 or 9) false exit + } if + dup length 1 sub 1 exch getinterval + + % 3rd Purchase Family Code + dup length 3 lt { + pop pop /bwipp.GS1couponTooShort3rdPurchaseFamilyCode (Coupon too short: 3rd Purchase Family Code truncated) false exit + } if + dup length 3 sub 3 exch getinterval + + % 3rd Purchase GCP VLI and value + dup length 1 lt { + pop pop /bwipp.GS1couponTooShort3rdPurchaseGCPVLI (Coupon too short: Missing 3rd Purchase GCP VLI) false exit + } if + dup 0 1 getinterval cvi dup dup 6 gt exch 9 ne and { + pop pop /bwipp.GS1couponBad3rdPurchaseGCPVLI (Coupon 3rd Purchase GCP length indicator must be 0-6 or 9) false exit + } if + dup 9 ne {6 add} {pop 0} ifelse 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShort3rdPurchaseGCP (Coupon too short: 3rd Purchase GCP truncated) false exit + } if + dup 2 index length exch sub getinterval + + } if } if + + % Optional field 3 + /couponexpire -1 def + dup length 1 ge { dup 0 1 getinterval cvi 3 eq { + 1 dup 2 index length exch sub getinterval + + % Expiration date + dup length 6 lt { + pop pop /bwipp.GS1couponTooShortExpirationDate (Coupon too short: Expiration date) false exit + } if + dup 2 2 getinterval cvi dup 1 lt exch 12 gt or { pop pop /bwipp.GS1couponExpirationDateBadMonth (Invalid month in expiration date) false exit } if + dup 0 2 getinterval cvi dup 21 sub % Update 20YY periodically for century calculation + dup 51 ge {pop 1900 add} { -50 le {2100 add} {2000 add} ifelse} ifelse % YYYY + dup 400 mod 0 eq exch dup 4 mod 0 eq exch 100 mod 0 ne and or % Leap year? + [ 31 3 -1 roll {29} {28} ifelse 31 30 31 30 31 31 30 31 30 31 ] + 1 index 2 2 getinterval cvi 1 sub get + 1 index 4 2 getinterval cvi dup 3 1 roll lt + exch 1 lt or { pop pop /bwipp.GS1couponExpirationDateBadDay (Invalid day of month in expiration date) false exit } if + dup 0 6 getinterval cvi /couponexpire exch def + dup length 6 sub 6 exch getinterval + + } if } if + + % Optional field 4 + dup length 1 ge { dup 0 1 getinterval cvi 4 eq { + 1 dup 2 index length exch sub getinterval + + % Start date + dup length 6 lt { + pop pop /bwipp.GS1couponTooShortStartDate (Coupon too short: Start date) false exit + } if + dup 2 2 getinterval cvi dup 1 lt exch 12 gt or { pop pop /bwipp.GS1couponStartDateBadMonth (Invalid month in start date) false exit } if + dup 0 2 getinterval cvi dup 21 sub % Update 20YY periodically for century calculation + dup 51 ge {pop 1900 add} { -50 le {2100 add} {2000 add} ifelse} ifelse % YYYY + dup 400 mod 0 eq exch dup 4 mod 0 eq exch 100 mod 0 ne and or % Leap year? + [ 31 3 -1 roll {29} {28} ifelse 31 30 31 30 31 31 30 31 30 31 ] + 1 index 2 2 getinterval cvi 1 sub get + 1 index 4 2 getinterval cvi dup 3 1 roll lt + exch 1 lt or { pop pop /bwipp.GS1couponStartDateBadDay (Invalid day of month in start date) false exit } if + dup 0 6 getinterval cvi /couponstart exch def + couponexpire -1 ne couponexpire couponstart lt and { + pop pop /bwipp.GS1couponExpireDateBeforeStartDate (Coupon expires before it starts) false exit + } if + dup length 6 sub 6 exch getinterval + + } if } if + + % Optional field 5 + dup length 1 ge { dup 0 1 getinterval cvi 5 eq { + 1 dup 2 index length exch sub getinterval + + % Serial Number VLI and value + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortSerialNumberVLI (Coupon too short: Missing Serial Number VLI) false exit + } if + dup 0 1 getinterval cvi 6 add 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShortSerialNumber (Coupon too short: Serial Number truncated) false exit + } if + dup 2 index length exch sub getinterval + + } if } if + + % Optional field 6 + dup length 1 ge { dup 0 1 getinterval cvi 6 eq { + 1 dup 2 index length exch sub getinterval + + % Retailer GCP/GLN VLI and value + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortRetailerGCPGLNVLI (Coupon too short: Missing Retailer GCP/GLN VLI) false exit + } if + dup 0 1 getinterval cvi dup dup 1 lt exch 7 gt or { + pop pop /bwipp.GS1couponBadRetailerGCPGLNVLI (Coupon Retailer GCP/GLN length indicator must be 1-7) false exit + } if + 6 add 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShortRetailerGCPGLN (Coupon too short: Retailer GCP/GLN truncated) false exit + } if + dup 2 index length exch sub getinterval + + } if } if + + % Optional field 9 + dup length 1 ge { dup 0 1 getinterval cvi 9 eq { + 1 dup 2 index length exch sub getinterval + + % Save Value Code + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortSaveValueCode (Coupon too short: Missing Save Value Code) false exit + } if + dup 0 1 getinterval cvi dup 6 gt exch dup 3 eq exch 4 eq or or { + pop pop /bwipp.GS1couponBadSaveValueCode (Coupon Save Value Code must be 0,1,2,5 or 6) false exit + } if + dup length 1 sub 1 exch getinterval + + % Save Value Applies to Item + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortSaveValueAppliesToItem (Coupon too short: Missing Save Value Applies to Item) false exit + } if + dup 0 1 getinterval cvi 2 gt { + pop pop /bwipp.GS1couponBadSaveValueAppliesToItem (Coupon Save Value Applies to Item must be 0-2) false exit + } if + dup length 1 sub 1 exch getinterval + + % Store Coupon Flag + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortStoreCouponFlag (Coupon too short: Missing Store Coupon Flag) false exit + } if + dup length 1 sub 1 exch getinterval + + % Don't Multiply Flag + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortDontMultiplyFlag (Coupon too short: Missing Don't Multiply Flag) false exit + } if + dup 0 1 getinterval cvi 1 gt { + pop pop /bwipp.GS1couponBadDontMultiplyFlag (Don't Multiply Flag must be 0 or 1) false exit + } if + dup length 1 sub 1 exch getinterval + + } if } if + + dup length 0 ne { + pop pop /bwipp.GS1couponUnrecognisedOptionalField (Coupon fields must be 1,2,3,4,5,6 or 9, increasing order) false exit + } if + pop + } def + + /lintcouponposoffer { + dup true exch { + dup 48 lt exch 57 gt or { pop false exit } if + } forall + not { pop pop /bwipp.GS1couponNotNumeric (Coupon not numeric) false exit } if + % Format Code + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortFormatCode (Coupon too short: Missing Format Code) false exit + } if + dup 0 1 getinterval dup (0) ne exch (1) ne and { + pop pop /bwipp.GS1couponBadFormatCode (Coupon format must be 0 or 1) false exit + } if + dup length 1 sub 1 exch getinterval + % Funder ID VLI and Funder ID + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortFunderVLI (Coupon too short: Missing Funder VLI) false exit + } if + dup 0 1 getinterval cvi dup 6 gt { + pop pop pop /bwipp.GS1couponBadFunderVLI (Coupon Funder length indicator must be 0-6) false exit + } if + 6 add 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShortFunder (Coupon too short: Truncated Funder ID) false exit + } if + dup 2 index length exch sub getinterval + % Offer Code + dup length 6 lt { + pop pop /bwipp.GS1couponTooShortOfferCode (Coupon too short: Truncated Offer Code) false exit + } if + dup length 6 sub 6 exch getinterval + % Serial Number VLI and Serial Number + dup length 1 lt { + pop pop /bwipp.GS1couponTooShortSnVLI (Coupon too short: Missing SN VLI) false exit + } if + dup 0 1 getinterval cvi + 6 add 1 add + 2 copy exch length gt { + pop pop pop /bwipp.GS1couponTooShortSn (Coupon too short: Truncated SN) false exit + } if + dup 2 index length exch sub getinterval + dup length 0 ne { + pop pop /bwipp.GS1couponTooLong (Coupon too long) false exit + } if + pop + } def + + /lintlatlong { + dup length 20 ne { + pop /bwipp.GS1badGeoLength (Invalid length for a geo-location) false exit + } if + dup 0 10 getinterval cvi 1800000000 gt { pop /bwipp.GS1badLatitude (Invalid value for latitude) false exit } if + dup 10 10 getinterval cvi 3600000000 gt { pop /bwipp.GS1badLongitude (Invalid value for longitude) false exit } if + pop + } def + + dontlint not { + + % Validate AI contents + true + 0 1 vals length 1 sub { + dup ais exch get /ai exch def + vals exch get /val exch def + gs1syntax ai known { + gs1syntax ai get /parts get + % Overall length checks, e.g. to report "too long", not "checksum failure" + dup 0 exch {dup /opt get {pop 0} {/min get} ifelse add} forall val length gt { + pop /bwipp.GS1valueTooShort (Too short) false exit + } if + dup 0 exch {/max get add} forall val length lt { + pop /bwipp.GS1valueTooLong (Too long) false exit + } if + { % Checks for each component of the AI + /props exch def + props /max get val length 2 copy gt {exch} if pop + val exch 0 exch getinterval /eval exch def + /val val eval length dup val length exch sub getinterval def + eval length 0 eq { + props /opt get not { + pop /bwipp.GS1valueTooShort (Too short) false exit + } if + } { + eval length props /min get lt { + pop /bwipp.GS1valueTooShort (Too short) false exit + } if + << /N /lintnumeric /X /lintcset82 /Y /lintcset39 >> props /cset get get eval exch load exec + props /linters get { eval exch load exec } forall + } ifelse + } forall + dup not {exit} if + val length 0 ne { % Not all data consumed by components + pop /bwipp.GS1valueTooLong (Too long) false exit + } if + } { + pop /bwipp.GS1unknownAI (Unrecognised AI) false exit + } ifelse + } for + not { + dup length ai length add 5 add string + dup 0 (AI ) putinterval + dup 3 ai putinterval + dup 3 ai length add (: ) putinterval + dup 5 ai length add 4 -1 roll putinterval + //raiseerror exec + } if + + % Search for "patt" matching an AIs, excluding "this" AI + /aiexists { + /this exch def + /patt exch def + 1 { % common exit + aivals patt known {true exit} if % Fast path + patt length 4 eq { + patt 3 1 getinterval (n) eq { + /pfxlen patt 2 1 getinterval (n) eq {2} {3} ifelse def + false + ais { + dup dup this ne exch length 4 eq and { + 0 pfxlen getinterval patt 0 pfxlen getinterval eq { + pop true + } if + } { + pop + } ifelse + } forall + exit + } if + false exit + } if + false exit + } repeat + } def + + % Build AI dict and validate repeats + /aivals vals length dict def + 0 1 vals length 1 sub { + dup ais exch get /ai exch def + vals exch get /val exch def + aivals ai known { + aivals ai get val ne { + ai length 40 add string + dup 0 (Repeated AIs \() putinterval + dup 14 ai putinterval + dup 14 ai length add (\) must have the same value) putinterval + /bwipp.GS1repeatedDifferingAIs exch //raiseerror exec + } if + } { + aivals ai val put + } ifelse + } for + + % Validate ex and req pairings + 0 1 vals length 1 sub { + ais exch get /ai exch def + gs1syntax ai get /ex 2 copy known { + get { + /patt exch def + patt ai aiexists { + ai length patt length add 36 add string + dup 0 (AIs \() putinterval + dup 5 ai putinterval + dup 5 ai length add (\) and \() putinterval + dup 12 ai length add patt putinterval + dup 12 ai length add patt length add (\) are mutually exclusive) putinterval + /bwipp.GS1exclusiveAIs exch //raiseerror exec + } if + } forall + } { + pop pop + } ifelse + lintreqs { + gs1syntax ai get /req 2 copy known { + get { % For each req attribute group + false exch { % Any req AI in the group is fine + ai aiexists {pop true} if + } forall + not { + ai length 47 add string + dup 0 (One of more requisite AIs for AI \() putinterval + dup 34 ai putinterval + dup 34 ai length add (\) are missing) putinterval + /bwipp.GS1missingAIs exch //raiseerror exec + } if + } forall + } { + pop pop + } ifelse + } if + } for + + } if % dontlint + + ais vals fncs + + //unloadctx exec + + end + +} +[/barcode] {null def} forall +bind def +/gs1process dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END RESOURCE gs1process-- + % --BEGIN RENDERER renlinear-- % --REQUIRES preamble raiseerror-- -%%BeginResource: uk.co.terryburton.bwipp renlinear 0.0 2017040400 82223 84795 -%%BeginData: 237 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp renlinear 0.0 2022082100 75512 74718 +%%BeginData: 246 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put begin /renlinear { @@ -87,7 +3246,7 @@ begin /textcolor (unset) def /textxalign (unset) def /textyalign (unset) def - /textfont (NimbusMonL-Regu) def + /textfont (Courier) def /textsize 10 def /textxoffset 0 def /textyoffset 0 def @@ -112,10 +3271,10 @@ begin /guardrightypos 0 def /guardwidth 6 def /guardheight 7 def - + % Apply the renderer options and the user options args {def} forall - opt {def} forall + opt {def} forall /barcolor barcolor cvlit def /textcolor textcolor cvlit def @@ -144,28 +3303,28 @@ begin /guardrightypos guardrightypos cvr def /guardwidth guardwidth cvr def /guardheight guardheight cvr def - + % Create bar elements and put them into the bars array /bars sbs length 1 add 2 idiv array def - /x 0.00 def /maxh 0 def + /pixx 0 def /pixy 0 def 0 1 sbs length 1 add 2 idiv 2 mul 2 sub { /i exch def i 2 mod 0 eq { % i is even - /d sbs i get barratio mul barratio sub 1 add def % d=digit*r-r+1 + /d sbs i get barratio mul barratio sub 1 add def % d = digit*r-r+1 sbs i get 0 ne { /h bhs i 2 idiv get 72 mul def % Height from bhs - /c d 2 div x add def % Centre of the bar = x + d/2 + /c d 2 div pixx add def % Centre of the bar = pixx + d/2 /y bbs i 2 idiv get 72 mul def % Baseline from bbs /w d inkspread sub def % bar width = digit - inkspread bars i 2 idiv [h c y w] put % Add the bar entry - h y add maxh gt {/maxh h y add def} if + h y add pixy gt {/pixy h y add def} if } { bars i 2 idiv -1 put % Dummy entry } ifelse } { - /d sbs i get spaceratio mul spaceratio sub 1 add def % d=digit*r-r+1 + /d sbs i get spaceratio mul spaceratio sub 1 add def % d = digit*r-r+1 } ifelse - /x x d add def % x+=d + /pixx pixx d add def % pixx += d } for gsave @@ -174,7 +3333,7 @@ begin % Force symbol to given width width 0 ne { - width 72 mul x div 1 scale + width 72 mul pixx div 1 scale } if % Set RGB or CMYK color depending on length of given hex string @@ -186,37 +3345,44 @@ begin anycolor length 8 eq { (< >) 10 string copy dup 1 anycolor putinterval cvx exec {255 div} forall setcmykcolor } if - } bind def + } def % Display the border and background newpath borderleft neg borderbottom neg moveto - x borderleft add borderright add 0 rlineto - 0 maxh borderbottom add bordertop add rlineto - x borderleft add borderright add neg 0 rlineto - 0 maxh borderbottom add bordertop add neg rlineto + pixx borderleft add borderright add 0 rlineto + 0 pixy borderbottom add bordertop add rlineto + pixx borderleft add borderright add neg 0 rlineto + 0 pixy borderbottom add bordertop add neg rlineto closepath - backgroundcolor (unset) ne { gsave backgroundcolor setanycolor fill grestore } if + backgroundcolor (unset) ne { gsave backgroundcolor setanycolor fill grestore } if showborder { gsave bordercolor (unset) ne { bordercolor setanycolor } if borderwidth setlinewidth stroke grestore - } if - + } if + % Display the bars for elements in the bars array gsave - 0 setlinecap barcolor (unset) ne { barcolor setanycolor } if + newpath bars { dup -1 ne { - aload pop newpath setlinewidth moveto 0 exch rlineto stroke + aload pop % h x y w + 2 index 1 index 2 div sub 2 index moveto + 0 4 index rlineto + dup 0 rlineto + 0 4 index neg rlineto + closepath + pop pop pop pop } { pop } ifelse } forall + fill grestore - + % Display the text for elements in the text array textcolor (unset) ne { textcolor setanycolor } if includetext { @@ -261,21 +3427,21 @@ begin /textascent exch def /textwidth tstr stringwidth pop tstr length 1 sub textgaps mul add def - /textxpos textxoffset x textwidth sub 2 div add def + /textxpos textxoffset pixx textwidth sub 2 div add def textxalign (left) eq { /textxpos textxoffset def } if - textxalign (right) eq { /textxpos x textxoffset sub textwidth sub def } if + textxalign (right) eq { /textxpos pixx textxoffset sub textwidth sub def } if textxalign (offleft) eq { /textxpos textwidth textxoffset add neg def } if - textxalign (offright) eq { /textxpos x textxoffset add def } if - textxalign (justify) eq textwidth x lt and { + textxalign (offright) eq { /textxpos pixx textxoffset add def } if + textxalign (justify) eq textwidth pixx lt and { /textxpos 0 def - /textgaps x textwidth sub tstr length 1 sub div def + /textgaps pixx textwidth sub tstr length 1 sub div def } if /textypos textyoffset textascent add 1 add neg def - textyalign (above) eq { /textypos textyoffset maxh add 1 add def } if - textyalign (center) eq { /textypos textyoffset maxh textascent sub 2 div add def } if + textyalign (above) eq { /textypos textyoffset pixy add 1 add def } if + textyalign (center) eq { /textypos textyoffset pixy textascent sub 2 div add def } if textxpos textypos moveto textgaps 0 tstr ashow } ifelse - } if + } if % Display the guard elements guardwhitespace { @@ -285,22 +3451,24 @@ begin guardleftpos neg guardwidth add guardleftypos guardwidth 2 div add moveto guardwidth neg guardheight -2 div rlineto guardwidth guardheight -2 div rlineto - stroke + stroke } if guardrightpos 0 ne { newpath - guardrightpos x add guardwidth sub guardrightypos guardheight 2 div add moveto + guardrightpos pixx add guardwidth sub guardrightypos guardheight 2 div add moveto guardwidth guardheight -2 div rlineto guardwidth neg guardheight -2 div rlineto - stroke + stroke } if } if - + grestore - + end -} bind def +} +[/barcode] {null def} forall +bind def /renlinear dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -310,10 +3478,10 @@ end % --BEGIN RENDERER renmatrix-- % --REQUIRES preamble raiseerror-- -%%BeginResource: uk.co.terryburton.bwipp renmatrix 0.0 2017040400 102784 108937 -%%BeginData: 309 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp renmatrix 0.0 2022082100 89491 88705 +%%BeginData: 306 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put begin /renmatrix { @@ -327,6 +3495,8 @@ begin /height 1 def /barcolor (unset) def /backgroundcolor (unset) def + /colormap (unset) def + /dotty false def /inkspread 0 def /inkspreadh 0 def /inkspreadv 0 def @@ -335,7 +3505,7 @@ begin /textcolor (unset) def /textxalign (unset) def /textyalign (unset) def - /textfont (NimbusMonL-Regu) def + /textfont (Courier) def /textsize 10 def /textxoffset 0 def /textyoffset 0 def @@ -366,192 +3536,185 @@ begin inkspread 0 ne {/inkspreadh inkspread def} if inkspread 0 ne {/inkspreadv inkspread def} if - /xyget { pixx mul add pixs exch get } bind def - /xyinvert { pixx mul add pixs exch 2 copy get 1 xor put } bind def - /mxyget { pixx mul add m exch get 2#001 and } bind def - /mxyset { pixx mul add m exch 3 -1 roll put } bind def - /msetborder { pixx mul add m exch 2 copy get 2#010 or put } bind def - /mborderoff { pixx mul add m exch 2 copy get 2#100 or put } bind def - /misborder { pixx mul add m exch get 2#110 and 2#010 eq } bind def - /mclear { pixx mul add m exch 2 copy get 2#001 and put } bind def - /mclear4 { - 2 copy mclear - 2 copy 1 add mclear - 2 copy exch 1 add exch mclear - 2 copy exch 1 add exch mclear - 1 add exch 1 add exch mclear - } bind def + /xyget { pixx mul add pixs exch get} def + /cget { pixx mul add cache exch get and} def + /cput { % Optimise by only storing "stem" corners + dup 4 mod 0 eq { % dir is up or left + 3 1 roll pixx mul add cache exch 2 copy get 4 -1 roll or put + } { + pop pop pop + } ifelse + } def + + /abcd { + 4 string 0 [ + 5 -2 roll + pixx mul add dup + pixs exch 2 getinterval aload pop 3 -1 roll % A B + pixs exch pixx add 2 getinterval aload pop % C D + ] {3 copy 48 add put pop 1 add} forall pop + } def + + /right {dir 1 ne {x y dir cput [x y]} if /x x 1 add def /dir 1 def} def + /down {dir 2 ne {x y dir cput [x y]} if /y y 1 add def /dir 2 def} def + /left {dir 4 ne {x y dir cput [x y]} if /x x 1 sub def /dir 4 def} def + /up {dir 8 ne {x y dir cput [x y]} if /y y 1 sub def /dir 8 def} def /trace { % Walk the outline of a region emitting edge coordinates of the path /y exch def /x exch def - % dir 0:right 1:down 2:left 3:up - % hug 0:right 1:left - /dir x 1 add y 1 add mxyget def /hug dir def + % dir 1:right 2:down 4:left 8:up + /dir x 1 add y 1 add xyget 1 eq {8} {4} ifelse def /sx x def /sy y def /sdir dir def - mark [x y] { - x 1 add y - x 1 add y 1 add - x y 1 add - x y - 8 dir 2 mul neg roll - /Dy exch def /Dx exch def /D Dx Dy xyget def - /Cy exch def /Cx exch def /C Cx Cy xyget def - /By exch def /Bx exch def /B Bx By xyget def - /Ay exch def /Ax exch def /A Ax Ay xyget def - A B eq { - A C eq {/L} {/R} ifelse - } { - A C eq B D eq and { - A 0 eq hug 0 eq xor {/R} {/F} ifelse - } { - /F - } ifelse - } ifelse - dup /F eq { - pop - dir 0 eq {/x x 1 add def} if - dir 1 eq {/y y 1 add def} if - dir 2 eq {/x x 1 sub def} if - dir 3 eq {/y y 1 sub def} if - hug 0 eq { - Ax Ay msetborder - } { - Bx By msetborder - } ifelse - } { - /L eq { - /dir dir 3 add 4 mod def - hug 1 eq { - Bx By msetborder - Dx Dy mborderoff - } if - } { % R - /dir dir 1 add 4 mod def - hug 0 eq { - Ax Ay msetborder - Cx Cy mborderoff - } if + + % A B + % C D + mark { + x y abcd + 1 { % Common exit + dup dup (0001) eq exch dup (0011) eq exch (1011) eq or or {pop right exit} if + dup dup (0010) eq exch dup (1010) eq exch (1110) eq or or {pop down exit} if + dup dup (1000) eq exch dup (1100) eq exch (1101) eq or or {pop left exit} if + dup dup (0100) eq exch dup (0101) eq exch (0111) eq or or {pop up exit} if + dup (1001) eq { + dir 2 eq {pop left exit} {pop right exit} ifelse + } { % 0110 + dir 1 eq {pop down exit} {pop up exit} ifelse } ifelse - [x y] - } ifelse + } repeat x sx eq y sy eq and dir sdir eq and {exit} if } loop counttomark array astore exch pop - % Invert the interior of the path - /x x 1 add def /y y 1 add def - /t x y mxyget 1 xor def - mark x y { - counttomark 0 eq {exit} if - /y exch def /x exch def - x y mxyget t ne { - 0 x 1 sub -1 0 {dup y misborder {exch pop exit} if pop} for - pixx 1 sub x 1 add 1 pixx 1 sub {dup y misborder {exch pop exit} if pop} for - 1 exch { % From left to right border + } def + + % Set RGB or CMYK color depending on length of given hex string + /setanycolor { + /anycolor exch def + anycolor length 6 eq { + (< >) 8 string copy dup 1 anycolor putinterval cvx exec {255 div} forall setrgbcolor + } if + anycolor length 8 eq { + (< >) 10 string copy dup 1 anycolor putinterval cvx exec {255 div} forall setcmykcolor + } if + } def + + % Plot a layer of single colour + /drawlayer { + + /pixsorig pixs def + /pixs exch def + + % Pad the bitmap on all sides + /pixs [ + pixx 2 add {0} repeat + 0 pixx pixs length 1 sub { + 0 exch + pixs exch pixx getinterval aload pop + 0 + } for + pixx 2 add {0} repeat + ] def + /pixx pixx 2 add def + /pixy pixy 2 add def + + % Cache of visited corners for each direction + /cache [ pixs length {0} repeat ] def + + % Construct paths by tracing regions avoiding duplication by using the cache + /paths [ + 0 1 pixy 2 sub { + /j exch def + 0 1 pixx 2 sub { /i exch def - i y misborder not { - t i y mxyset - i y xyinvert + /k i j abcd def + k (0001) eq k (1001) eq or { % Black region stem corners + 8 i j cget 0 eq { + i j trace + } if + } if + k (1110) eq { % White region stem corner + 4 i j cget 0 eq { + i j trace + } if } if - i y 1 sub mxyget t ne i y 1 sub misborder not and {i y 1 sub} if - i y 1 add mxyget t ne i y 1 add misborder not and {i y 1 add} if } for - } if - } loop - pop + } for + ] def - % Walk the path to clear the border information - dup 0 get aload pop /y1 exch def /x1 exch def - dup dup length 1 sub 1 exch getinterval { - aload pop /y2 exch def /x2 exch def - x2 x1 gt { x1 2 x2 1 sub {y1 mclear4} for } if - y2 y1 gt { y1 2 y2 1 sub {x1 exch mclear4} for } if - x2 x1 lt { x1 -2 x2 1 add {y1 mclear4} for } if - y2 y1 lt { y1 -2 y2 1 add {x1 exch mclear4} for } if - /x1 x2 def /y1 y2 def + % Revert the bitmap size + /pixx pixx 2 sub def + /pixy pixy 2 sub def + + % Draw the image + newpath + paths { + /p exch def + /len p length def + p len 1 sub get aload pop + p 0 get aload pop + 0 1 len 1 sub { % x1 y1 x2 y2 + /i exch def + p i 1 add len mod get aload pop 6 -2 roll % x3 y3 x1 y1 x2 y2 + 5 index inkspreadh + 4 index 4 -1 roll lt {add} {sub} ifelse % y3<y1 ? x2+i : x2-i + 4 1 roll + 4 index inkspreadv + 4 index 4 -1 roll gt {add} {sub} ifelse % x3>x1 ? y2+i : y2-i + 4 -1 roll exch pixy exch sub + i 0 eq {moveto} {lineto} ifelse + } for % x2 y2 x3 y3 + closepath + pop pop pop pop } forall + fill - % Discard duplicate final point - dup length 1 sub 0 exch getinterval + /pixs pixsorig def - } bind def + } def - % Pad the bitmap on all sides - /pixs [ - pixx 2 add {0} repeat - 0 pixx pixs length 1 sub { - 0 exch - pixs exch pixx getinterval aload pop - 0 - } for - pixx 2 add {0} repeat - ] def - /pixx pixx 2 add def - /pixy pixy 2 add def + /drawlayerdots { - % Track inverted regions and working space - /m [ pixs length {0} repeat ] def + /pixsorig pixs def + /pixs exch def - % Construct paths by tracing and inverting each dark region - /paths [ - 0 1 pixy 1 sub { - /j exch def - 0 1 pixx 1 sub { - /i exch def - i j xyget 1 eq { - i 1 sub j 1 sub trace - } if - } for + newpath + 0 1 pixs length 1 sub { + dup pixx mod /x exch def + pixx idiv /y exch def + x y xyget 1 eq { + x 0.5 add pixy y sub 0.5 sub moveto + x 0.5 add pixy y sub 0.5 sub 0.5 inkspread sub 0 360 arc + } if } for - ] def + fill - % Revert the bitmap size - /pixx pixx 2 sub def - /pixy pixy 2 sub def + /pixs pixsorig def - % Set RGB or CMYK color depending on length of given hex string - /setanycolor { - /anycolor exch def - anycolor length 6 eq { - (< >) 8 string copy dup 1 anycolor putinterval cvx exec {255 div} forall setrgbcolor - } if - anycolor length 8 eq { - (< >) 10 string copy dup 1 anycolor putinterval cvx exec {255 div} forall setcmykcolor - } if - } bind def + } def gsave % Draw the image + /inkspread inkspread 2 div def /inkspreadh inkspreadh 2 div def /inkspreadv inkspreadv 2 div def currentpoint translate width pixx div 72 mul height pixy div 72 mul scale 0 0 moveto pixx 0 lineto pixx pixy lineto 0 pixy lineto closepath backgroundcolor (unset) ne { gsave backgroundcolor setanycolor fill grestore } if - barcolor (unset) ne { barcolor setanycolor } if - newpath - paths { - /p exch def - /len p length def - p len 1 sub get aload pop - p 0 get aload pop - 0 1 len 1 sub { % x1 y1 x2 y2 - /i exch def - p i 1 add len mod get aload pop 6 -2 roll % x3 y3 x1 y1 x2 y2 - 5 index inkspreadh - 4 index 4 -1 roll lt {add} {sub} ifelse % y3<y1 ? x2+i : x2-i - 4 1 roll - 4 index inkspreadv - 4 index 4 -1 roll gt {add} {sub} ifelse % x3>x1 ? y2+i : y2-i - 4 -1 roll exch pixy exch sub - i 0 eq {moveto} {lineto} ifelse - } for % x2 y2 x3 y3 - closepath - pop pop pop pop + + colormap (unset) eq { + /colormap << 1 barcolor >> def + } if + + colormap { + setanycolor + /key exch def + [ + pixs { key eq {1} {0} ifelse } forall + ] dotty {drawlayerdots} {drawlayer} ifelse } forall - fill % Display the text for elements in the text array textcolor (unset) ne { textcolor setanycolor } if @@ -597,14 +3760,14 @@ begin /textascent exch def /textwidth tstr stringwidth pop tstr length 1 sub textgaps mul add def - /textxpos textxoffset x textwidth sub 2 div add def + /textxpos textxoffset pixx textwidth sub 2 div add def textxalign (left) eq { /textxpos textxoffset def } if - textxalign (right) eq { /textxpos x textxoffset sub textwidth sub def } if + textxalign (right) eq { /textxpos pixx textxoffset sub textwidth sub def } if textxalign (offleft) eq { /textxpos textwidth textxoffset add neg def } if - textxalign (offright) eq { /textxpos x textxoffset add def } if - textxalign (justify) eq textwidth x lt and { + textxalign (offright) eq { /textxpos pixx textxoffset add def } if + textxalign (justify) eq textwidth pixx lt and { /textxpos 0 def - /textgaps x textwidth sub tstr length 1 sub div def + /textgaps pixx textwidth sub tstr length 1 sub div def } if /textypos textyoffset textascent add 1 add neg def textyalign (above) eq { /textypos textyoffset pixy add 1 add def } if @@ -617,7 +3780,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /renmatrix dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -627,10 +3792,10 @@ end % --BEGIN RENDERER renmaximatrix-- % --REQUIRES preamble raiseerror-- -%%BeginResource: uk.co.terryburton.bwipp renmaximatrix 0.0 2017040400 52341 55461 -%%BeginData: 79 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp renmaximatrix 0.0 2022082100 50058 49824 +%%BeginData: 81 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put begin /renmaximatrix { @@ -659,24 +3824,24 @@ begin anycolor length 8 eq { (< >) 10 string copy dup 1 anycolor putinterval cvx exec {255 div} forall setcmykcolor } if - } bind def + } def gsave currentpoint translate - 2.4945 dup scale % from 1pt to 1.88mm + 2.4945 dup scale % from 1pt to 0.88mm 0 0 moveto 30 0 lineto 30 29 lineto 0 29 lineto closepath - backgroundcolor (unset) ne { gsave backgroundcolor setanycolor fill grestore } if + backgroundcolor (unset) ne { gsave backgroundcolor setanycolor fill grestore } if barcolor (unset) ne { barcolor setanycolor } if 0.5 0.5774 translate newpath pixs { - dup - /x exch 30 mod def + dup + /x exch 30 mod def /y exch 30 idiv def y 2 mod 0 eq {x} {x 0.5 add} ifelse 32 y sub 0.8661 mul @@ -704,7 +3869,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /renmaximatrix dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -713,15 +3880,17 @@ end % --END RENDERER renmaximatrix-- % --BEGIN ENCODER ean5-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: EAN-5 (5 digit addon) % --EXAM: 90200 % --EXOP: includetext guardwhitespace % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp ean5 0.0 2017040400 68958 65237 -%%BeginData: 135 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp ean5 0.0 2022082100 67660 63946 +%%BeginData: 147 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -732,14 +3901,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusSanL-Regu def + /textfont /Helvetica def /textsize 12 def /textxoffset 0 def /textyoffset (unset) def - /height 0.7 def - + /height 0.7 def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -749,8 +3919,8 @@ begin } loop currentdict end /options exch def } if - options {def} forall - + options {def} forall + /textfont textfont cvlit def /textsize textsize cvr def /height height cvr def @@ -761,6 +3931,8 @@ begin /textyoffset textyoffset cvr def } ifelse + /ean5 //loadctx exec + % Validate input barcode length 5 ne { /bwipp.ean5badLength (EAN-5 add-on must be 5 digits) //raiseerror exec @@ -770,7 +3942,8 @@ begin /bwipp.ean5badCharacter (EAN-5 add-on must contain only digits) //raiseerror exec } if } forall - + +{ % Create an array containing the character mappings /encs [ (3211) (2221) (2122) (1411) (1132) @@ -786,6 +3959,8 @@ begin [ (11000) (10100) (10010) (10001) (01100) (00110) (00011) (01010) (01001) (00101) ] def +} ctxdef + /checksum 0 def 0 1 4 { /i exch def @@ -801,7 +3976,7 @@ begin /sbs 31 string def /txt 5 array def - + 0 1 4 { /i exch def @@ -849,9 +4024,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /ean5 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -860,15 +4039,17 @@ end % --END ENCODER ean5-- % --BEGIN ENCODER ean2-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: EAN-2 (2 digit addon) % --EXAM: 05 % --EXOP: includetext guardwhitespace % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp ean2 0.0 2017040400 67275 63499 -%%BeginData: 120 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp ean2 0.0 2022082100 66307 62648 +%%BeginData: 133 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -879,14 +4060,15 @@ begin /options exch def % We are given an options string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusSanL-Regu def + /textfont /Helvetica def /textsize 12 def /textxoffset 0 def /textyoffset (unset) def /height 0.7 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -897,7 +4079,7 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /height height cvr def @@ -908,6 +4090,8 @@ begin /textyoffset textyoffset cvr def } ifelse + /ean2 //loadctx exec + % Validate input barcode length 2 ne { /bwipp.ean2badLength (EAN-2 add-on must be 2 digits) //raiseerror exec @@ -917,7 +4101,8 @@ begin /bwipp.ean2badCharacter (EAN-2 add-on must contain only digits) //raiseerror exec } if } forall - + +{ % Create an array containing the character mappings /encs [ (3211) (2221) (2122) (1411) (1132) @@ -929,11 +4114,14 @@ begin /barchars (0123456789) def % Determine the mirror map based on mod 4 checksum - /mirrormap [(00) (01) (10) (11)] barcode 0 2 getinterval cvi 4 mod get def + /mirrormaps [(00) (01) (10) (11)] def +} ctxdef + + /mirrormap mirrormaps barcode 0 2 getinterval cvi 4 mod get def /sbs 13 string def /txt 2 array def - + 0 1 1 { /i exch def @@ -950,7 +4138,7 @@ begin length /indx exch def % indx is the length of pre pop pop % Discard seek and post /enc encs indx get def % Get the indxth encoding - mirrormap i get 49 eq { % Reverse enc if 1 in this position in mirrormap + mirrormap i get 49 eq { % Reverse enc if 1 in this position in mirrormap /enclen enc length def /revenc enclen string def 0 1 enclen 1 sub { @@ -981,9 +4169,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /ean2 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -992,15 +4184,17 @@ end % --END ENCODER ean2-- % --BEGIN ENCODER ean13-- -% --REQUIRES preamble raiseerror renlinear ean5 ean2-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear ean5 ean2-- % --DESC: EAN-13 % --EXAM: 2112345678900 % --EXOP: includetext guardwhitespace % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp ean13 0.0 2017040400 95001 91176 -%%BeginData: 215 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp ean13 0.0 2022082100 87150 86773 +%%BeginData: 226 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /ean2 dup /uk.co.terryburton.bwipp findresource put @@ -1013,9 +4207,10 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusSanL-Regu def + /textfont /Helvetica def /textsize 12 def /textxoffset -10 def /textyoffset -4 def @@ -1042,12 +4237,14 @@ begin /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def /height height cvr def - /addongap addongap cvr def + /addongap addongap cvr def addontextfont (unset) ne {/addontextfont addontextfont cvlit def} if addontextsize (unset) ne {/addontextsize addontextsize cvr def} if addontextxoffset (unset) ne {/addontextxoffset addontextxoffset cvr def} if addontextyoffset (unset) ne {/addontextyoffset addontextyoffset cvr def} if + /ean13 //loadctx exec + % Split off the addon barcode ( ) search { /barcode exch def @@ -1093,6 +4290,7 @@ begin pad 12 checksum 48 add put % Put ascii for checksum at end of pad /barcode pad def +{ % Create an array containing the character mappings /encs [ (3211) (2221) (2122) (1411) (1132) @@ -1108,10 +4306,11 @@ begin [ (000000) (001011) (001101) (001110) (010011) (011001) (011100) (010101) (010110) (011010) ] def +} ctxdef /sbs 59 string def /txt 13 array def - + % Put the start character sbs 0 encs 10 get putinterval @@ -1191,8 +4390,8 @@ begin /bbs [bbs aload pop addcode (bbs) get {.075 add} forall] def /txt [txt aload pop addcode (txt) get aload pop] def /guardrightypos height 72 mul 6 sub def - } if - + } if + % Return the arguments << /ren //renlinear @@ -1208,9 +4407,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /ean13 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -1219,15 +4422,17 @@ end % --END ENCODER ean13-- % --BEGIN ENCODER ean8-- -% --REQUIRES preamble raiseerror renlinear ean5 ean2-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear ean5 ean2-- % --DESC: EAN-8 % --EXAM: 02345673 % --EXOP: includetext guardwhitespace % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp ean8 0.0 2017040400 91447 87627 -%%BeginData: 196 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp ean8 0.0 2022082100 84180 83888 +%%BeginData: 207 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /ean2 dup /uk.co.terryburton.bwipp findresource put @@ -1240,9 +4445,10 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusSanL-Regu def + /textfont /Helvetica def /textsize 12 def /textxoffset 4 def /textyoffset -4 def @@ -1252,7 +4458,7 @@ begin /addontextsize (unset) def /addontextxoffset (unset) def /addontextyoffset (unset) def - + % Parse the input options, either a string or a dict options type /stringtype eq { 1 dict begin @@ -1263,7 +4469,7 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textxoffset textxoffset cvr def @@ -1275,6 +4481,8 @@ begin addontextxoffset (unset) ne {/addontextxoffset addontextxoffset cvr def} if addontextyoffset (unset) ne {/addontextyoffset addontextyoffset cvr def} if + /ean8 //loadctx exec + % Split off the addon barcode ( ) search { /barcode exch def @@ -1319,8 +4527,9 @@ begin pad 0 barcode putinterval % Add barcode to the start of the pad pad 7 checksum 48 add put % Put ascii for checksum at end of pad /barcode pad def - + % Create an array containing the character mappings +{ /encs [ (3211) (2221) (2122) (1411) (1132) (1231) (1114) (1312) (1213) (3112) @@ -1329,10 +4538,11 @@ begin % Create a string of the available characters /barchars (0123456789) def +} ctxdef /sbs 43 string def /txt 8 array def - + % Put the start character sbs 0 encs 10 get putinterval @@ -1398,7 +4608,7 @@ begin /bbs [bbs aload pop addcode (bbs) get {.075 add} forall] def /txt [txt aload pop addcode (txt) get aload pop] def /guardrightypos height 72 mul 6 sub def - } if + } if % Return the arguments << @@ -1416,9 +4626,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /ean8 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -1427,15 +4641,17 @@ end % --END ENCODER ean8-- % --BEGIN ENCODER upca-- -% --REQUIRES preamble raiseerror renlinear ean5 ean2-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear ean5 ean2-- % --DESC: UPC-A % --EXAM: 416000336108 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp upca 0.0 2017040400 100538 100055 -%%BeginData: 248 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp upca 0.0 2022082100 92023 91540 +%%BeginData: 259 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /ean2 dup /uk.co.terryburton.bwipp findresource put @@ -1448,13 +4664,14 @@ begin /options exch def /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusSanL-Regu def + /textfont /Helvetica def /textsize 12 def /textxoffset -7 def /textyoffset -4 def - /height 1 def + /height 1 def /addongap 12 def /addontextfont (unset) def /addontextsize (unset) def @@ -1470,7 +4687,7 @@ begin } loop currentdict end /options exch def } if - options {def} forall + options {def} forall /textfont textfont cvlit def /textsize textsize cvr def @@ -1483,6 +4700,8 @@ begin addontextxoffset (unset) ne {/addontextxoffset addontextxoffset cvr def} if addontextyoffset (unset) ne {/addontextyoffset addontextyoffset cvr def} if + /upca //loadctx exec + % Split off the addon barcode ( ) search { /barcode exch def @@ -1550,7 +4769,7 @@ begin addon length 0 ne addon length 2 ne and addon length 5 ne and { /bwipp.upcAbadAddOnLength (Add-on for UPC-A must be 2 or 5 digits) //raiseerror exec } if - + % Add checksum digit to barcode /pad 12 string def % Create pad one bigger than barcode /checksum 0 def @@ -1574,6 +4793,7 @@ begin /barcode pad def % Create an array containing the character mappings +{ /encs [ (3211) (2221) (2122) (1411) (1132) (1231) (1114) (1312) (1213) (3112) @@ -1582,6 +4802,7 @@ begin % Create a string of the available characters /barchars (0123456789) def +} ctxdef /sbs 59 string def /txt 12 array def @@ -1659,7 +4880,7 @@ begin /bbs [bbs aload pop addcode (bbs) get {.075 add} forall] def /txt [txt aload pop addcode (txt) get aload pop] def /guardrightypos height 72 mul 6 sub def - } if + } if % Return the arguments << @@ -1676,9 +4897,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /upca dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -1687,15 +4912,17 @@ end % --END ENCODER upca-- % --BEGIN ENCODER upce-- -% --REQUIRES preamble raiseerror renlinear ean5 ean2-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear ean5 ean2-- % --DESC: UPC-E % --EXAM: 00123457 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp upce 0.0 2017040400 106367 105719 -%%BeginData: 287 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp upce 0.0 2022082100 96548 96108 +%%BeginData: 298 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /ean2 dup /uk.co.terryburton.bwipp findresource put @@ -1708,9 +4935,10 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusSanL-Regu def + /textfont /Helvetica def /textsize 12 def /textxoffset -7 def /textyoffset -4 def @@ -1720,7 +4948,7 @@ begin /addontextsize (unset) def /addontextxoffset (unset) def /addontextyoffset (unset) def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -1731,7 +4959,7 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textxoffset textxoffset cvr def @@ -1743,6 +4971,8 @@ begin addontextxoffset (unset) ne {/addontextxoffset addontextxoffset cvr def} if addontextyoffset (unset) ne {/addontextyoffset addontextyoffset cvr def} if + /upce //loadctx exec + % Split off the addon barcode ( ) search { /barcode exch def @@ -1812,6 +5042,7 @@ begin /bwipp.upcEbadNumberSystem (UPC-E must have number system 0 or 1) //raiseerror exec } if +{ % Create an array containing the character mappings /encs [ (3211) (2221) (2122) (1411) (1132) @@ -1826,6 +5057,7 @@ begin [ (000111) (001011) (001101) (001110) (010011) (011001) (011100) (010101) (010110) (011010) ] def +} ctxdef % Derive the equivalent UPC-A for its checksum 1 { % Common exit @@ -1909,7 +5141,7 @@ begin length /indx exch def % indx is the length of pre pop pop % Discard seek and post /enc encs indx get def % Get the indxth encoding - mirrormap i 1 sub get 49 eq { % Reverse enc if 1 in this position in mirrormap + mirrormap i 1 sub get 49 eq { % Reverse enc if 1 in this position in mirrormap /enclen enc length def /revenc enclen string def 0 1 enclen 1 sub { @@ -1975,9 +5207,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /upce dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -1986,15 +5222,15 @@ end % --END ENCODER upce-- % --BEGIN ENCODER isbn-- -% --REQUIRES preamble raiseerror renlinear ean5 ean2 ean13-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear ean5 ean2 ean13-- % --DESC: ISBN -% --EXAM: 978-1-56581-231-4 52250 +% --EXAM: 978-1-56581-231-4 90000 % --EXOP: includetext guardwhitespace % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp isbn 0.0 2017040400 104057 106666 -%%BeginData: 252 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp isbn 0.0 2022082100 95230 94623 +%%BeginData: 255 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /ean13 dup /uk.co.terryburton.bwipp findresource put @@ -2006,16 +5242,17 @@ begin /options exch def % We are given an options string /barcode exch def % We are given the isbn text with dashes + /ctx null def /dontdraw false def /includetext false def % Enable/disable ISBN text - /isbntextfont /NimbusMonL-Regu def + /isbntextfont /Courier def /isbntextsize 9 def /isbntextxoffset (unset) def /isbntextyoffset (unset) def /height 1 def - /addongap 12 def + /addongap 12 def /legacy false def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -2026,7 +5263,7 @@ begin currentdict end /options exch def } if options {def} forall - + /isbntextfont isbntextfont cvlit def /isbntextsize isbntextsize cvr def isbntextxoffset (unset) ne {/isbntextxoffset isbntextxoffset cvr def} if @@ -2194,7 +5431,7 @@ begin % Convert ISBN digits to EAN-13 /barcode 12 string def - isbn length 9 eq { + isbn length 9 eq { barcode 0 (978) putinterval barcode 3 isbn putinterval } { @@ -2203,7 +5440,7 @@ begin % Append the addon addon () ne { - 12 addon length add 1 add string + 12 addon length add 1 add string dup 0 barcode putinterval dup 12 ( ) putinterval dup 13 addon putinterval @@ -2212,7 +5449,7 @@ begin % Get the result of encoding with ean13 options (dontdraw) true put - options (addongap) addongap put + options (addongap) addongap put /args barcode options //ean13 exec def % Add the ISBN text @@ -2240,8 +5477,10 @@ begin dontdraw not //renlinear if end - -} bind def + +} +[/barcode] {null def} forall +bind def /isbn dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -2250,15 +5489,15 @@ end % --END ENCODER isbn-- % --BEGIN ENCODER ismn-- -% --REQUIRES preamble raiseerror renlinear ean5 ean2 ean13-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear ean5 ean2 ean13-- % --DESC: ISMN % --EXAM: 979-0-2605-3211-3 % --EXOP: includetext guardwhitespace % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp ismn 0.0 2017040400 99901 102499 -%%BeginData: 231 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp ismn 0.0 2022082100 91802 91288 +%%BeginData: 234 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /ean13 dup /uk.co.terryburton.bwipp findresource put @@ -2270,14 +5509,15 @@ begin /options exch def % We are given an options string /barcode exch def % We are given the ismn text with dashes + /ctx null def /dontdraw false def /includetext false def % Enable/disable ISMN text - /ismntextfont /NimbusMonL-Regu def + /ismntextfont /Courier def /ismntextsize 9 def /ismntextxoffset (unset) def /ismntextyoffset (unset) def /height 1 def - /addongap 12 def + /addongap 12 def /legacy false def % Parse the input options @@ -2290,14 +5530,14 @@ begin currentdict end /options exch def } if options {def} forall - + /ismntextfont ismntextfont cvlit def /ismntextsize ismntextsize cvr def ismntextxoffset (unset) ne {/ismntextxoffset ismntextxoffset cvr def} if ismntextyoffset (unset) ne {/ismntextyoffset ismntextyoffset cvr def} if /height height cvr def /addongap addongap cvr def - + % Split off the addon barcode ( ) search { /barcode exch def @@ -2442,11 +5682,11 @@ begin /ismntxt pad def % Convert ISMN digits to EAN-13 - /barcode ismn 0 12 getinterval def + /barcode ismn 0 12 getinterval def % Append the addon addon () ne { - 12 addon length add 1 add string + 12 addon length add 1 add string dup 0 barcode putinterval dup 12 ( ) putinterval dup 13 addon putinterval @@ -2455,7 +5695,7 @@ begin % Get the result of encoding with ean13 options (dontdraw) true put - options (addongap) addongap put + options (addongap) addongap put /args barcode options //ean13 exec def % Add the ISMN text @@ -2483,8 +5723,10 @@ begin dontdraw not //renlinear if end - -} bind def + +} +[/barcode] {null def} forall +bind def /ismn dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -2493,15 +5735,15 @@ end % --END ENCODER ismn-- % --BEGIN ENCODER issn-- -% --REQUIRES preamble raiseerror renlinear ean2 ean5 ean13-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear ean2 ean5 ean13-- % --DESC: ISSN % --EXAM: 0311-175X 00 17 % --EXOP: includetext guardwhitespace % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp issn 0.0 2017040400 89213 88719 -%%BeginData: 176 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp issn 0.0 2022082100 83234 82612 +%%BeginData: 179 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /ean13 dup /uk.co.terryburton.bwipp findresource put @@ -2513,14 +5755,15 @@ begin /options exch def % We are given an options string /issntxt exch def % We are given the issn text with dashes + /ctx null def /dontdraw false def /includetext false def % Enable/disable ISSN text - /issntextfont /NimbusMonL-Regu def + /issntextfont /Courier def /issntextsize 9 def /issntextxoffset (unset) def /issntextyoffset (unset) def /height 1 def - /addongap 12 def + /addongap 12 def % Parse the input options options type /stringtype eq { @@ -2532,7 +5775,7 @@ begin currentdict end /options exch def } if options {def} forall - + /issntextfont issntextfont cvlit def /issntextsize issntextsize cvr def issntextxoffset (unset) ne {/issntextxoffset issntextxoffset cvr def} if @@ -2626,7 +5869,7 @@ begin /issntxt pad def % Convert ISSN digits to EAN-13 - /barcode issn 0 7 getinterval def + /barcode issn 0 7 getinterval def % Append the sequence variant /barcode 12 string def @@ -2636,7 +5879,7 @@ begin % Append the addon addon () ne { - 12 addon length add 1 add string + 12 addon length add 1 add string dup 0 barcode putinterval dup 12 ( ) putinterval dup 13 addon putinterval @@ -2645,7 +5888,7 @@ begin % Get the result of encoding with ean13 options (dontdraw) true put - options (addongap) addongap put + options (addongap) addongap put /args barcode options //ean13 exec def % Add the ISSN text @@ -2672,7 +5915,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /issn dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -2680,17 +5925,115 @@ end %%EndResource % --END ENCODER issn-- +% --BEGIN ENCODER mands-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear ean2 ean5 ean8-- +% --DESC: Marks & Spencer +% --EXAM: 0642118 +% --EXOP: includetext +% --RNDR: renlinear +%%BeginResource: uk.co.terryburton.bwipp mands 0.0 2022082100 71641 71714 +%%BeginData: 83 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /renlinear dup /uk.co.terryburton.bwipp findresource put +dup /ean8 dup /uk.co.terryburton.bwipp findresource put +begin +/mands { + + 20 dict begin + + /options exch def + /barcode exch def + + /ctx null def + /dontdraw false def + /includetext false def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + /barlen barcode length def + + % Validate the input + barlen 7 ne barlen 8 ne and { + /bwipp.MandSbadLength (M&S barcode must be 7 or 8 characters) //raiseerror exec + } if + + barlen 7 eq { + /barcode (00000000) 8 string copy dup 1 barcode putinterval def + } if + + % Get the result of encoding with ean8 + options (dontdraw) true put + /args barcode options //ean8 exec def + + % Remove the centre guard + args (bbs) get dup + dup 2 get 10 exch put + dup 2 get 11 exch put + args (bhs) get dup + dup 2 get 10 exch put + dup 2 get 11 exch put + + % Fix up the text for 7-digit inputs + /txt args (txt) get def + barlen 7 eq { + 0 1 6 { + txt exch 2 copy + 1 add get 0 get 3 1 roll get + 0 get exch 0 exch putinterval + } for + txt 7 get 0 get 0 ( ) putinterval + } if + + % Add the M and S guards + 10 array dup 0 txt putinterval /txt exch def + txt 0 get dup length array copy txt exch 8 exch put + txt 0 get dup length array copy txt exch 9 exch put + txt 8 get 0 (M) put txt 8 get 1 -12 put + txt 9 get 0 (S) put txt 9 get 1 69 put + + args (txt) txt put + args (opt) options put + args + + dontdraw not //renlinear if + + end + +} +[/barcode] {null def} forall +bind def +/mands dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER mands-- + % --BEGIN ENCODER code128-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renlinear-- % --DESC: Code 128 % --EXAM: Count01234567! % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp code128 0.0 2017040400 143323 149453 -%%BeginData: 455 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp code128 0.0 2022082100 125925 128825 +%%BeginData: 438 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin /code128 { @@ -2700,9 +6043,10 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def @@ -2729,40 +6073,37 @@ begin /textyoffset textyoffset cvr def /height height cvr def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if - - /barlen barcode length def + /code128 //loadctx exec % Special function characters - /sta -1 def /stb -2 def /stc -3 def - /swa -4 def /swb -5 def /swc -6 def - /fn1 -7 def /fn2 -8 def /fn3 -9 def +{ + /sta -1 def /stb -2 def /stc -3 def + /swa -4 def /swb -5 def /swc -6 def + /fn1 -7 def /fn2 -8 def /fn3 -9 def /fn4 -10 def /sft -11 def /stp -12 def /lka -13 def /lkc -14 def % CC-A/B and CC-C linkage +} ctxdef + + % Parse the input + /fncvals << + /parse parse + /parsefnc parsefnc + (FNC1) fn1 + (FNC1) fn1 + (FNC2) fn2 + (FNC3) fn3 +% (FNC4) fn4 Not user accessible as encoded automatically + (LNKA) lka + (LNKC) lkc + >> def + /msg barcode fncvals //parseinput exec def + /msglen msg length def % Character maps for each state +{ /charmaps [ % A B C A B C A B C - [ 32 32 (00) ] [ (!) (!) (01) ] [ (") (") (02) ] % 0-2 + [ 32 32 (00) ] [ (!) (!) (01) ] [ (") (") (02) ] % 0-2 [ (#) (#) (03) ] [ ($) ($) (04) ] [ (%) (%) (05) ] % 3-5 [ (&) (&) (06) ] [ (') (') (07) ] [ 40 40 (08) ] % 6-8 [ 41 41 (09) ] [ (*) (*) (10) ] [ (+) (+) (11) ] % 9-11 @@ -2798,8 +6139,8 @@ begin [ swc swc (99) ] [ swb fn4 swb ] [ fn4 swa swa ] % 99-101 [ fn1 fn1 fn1 ] [ sta sta sta ] [ stb stb stb ] % 102-104 [ stc stc stc ] [ stp stp stp ] % 105-106 - ] def - + ] def + % Invert charmaps to give character to value maps for each state /charvals [ 109 dict 109 dict 109 dict ] def 0 1 charmaps length 1 sub { @@ -2808,12 +6149,13 @@ begin 0 1 2 { /j exch def encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required - charvals j get exch i put + charvals j get exch i put } for } for /seta charvals 0 get def /setb charvals 1 get def /setc charvals 2 get def +} ctxdef % Include pseudo characters for GS1-128 Composite linkage identifiers seta lka seta swb get put seta lkc seta swc get put @@ -2823,10 +6165,10 @@ begin raw {/encoding (raw) def} if encoding (raw) eq { - /cws barlen array def + /cws barcode length array def /i 0 def /j 0 def { % loop - i barlen eq {exit} if + i barcode length eq {exit} if /cw barcode i 1 add 3 getinterval cvi def cws j cw put /i i 4 add def @@ -2836,40 +6178,13 @@ begin /text () def } if - encoding (auto) eq { - - /fncvals << - (FNC1) fn1 - (FNC2) fn2 - (FNC3) fn3 -% (FNC4) fn4 Not user accessible as encoded automatically - (LNKA) lka - (LNKC) lkc - >> def + encoding (auto) eq { - % Convert input into bytes accounting for FNC and LNK characters - /msg barlen array def - /text barlen string def - /i 0 def /j 0 def { - i barlen eq {exit} if - /char barcode i get def - text j char put - parsefnc char 94 eq and i barlen 4 sub lt and { - barcode i 1 add get 94 ne { - /char fncvals barcode i 1 add 4 getinterval get def - text j ( ) putinterval - /i i 4 add def - } { - /i i 1 add def - } ifelse - } if - msg j char put - /i i 1 add def - /j j 1 add def - } loop - /msg msg 0 j getinterval def - /msglen msg length def - /text text 0 j getinterval def + /text msglen string def + 0 1 msglen 1 sub { + /i exch def + text i msg i get dup 0 lt { pop 32 } if put + } for % Standard and extended ASCII runlength at position /numSA [ msglen {0} repeat 0 ] def @@ -2912,26 +6227,28 @@ begin p msglen ge {exit} if msg p get dup setc exch known not {pop exit} if - fn1 eq { + dup -1 le { % FNC1 in odd position of run like two digits - s 2 mod 0 eq {/s s 1 add def} {exit} ifelse - } if + fn1 eq s 2 mod 0 eq and {/s s 1 add def} {exit} ifelse + } { + pop + } ifelse /n n 1 add def /s s 1 add def /p p 1 add def } loop n s - } bind def + } def % Encoding for each alphabet /enca { seta exch get cws exch j exch put /j j 1 add def - } bind def + } def /encb { setb exch get cws exch j exch put /j j 1 add def - } bind def + } def /encc { dup type /arraytype ne { setc exch get @@ -2940,11 +6257,11 @@ begin } ifelse cws exch j exch put /j j 1 add def - } bind def + } def % Character exclusively in either alphabet A or B - /anotb {dup seta exch known exch setb exch known not and} bind def - /bnota {dup setb exch known exch seta exch known not and} bind def + /anotb {dup seta exch known exch setb exch known not and} def + /bnota {dup setb exch known exch seta exch known not and} def % Pre-compute relative position of next anotb and next bnota characters /nextanotb [ msg length {0} repeat 9999 ] def @@ -2964,9 +6281,9 @@ begin } for % Does a-only come before b-only after given position and vice versa - /abeforeb {dup nextanotb exch get exch nextbnota exch get lt} bind def - /bbeforea {dup nextbnota exch get exch nextanotb exch get lt} bind def - + /abeforeb {dup nextanotb exch get exch nextbnota exch get lt} def + /bbeforea {dup nextbnota exch get exch nextanotb exch get lt} def + /cws barcode length 2 mul 3 add array def % Select start character @@ -2988,25 +6305,25 @@ begin /cset (setc) def exit } if - 0 abeforeb { + 0 abeforeb { sta enca /cset (seta) def - exit - } if + exit + } if stb enca /cset (setb) def exit } loop % Main encoding loop - /i 0 def { + /i 0 def { i msglen eq {exit} if - + i numsscr /nums exch def /nchars exch def - + % Determine switches and shifts { % common exit - cset (seta) eq cset (setb) eq or nums 4 ge and + cset (seta) eq cset (setb) eq or nums 4 ge and msg i get fn1 ne and { nums 2 mod 0 eq { swc cset (seta) eq {enca} {encb} ifelse @@ -3020,9 +6337,9 @@ begin exit } ifelse } if - cset (setb) eq msg i get anotb and { + cset (setb) eq msg i get anotb and { i msglen 1 sub lt { - i 1 add bbeforea { + i 1 add bbeforea { sft encb msg i get enca /i i 1 add def @@ -3046,7 +6363,7 @@ begin /cset (setb) def exit } if - cset (setc) eq nums 2 lt and { + cset (setc) eq nums 2 lt and msg i get -1 gt and { i abeforeb { swa encc /cset (seta) def @@ -3056,7 +6373,7 @@ begin /cset (setb) def exit } if - + % No switches or latches so encode cset (seta) eq { msg i get enca @@ -3069,19 +6386,19 @@ begin exit } if cset (setc) eq { - msg i get fn1 eq { - fn1 encc + msg i get -1 le { + msg i get encc /i i 1 add def } { msg i 2 getinterval encc - /i i 2 add def + /i i 2 add def } ifelse exit } if - + exit } loop - + } loop /cws cws 0 j getinterval def } if % auto encoding @@ -3098,6 +6415,7 @@ begin cws j 1 add seta stp get put % Create an array containing the character mappings +{ /encs [ (212222) (222122) (222221) (121223) (121322) (131222) (122213) (122312) (132212) (221213) (221312) (231212) (112232) (122132) @@ -3116,6 +6434,7 @@ begin (411311) (113141) (114131) (311141) (411131) (211412) (211214) (211232) (2331112) ] def +} ctxdef % Derive space bar succession /sbs cws length 6 mul 1 add string def @@ -3137,9 +6456,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /code128 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -3148,16 +6471,18 @@ end % --END ENCODER code128-- % --BEGIN ENCODER gs1-128-- -% --REQUIRES preamble raiseerror renlinear code128-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear code128-- % --DESC: GS1-128 % --EXAM: (01)95012345678903(3103)000123 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp gs1-128 0.0 2017040400 79997 83024 -%%BeginData: 158 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp gs1-128 0.0 2022082100 80068 76461 +%%BeginData: 114 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code128 dup /uk.co.terryburton.bwipp findresource put begin @@ -3168,16 +6493,20 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def /height 0.5 def /linkagea false def /linkagec false def - + /parse false def + /dontlint false def + /lintreqs false def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -3193,69 +6522,16 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def - - /text barcode def - - % Expand ordinals of the form ^NNN to ASCII - /expand { - /in exch def - /out in length string def - /j 0 def - in - { % loop - (^) search { - dup out exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi out exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup out exch j exch putinterval - length j add /j exch def - out 0 j getinterval exit - } ifelse - } loop - } bind def + /height height cvr def - % Parse out AIs - /ais [] def - /vals [] def - barcode dup length 1 sub 1 exch getinterval - { % loop - dup () eq {exit} if - (\)) search pop - exch pop - exch (\() search { - exch pop exch 3 1 roll - } { - () 3 1 roll - } ifelse - [ ais aload pop counttomark 2 add index ] /ais exch def - [ vals aload pop counttomark 1 add index expand ] /vals exch def - pop pop - } loop - pop + /text barcode def - % Pre-defined fixed length data field AIs - % any AI whose prefix is not included in this table must be - % terminated with "FNC1", even if it's fixed length - /aifixed 23 dict def - [ - 0 1 4 {} for - ] { - (00) 2 string copy dup dup 1 5 -1 roll 48 add put aifixed 3 1 roll put - } forall - [ - 11 1 20 {} for - 23 - 31 1 36 {} for - 41 - ] { - 10 2 string cvrs dup aifixed 3 1 roll put - } forall + barcode /ai //gs1process exec + /fncs exch def + /vals exch def + /ais exch def - % Create the code128 data + % Create the code128 data /fnc1 -1 def /c128 [ fnc1 ] def 0 1 ais length 1 sub { @@ -3267,7 +6543,7 @@ begin dup c128 length ai [ exch {} forall ] putinterval dup c128 length ai length add val [ exch {} forall ] putinterval /c128 exch def - i ais length 1 sub ne aifixed ai 0 2 getinterval known not and { % Append FNC1 + i ais length 1 sub ne fncs i get and { % Append FNC1 c128 length 1 add array dup 0 c128 putinterval dup c128 length fnc1 put @@ -3295,6 +6571,7 @@ begin /barcode barcode 0 j getinterval def % Get the result of encoding with code128 + options (parse) undef options (height) height put options (dontdraw) true put options (parsefnc) true put @@ -3304,12 +6581,14 @@ begin args (textxalign) (center) put args (opt) options put args - + dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /gs1-128 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -3318,15 +6597,15 @@ end % --END ENCODER gs1-128-- % --BEGIN ENCODER ean14-- -% --REQUIRES preamble raiseerror renlinear code128-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renlinear code128-- % --DESC: GS1-14 % --EXAM: (01) 0 46 01234 56789 3 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp ean14 0.0 2017040400 71172 70768 -%%BeginData: 105 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp ean14 0.0 2022082100 72494 72450 +%%BeginData: 108 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code128 dup /uk.co.terryburton.bwipp findresource put @@ -3338,9 +6617,10 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def @@ -3361,7 +6641,7 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def % Strip spaces from the given data /text barcode def @@ -3369,7 +6649,7 @@ begin {dup 32 ne {3 copy put pop 1 add} {pop} ifelse} forall 0 exch getinterval /barcode exch def /hasspace text length barcode length ne def - + % Validate the input barcode 0 4 getinterval (\(01\)) ne { /bwipp.ean14badAI (GS1-14 must begin with (01) application identifier) //raiseerror exec @@ -3388,7 +6668,7 @@ begin 0 1 12 { /i exch def /checksum checksum barcode i 4 add get 48 sub i 2 mod 0 eq {3 mul} if add def - } for + } for /checksum 10 checksum 10 mod sub 10 mod def barcode length 18 eq { barcode 17 get checksum 48 add ne { @@ -3421,12 +6701,14 @@ begin args (textxalign) (center) put args (opt) options put args - + dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /ean14 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -3435,15 +6717,15 @@ end % --END ENCODER ean14-- % --BEGIN ENCODER sscc18-- -% --REQUIRES preamble raiseerror renlinear code128-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renlinear code128-- % --DESC: SSCC-18 % --EXAM: (00) 0 0614141 123456789 0 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp sscc18 0.0 2017040400 71184 70775 -%%BeginData: 105 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp sscc18 0.0 2022082100 72506 72457 +%%BeginData: 108 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code128 dup /uk.co.terryburton.bwipp findresource put @@ -3455,14 +6737,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -3478,7 +6761,7 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def % Strip spaces from the given data /text barcode def @@ -3505,7 +6788,7 @@ begin 0 1 16 { /i exch def /checksum checksum barcode i 4 add get 48 sub i 2 mod 0 eq {3 mul} if add def - } for + } for /checksum 10 checksum 10 mod sub 10 mod def barcode length 22 eq { barcode 21 get checksum 48 add ne { @@ -3538,12 +6821,14 @@ begin args (textxalign) (center) put args (opt) options put args - + dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /sscc18 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -3552,15 +6837,17 @@ end % --END ENCODER sscc18-- % --BEGIN ENCODER code39-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Code 39 % --EXAM: THIS IS CODE 39 % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp code39 0.0 2017040400 75290 74970 -%%BeginData: 141 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp code39 0.0 2022082100 72416 68679 +%%BeginData: 154 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -3571,17 +6858,18 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includecheck false def /validatecheck false def /includetext false def /includecheckintext false def /hidestars false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -3592,16 +6880,20 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def + /code39 //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def /charvals 43 dict def 0 1 42 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -3627,6 +6919,7 @@ begin } if % Create an array containing the character mappings +{ /encs [ (1113313111) (3113111131) (1133111131) (3133111111) (1113311131) (3113311111) (1133311111) (1113113131) (3113113111) (1133113111) @@ -3638,6 +6931,7 @@ begin (1331311111) (1311113131) (3311113111) (1331113111) (1313131111) (1313111311) (1311131311) (1113131311) (1311313111) ] def +} ctxdef /sbs barlen includecheck {3} {2} ifelse add 10 mul string def /txt barlen includecheck {3} {2} ifelse add array def @@ -3679,7 +6973,7 @@ begin txt barlen 1 add [() barlen 1 add 16 mul textyoffset textfont textsize] put } ifelse } ifelse - + % Return the arguments << /ren //renlinear @@ -3694,9 +6988,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /code39 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -3705,16 +7003,19 @@ end % --END ENCODER code39-- % --BEGIN ENCODER code39ext-- -% --REQUIRES preamble raiseerror renlinear code39-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renlinear code39-- % --DESC: Code 39 Extended % --EXAM: Code39 Ext! % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp code39ext 0.0 2017040400 71403 71123 -%%BeginData: 110 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp code39ext 0.0 2022082100 71249 70993 +%%BeginData: 109 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code39 dup /uk.co.terryburton.bwipp findresource put begin @@ -3725,6 +7026,7 @@ begin /options exch def % We are given an options string /barcode exch def % We are given the code39extended text + /ctx null def /dontdraw false def /includetext false def /parse false def @@ -3740,26 +7042,17 @@ begin } if options {def} forall + /code39ext //loadctx exec + % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if + /fncvals << + /parse parse + /parseonly true + /parsefnc false + >> def + /barcode barcode fncvals //parseinput exec def + /barlen barcode length def + options (parse) undef % Validate the input barcode { @@ -3768,9 +7061,8 @@ begin } if } forall - /barlen barcode length def - % Extended alphabet to non-extended alphabet +{ /extencs [ (%U) ($A) ($B) ($C) ($D) ($E) ($F) ($G) ($H) ($I) ($J) ($K) ($L) ($M) ($N) ($O) ($P) ($Q) ($R) ($S) ($T) ($U) ($V) ($W) ($X) ($Y) ($Z) (%A) (%B) (%C) (%D) (%E) @@ -3781,6 +7073,7 @@ begin (%W) (+A) (+B) (+C) (+D) (+E) (+F) (+G) (+H) (+I) (+J) (+K) (+L) (+M) (+N) (+O) (+P) (+Q) (+R) (+S) (+T) (+U) (+V) (+W) (+X) (+Y) (+Z) (%P) (%Q) (%R) (%S) (%T) ] def +} ctxdef /newcode barlen 2 mul string def /newtext barlen 2 mul string def @@ -3816,9 +7109,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /code39ext dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -3827,15 +7124,15 @@ end % --END ENCODER code39ext-- % --BEGIN ENCODER code32-- -% --REQUIRES preamble raiseerror renlinear code39-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear code39-- % --DESC: Italian Pharmacode % --EXAM: 01234567 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp code32 0.0 2017040400 68684 68425 -%%BeginData: 99 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp code32 0.0 2022082100 63967 67382 +%%BeginData: 102 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code39 dup /uk.co.terryburton.bwipp findresource put @@ -3847,9 +7144,10 @@ begin /options exch def % We are given an options string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable code32 text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /textxoffset 0 def @@ -3900,7 +7198,7 @@ begin /text exch def % convert number from base10 to base32 - /val text cvi 32 barcode cvrs def + /val text cvi 32 6 string cvrs def /barcode 6 string def 0 1 5 {barcode exch 48 put} for barcode 6 val length sub val putinterval @@ -3929,7 +7227,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /code32 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -3938,15 +7238,15 @@ end % --END ENCODER code32-- % --BEGIN ENCODER pzn-- -% --REQUIRES preamble raiseerror renlinear code39-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear code39-- % --DESC: Pharmazentralnummer (PZN) % --EXAM: 123456 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp pzn 0.0 2017040400 68931 68597 -%%BeginData: 100 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp pzn 0.0 2022082100 64062 67298 +%%BeginData: 103 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code39 dup /uk.co.terryburton.bwipp findresource put @@ -3954,19 +7254,20 @@ begin /pzn { 20 dict begin - + /options exch def % We are given an options string /barcode exch def % We are given a barcode string - + + /ctx null def /dontdraw false def /includetext false def % Enable/disable code32 text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /textxoffset 0 def /height 1 def /pzn8 false def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -3977,7 +7278,7 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def @@ -4006,8 +7307,8 @@ begin 0 1 msglen 3 sub { /i exch def barcode i get 48 sub i pzn8 {1} {2} ifelse add mul - checksum add /checksum exch def - } for + checksum add /checksum exch def + } for /checksum checksum 11 mod def checksum 10 eq { /bwipp.pznBadInputSequence (Incorrect PZN input sequence provided) //raiseerror exec @@ -4018,30 +7319,32 @@ begin } if } if msglen string - dup 0 45 put + dup 0 45 put dup 1 barcode putinterval dup msglen 1 sub checksum 48 add put /msg exch def - + % Get the result of encoding with code39 options (dontdraw) true put /args msg options //code39 exec def - + % format HRI /text msglen 5 add string def text 0 (PZN - ) putinterval text 6 msg 1 msglen 1 sub getinterval putinterval - + args (txt) [ [text textxoffset textyoffset textfont textsize] ] put args (textxalign) (center) put args (opt) options put args - + dontdraw not //renlinear if - + end - -} bind def + +} +[/barcode] {null def} forall +bind def /pzn dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -4050,16 +7353,19 @@ end % --END ENCODER pzn-- % --BEGIN ENCODER code93-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renlinear-- % --DESC: Code 93 % --EXAM: THIS IS CODE 93 % --EXOP: includetext includecheck % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp code93 0.0 2017040400 73201 72985 -%%BeginData: 148 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp code93 0.0 2022082100 68234 71403 +%%BeginData: 144 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin /code93 { @@ -4069,15 +7375,17 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includecheck false def % Enable/disable checkdigit /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 1 def - /parsefnc false def - + /parse false def + /parsefnc false def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -4088,12 +7396,15 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def - + + /code93 //loadctx exec + +{ /encs [ (131112) (111213) (111312) (111411) (121113) (121212) (121311) (111114) (131211) (141111) @@ -4110,35 +7421,19 @@ begin % Create a string of the available characters /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def - /barlen barcode length def + /sft1 -1 def /sft2 -2 def /sft3 -3 def /sft4 -4 def +} ctxdef % Special function characters - /sft1 -1 def /sft2 -2 def /sft3 -3 def /sft4 -4 def /fncvals << + /parse parse + /parsefnc parsefnc (SFT$) sft1 (SFT%) sft2 (SFT/) sft3 (SFT+) sft4 >> def - - % Convert input into bytes accounting for shift characters - /msg barlen array def - /i 0 def /j 0 def { - i barlen eq {exit} if - /char barcode i get def - parsefnc char 94 eq and i barlen 4 sub lt and { - barcode i 1 add get 94 ne { - /char fncvals barcode i 1 add 4 getinterval get def - /i i 4 add def - } { - /i i 1 add def - } ifelse - } if - msg j char put - /i i 1 add def - /j j 1 add def - } loop - /msg msg 0 j getinterval def + /msg barcode fncvals //parseinput exec def /msglen msg length def includecheck { @@ -4150,12 +7445,12 @@ begin % Put the start character sbs 0 encs 47 get putinterval - + /checksum1 0 def /checksum2 0 def 0 1 msglen 1 sub { /i exch def % Lookup the encoding for the each barcode character - msg i get dup 0 lt { + msg i get dup 0 lt { 42 exch sub /indx exch def /char ( ) def } { @@ -4182,7 +7477,7 @@ begin sbs msglen 6 mul 18 add encs 48 get putinterval } { % Put the end character - sbs msglen 6 mul 6 add encs 48 get putinterval + sbs msglen 6 mul 6 add encs 48 get putinterval } ifelse % Return the arguments @@ -4199,9 +7494,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /code93 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -4210,16 +7509,19 @@ end % --END ENCODER code93-- % --BEGIN ENCODER code93ext-- -% --REQUIRES preamble raiseerror renlinear code93-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renlinear code93-- % --DESC: Code 93 Extended % --EXAM: Code93 Ext! % --EXOP: includetext includecheck % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp code93ext 0.0 2017040400 68324 71604 -%%BeginData: 114 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp code93ext 0.0 2022082100 71471 71350 +%%BeginData: 113 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code93 dup /uk.co.terryburton.bwipp findresource put begin @@ -4230,6 +7532,7 @@ begin /options exch def % We are given an options string /barcode exch def % We are given the code39extended text + /ctx null def /dontdraw false def /includetext false def /parse false def @@ -4245,37 +7548,27 @@ begin } if options {def} forall - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if + /code93ext //loadctx exec + % Parse ordinals of the form ^NNN to ASCII + /fncvals << + /parse parse + /parseonly true + /parsefnc false + >> def + /barcode barcode fncvals //parseinput exec def /barlen barcode length def + options (parse) undef % Extended alphabet to non-extended alphabet +{ /extencs - [ (^SFT%U) (^SFT$A) (^SFT$B) (^SFT$C) (^SFT$D) (^SFT$E) (^SFT$F) (^SFT$G) + [ (^SFT%U) (^SFT$A) (^SFT$B) (^SFT$C) (^SFT$D) (^SFT$E) (^SFT$F) (^SFT$G) (^SFT$H) (^SFT$I) (^SFT$J) (^SFT$K) (^SFT$L) (^SFT$M) (^SFT$N) (^SFT$O) (^SFT$P) (^SFT$Q) (^SFT$R) (^SFT$S) (^SFT$T) (^SFT$U) (^SFT$V) (^SFT$W) (^SFT$X) (^SFT$Y) (^SFT$Z) (^SFT%A) (^SFT%B) (^SFT%C) (^SFT%D) (^SFT%E) - ( ) (^SFT/A) (^SFT/B) (^SFT/C) (^SFT/D) (^SFT/E) (^SFT/F) (^SFT/G) - (^SFT/H) (^SFT/I) (^SFT/J) (^SFT/K) (^SFT/L) (-) (.) (^SFT/O) + ( ) (^SFT/A) (^SFT/B) (^SFT/C) ($) (%) (^SFT/F) (^SFT/G) + (^SFT/H) (^SFT/I) (^SFT/J) (+) (^SFT/L) (-) (.) (/) (0) (1) (2) (3) (4) (5) (6) (7) (8) (9) (^SFT/Z) (^SFT%F) (^SFT%G) (^SFT%H) (^SFT%I) (^SFT%J) (^SFT%V) (A) (B) (C) (D) (E) (F) (G) @@ -4287,6 +7580,7 @@ begin (^SFT+P) (^SFT+Q) (^SFT+R) (^SFT+S) (^SFT+T) (^SFT+U) (^SFT+V) (^SFT+W) (^SFT+X) (^SFT+Y) (^SFT+Z) (^SFT%P) (^SFT%Q) (^SFT%R) (^SFT%S) (^SFT%T) ] def +} ctxdef /newcode barlen 6 mul string def /newtext barlen 6 mul string def @@ -4325,9 +7619,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /code93ext dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -4336,15 +7634,17 @@ end % --END ENCODER code93ext-- % --BEGIN ENCODER interleaved2of5-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Interleaved 2 of 5 (ITF) % --EXAM: 2401234567 % --EXOP: height=0.5 includecheck includetext includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp interleaved2of5 0.0 2017040400 73301 73185 -%%BeginData: 150 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp interleaved2of5 0.0 2022082100 70795 67054 +%%BeginData: 162 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -4355,15 +7655,16 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includecheck false def % Enable/disable checkdigit /includetext false def % Enable/disable text /includecheckintext false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -4374,19 +7675,21 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def + /interleaved2of5 //loadctx exec + % Validate the input barcode { dup 48 lt exch 57 gt or { /bwipp.interleaved2of5badCharacter (Interleaved 2 of 5 must contain only digits) //raiseerror exec } if } forall - + /barlen barcode length def % Length of the code % Prefix 0 to barcode if length is even and including checkdigit @@ -4420,6 +7723,7 @@ begin } if % Create an array containing the character mappings +{ /encs [ (11221) (21112) (12112) (22111) (11212) (21211) (12211) (11122) (21121) (12121) @@ -4428,6 +7732,8 @@ begin % Create a string of the available characters /barchars (0123456789) def +} ctxdef + /sbs barlen 5 mul 8 add string def /txt barlen array def @@ -4487,9 +7793,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /interleaved2of5 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -4498,15 +7808,15 @@ end % --END ENCODER interleaved2of5-- % --BEGIN ENCODER itf14-- -% --REQUIRES preamble raiseerror renlinear interleaved2of5-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear interleaved2of5-- % --DESC: ITF-14 % --EXAM: 0 46 01234 56789 3 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp itf14 0.0 2017040400 68114 71278 -%%BeginData: 109 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp itf14 0.0 2022082100 66573 69883 +%%BeginData: 112 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /interleaved2of5 dup /uk.co.terryburton.bwipp findresource put @@ -4518,10 +7828,11 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def /includecheckintext true def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset 3 def @@ -4530,7 +7841,7 @@ begin /borderwidth 4 def /borderleft 15 def /borderright 15 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -4546,7 +7857,7 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def /borderwidth borderwidth cvr def /borderleft borderleft cvr def /borderright borderright cvr def @@ -4605,12 +7916,14 @@ begin args (textxalign) (center) put args (opt) options put args - + dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /itf14 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -4619,15 +7932,15 @@ end % --END ENCODER itf14-- % --BEGIN ENCODER identcode-- -% --REQUIRES preamble raiseerror renlinear interleaved2of5-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear interleaved2of5-- % --DESC: Deutsche Post Identcode % --EXAM: 563102430313 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp identcode 0.0 2017040400 64217 67381 -%%BeginData: 91 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp identcode 0.0 2022082100 62988 66378 +%%BeginData: 94 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /interleaved2of5 dup /uk.co.terryburton.bwipp findresource put @@ -4639,14 +7952,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -4662,7 +7976,7 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def % Validate the input barcode length 11 ne barcode length 12 ne and { @@ -4679,7 +7993,7 @@ begin 0 1 10 { /i exch def /checksum checksum barcode i get 48 sub i 2 mod 0 eq {4 mul} {9 mul} ifelse add def - } for + } for /checksum 10 checksum 10 mod sub 10 mod def barcode length 12 eq { barcode 11 get checksum 48 add ne { @@ -4708,12 +8022,14 @@ begin args (textxalign) (center) put args (opt) options put args - + dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /identcode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -4722,15 +8038,15 @@ end % --END ENCODER identcode-- % --BEGIN ENCODER leitcode-- -% --REQUIRES preamble raiseerror renlinear interleaved2of5-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear interleaved2of5-- % --DESC: Deutsche Post Leitcode % --EXAM: 21348075016401 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp leitcode 0.0 2017040400 64209 67377 -%%BeginData: 91 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp leitcode 0.0 2022082100 62980 66374 +%%BeginData: 94 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /interleaved2of5 dup /uk.co.terryburton.bwipp findresource put @@ -4742,14 +8058,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -4765,7 +8082,7 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def % Validate the input barcode length 13 ne barcode length 14 ne and { @@ -4782,7 +8099,7 @@ begin 0 1 12 { /i exch def /checksum checksum barcode i get 48 sub i 2 mod 0 eq {4 mul} {9 mul} ifelse add def - } for + } for /checksum 10 checksum 10 mod sub 10 mod def barcode length 14 eq { barcode 13 get checksum 48 add ne { @@ -4811,12 +8128,14 @@ begin args (textxalign) (center) put args (opt) options put args - + dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /leitcode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -4825,15 +8144,17 @@ end % --END ENCODER leitcode-- % --BEGIN ENCODER databaromni-- -% --REQUIRES preamble raiseerror renlinear renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear renmatrix-- % --DESC: GS1 DataBar Omnidirectional % --EXAM: (01)24012345678905 % --EXOP: % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp databaromni 0.0 2017040400 131912 137574 -%%BeginData: 420 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databaromni 0.0 2022082100 115183 110835 +%%BeginData: 436 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +20 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put @@ -4845,12 +8166,13 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /height 33 72 div def /linkage false def /format (omni) def /barxmult 33 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -4861,11 +8183,13 @@ begin currentdict end /options exch def } if options {def} forall - + format (truncated) eq {/height 13 72 div def} if /height height cvr def /barxmult barxmult cvi def + /databaromni //loadctx exec + % Validate the input barcode 0 4 getinterval (\(01\)) ne { /bwipp.databaromniBadAI (GS1 DataBar Omnidirectional must begin with (01) application identifier) //raiseerror exec @@ -4917,8 +8241,8 @@ begin 1 index idiv exch 1 add exch } loop exch pop exch pop - } bind def - + } def + /getRSSwidths { /oe exch def /el exch def @@ -4929,7 +8253,7 @@ begin /mask 0 def 0 1 el 2 sub { /bar exch def - /ew 1 def + /ew 1 def /mask mask 1 bar bitshift or def { /sval nm ew sub 1 sub el bar sub 2 sub ncr def oe mask 0 eq and nm ew sub el 2 mul sub bar 2 mul add -2 ge and { @@ -4949,20 +8273,20 @@ begin val 0 lt {exit} if /ew ew 1 add def /mask mask 1 bar bitshift not and def - } loop + } loop /val val sval add def /nm nm ew sub def - out bar ew put + out bar ew put } for out el 1 sub nm put out - } bind def - - /binval [ + } def + + /binval [ linkage {1} {0} ifelse barcode 4 13 getinterval {48 sub} forall ] def - + 0 1 12 { /i exch def binval i 1 add 2 copy get binval i get 4537077 mod 10 mul add put @@ -4983,12 +8307,13 @@ begin /left left 3 -1 roll 10 13 j sub exp cvi mul add def } ifelse } for - + /d1 left 1597 idiv def /d2 left 1597 mod def /d3 right 1597 idiv def /d4 right 1597 mod def +{ /tab164 [ 160 0 12 4 8 1 161 1 960 161 10 6 6 3 80 10 @@ -5003,6 +8328,7 @@ begin 1515 1036 9 6 6 3 48 10 1596 1516 11 4 8 1 81 1 ] def +} ctxdef /i 0 def { d1 tab164 i get le { @@ -5051,7 +8377,7 @@ begin } if /i i 8 add def } loop - + /d1wo d1 d1gs sub d1te idiv d1elo d1mwo 4 false getRSSwidths def /d1we d1 d1gs sub d1te mod d1ele d1mwe 4 true getRSSwidths def /d2wo d2 d2gs sub d2to mod d2elo d2mwo 4 true getRSSwidths def @@ -5074,14 +8400,14 @@ begin d2w 7 i 2 mul sub d2wo i get put d2w 6 i 2 mul sub d2we i get put } for - + /d3w 8 array def 0 1 3 { /i exch def d3w 7 i 2 mul sub d3wo i get put d3w 6 i 2 mul sub d3we i get put } for - + /d4w 8 array def 0 1 3 { /i exch def @@ -5095,7 +8421,8 @@ begin d3w {} forall d4w {} forall ] def - + +{ /checkweights [ 1 3 9 27 2 6 18 54 58 72 24 8 29 36 12 4 @@ -5108,13 +8435,14 @@ begin 3 1 9 1 1 2 7 4 1 1 2 5 6 1 1 2 3 8 1 1 1 5 7 1 1 1 3 9 1 1 ] def - +} ctxdef + /checksum 0 def 0 1 31 { /i exch def - /checksum checksum widths i get checkweights i get mul add def + /checksum checksum widths i get checkweights i get mul add def } for - /checksum checksum 79 mod def + /checksum checksum 79 mod def checksum 8 ge {/checksum checksum 1 add def} if checksum 72 ge {/checksum checksum 1 add def} if /checklt checkwidths checksum 9 idiv 5 mul 5 getinterval def @@ -5129,10 +8457,10 @@ begin format (omni) eq format (truncated) eq or { % linear /sbs [ - 1 d1w {} forall checklt {} forall d2w {} forall + 1 d1w {} forall checklt {} forall d2w {} forall d4w {} forall checkrt {} forall d3w {} forall 1 1 ] def - + << /ren //renlinear /sbs sbs @@ -5142,19 +8470,19 @@ begin /textxalign (center) /opt options >> - + dontdraw not //renlinear if } { % 2D - stacked or stackedomni /top [ 1 1 d1w {} forall checklt {} forall d2w {} forall 1 1 0 ] def - /bot [ 1 1 d4w {} forall checkrt {} forall d3w {} forall 1 1 0 ] def + /bot [ 1 1 d4w {} forall checkrt {} forall d3w {} forall 1 1 0 ] def 0 2 24 { /i exch def top i get {0} repeat top i 1 add get {1} repeat } for - 50 array astore /top exch def + 50 array astore /top exch def 0 2 24 { /i exch def bot i get {1} repeat @@ -5164,8 +8492,9 @@ begin % Stacked format (stacked) eq { - /sep [ 50 {0} repeat ] def - 4 1 45 { + /sep 50 array def + sep 0 0 put + 1 1 49 { /i exch def top i get bot i get eq { sep i 1 top i get sub put @@ -5173,6 +8502,8 @@ begin sep i 1 sep i 1 sub get sub put } ifelse } for + sep 0 [ 0 0 0 0 ] putinterval + sep 46 [ 0 0 0 0 ] putinterval /pixs [ 5 {top aload pop} repeat sep aload pop @@ -5180,7 +8511,7 @@ begin ] def /pixy pixs length 50 idiv def } if - + % Stacked omnidirectional format (stackedomni) eq { /sep1 [ top {1 exch sub} forall ] def @@ -5230,7 +8561,7 @@ begin ] def /pixy pixs length 50 idiv def } if - + % Return the arguments << /ren //renmatrix @@ -5241,14 +8572,18 @@ begin /width 50 72 div /opt options >> - + dontdraw not //renmatrix if - + } ifelse - + + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /databaromni dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -5257,15 +8592,15 @@ end % --END ENCODER databaromni-- % --BEGIN ENCODER databarstacked-- -% --REQUIRES preamble raiseerror renlinear renmatrix databaromni-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear renmatrix databaromni-- % --DESC: GS1 DataBar Stacked % --EXAM: (01)24012345678905 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp databarstacked 0.0 2017040400 71113 67516 -%%BeginData: 73 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databarstacked 0.0 2022082100 67310 63705 +%%BeginData: 76 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /databaromni dup /uk.co.terryburton.bwipp findresource put @@ -5277,6 +8612,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def % Parse the input options @@ -5328,12 +8664,14 @@ begin args (opt) options put args - + dontdraw not //renmatrix if end -} bind def +} +[/barcode] {null def} forall +bind def /databarstacked dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -5342,15 +8680,15 @@ end % --END ENCODER databarstacked-- % --BEGIN ENCODER databarstackedomni-- -% --REQUIRES preamble raiseerror renlinear renmatrix databaromni-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear renmatrix databaromni-- % --DESC: GS1 DataBar Stacked Omnidirectional % --EXAM: (01)24012345678905 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp databarstackedomni 0.0 2017040400 71213 67596 -%%BeginData: 73 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databarstackedomni 0.0 2022082100 67410 63785 +%%BeginData: 76 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /databaromni dup /uk.co.terryburton.bwipp findresource put @@ -5362,6 +8700,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def % Parse the input options @@ -5413,12 +8752,14 @@ begin args (opt) options put args - + dontdraw not //renmatrix if end -} bind def +} +[/barcode] {null def} forall +bind def /databarstackedomni dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -5427,15 +8768,15 @@ end % --END ENCODER databarstackedomni-- % --BEGIN ENCODER databartruncated-- -% --REQUIRES preamble raiseerror renlinear renmatrix databaromni-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear renmatrix databaromni-- % --DESC: GS1 DataBar Truncated % --EXAM: (01)24012345678905 % --EXOP: % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp databartruncated 0.0 2017040400 71139 67532 -%%BeginData: 73 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databartruncated 0.0 2022082100 67336 63721 +%%BeginData: 76 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /databaromni dup /uk.co.terryburton.bwipp findresource put @@ -5447,6 +8788,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def % Parse the input options @@ -5498,12 +8840,14 @@ begin args (opt) options put args - + dontdraw not //renlinear if end -} bind def +} +[/barcode] {null def} forall +bind def /databartruncated dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -5512,15 +8856,17 @@ end % --END ENCODER databartruncated-- % --BEGIN ENCODER databarlimited-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: GS1 DataBar Limited % --EXAM: (01)15012345678907 % --EXOP: % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp databarlimited 0.0 2017040400 96545 95706 -%%BeginData: 276 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databarlimited 0.0 2022082100 90886 86535 +%%BeginData: 291 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +20 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -5531,6 +8877,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /height 10 72 div def /linkage false def @@ -5545,9 +8892,11 @@ begin currentdict end /options exch def } if options {def} forall - + /height height cvr def + /databarlimited //loadctx exec + % Validate the input barcode 0 4 getinterval (\(01\)) ne { /bwipp.databarlimitedBadAI (GS1 DataBar Limited must begin with (01) application identifier) //raiseerror exec @@ -5573,7 +8922,7 @@ begin /checksum 10 checksum 10 mod sub 10 mod def barcode length 18 eq { barcode 17 get checksum 48 add ne { - /bwipp.databaromniBadCheckDigit (Incorrect GS1 DataBar Limited check digit provided) //raiseerror exec + /bwipp.databarlimitedBadCheckDigit (Incorrect GS1 DataBar Limited check digit provided) //raiseerror exec } if } if 18 string @@ -5582,16 +8931,18 @@ begin /barcode exch def % Strip the AI and optional check digit - /binval [ +{ + /linkval [ 2 0 1 5 1 3 3 5 3 1 0 9 6 ] def +} ctxdef + /binval [ barcode 4 13 getinterval {48 sub} forall ] def linkage { - /linkval [ 2 0 1 5 1 3 3 5 3 1 0 9 6 ] def 0 1 binval length 1 sub { /i exch def binval i binval i get linkval i get add put } for - } if + } if % Create the human readable text /txt barcode length array def @@ -5614,8 +8965,8 @@ begin 1 index idiv exch 1 add exch } loop exch pop exch pop - } bind def - + } def + /getRSSwidths { /oe exch def /el exch def @@ -5626,7 +8977,7 @@ begin /mask 0 def 0 1 el 2 sub { /bar exch def - /ew 1 def + /ew 1 def /mask mask 1 bar bitshift or def { /sval nm ew sub 1 sub el bar sub 2 sub ncr def oe mask 0 eq and nm ew sub el 2 mul sub bar 2 mul add -2 ge and { @@ -5646,15 +8997,15 @@ begin val 0 lt {exit} if /ew ew 1 add def /mask mask 1 bar bitshift not and def - } loop + } loop /val val sval add def /nm nm ew sub def - out bar ew put + out bar ew put } for out el 1 sub nm put out - } bind def - + } def + 0 1 11 { /i exch def binval i 1 add 2 copy get binval i get 2013571 mod 10 mul add put @@ -5675,7 +9026,8 @@ begin /d1 d1 3 -1 roll 10 12 j sub exp cvi mul add def } ifelse } for - + +{ /tab267 [ 183063 0 17 9 6 3 6538 28 820063 183064 13 13 5 4 875 728 @@ -5685,6 +9037,7 @@ begin 1996938 1979845 19 7 8 1 17094 1 2013570 1996939 7 19 1 8 1 16632 ] def +} ctxdef /i 0 def { d1 tab267 i get le { @@ -5710,9 +9063,9 @@ begin /i i 8 add def } loop - /d1wo d1 d1gs sub d1te idiv d1elo d1mwo 7 false getRSSwidths def + /d1wo d1 d1gs sub d1te idiv d1elo d1mwo 7 false getRSSwidths def /d1we d1 d1gs sub d1te mod d1ele d1mwe 7 true getRSSwidths def - /d2wo d2 d2gs sub d2te idiv d2elo d2mwo 7 false getRSSwidths def + /d2wo d2 d2gs sub d2te idiv d2elo d2mwo 7 false getRSSwidths def /d2we d2 d2gs sub d2te mod d2ele d2mwe 7 true getRSSwidths def /d1w 14 array def @@ -5733,7 +9086,8 @@ begin d1w {} forall d2w {} forall ] def - + +{ /checkweights [ 1 3 9 27 81 65 17 51 64 14 42 37 22 66 20 60 2 6 18 54 73 41 34 13 39 28 84 74 @@ -5754,7 +9108,8 @@ begin 322 323 326 337 ] def - +} ctxdef + /checksum 0 def 0 1 27 { /i exch def @@ -5771,11 +9126,11 @@ begin checkwidths i 2 mul swidths i get put checkwidths i 2 mul 1 add bwidths i get put } for - + /sbs [ - 1 d1w {} forall checkwidths {} forall d2w {} forall 1 1 + 1 d1w {} forall checkwidths {} forall d2w {} forall 1 1 5 ] def - + % Return the arguments << /ren //renlinear @@ -5789,9 +9144,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /databarlimited dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -5800,16 +9159,19 @@ end % --END ENCODER databarlimited-- % --BEGIN ENCODER databarexpanded-- -% --REQUIRES preamble raiseerror renlinear renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix-- % --DESC: GS1 DataBar Expanded % --EXAM: (01)95012345678903(3103)000123 % --EXOP: % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp databarexpanded 0.0 2017040400 245708 247229 -%%BeginData: 880 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databarexpanded 0.0 2022082100 246206 245007 +%%BeginData: 863 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -5820,13 +9182,17 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def + /parse false def + /dontlint false def + /lintreqs true def /dontdraw false def /height 34 72 div def /format (expanded) def /segments -1 def - /linkage false def + /linkage false def /barxmult 34 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -5837,54 +9203,25 @@ begin currentdict end /options exch def } if options {def} forall - + /height height cvr def /segments segments cvi def /barxmult barxmult cvi def + /databarexpanded //loadctx exec + segments -1 eq { /segments format (expandedstacked) eq {4} {22} ifelse def - } if + } { + segments 2 lt segments 22 gt or segments 2 mod 0 ne or { + /bwipp.gs1databarexpandedBadSegments (The number of segments must be even from 2 to 22) //raiseerror exec + } if + } ifelse - % Expand ordinals of the form ^NNN to ASCII - /expand { - /in exch def - /out in length string def - /j 0 def - in - { % loop - (^) search { - dup out exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi out exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup out exch j exch putinterval - length j add /j exch def - out 0 j getinterval exit - } ifelse - } loop - } bind def - - % Parse out AIs - /ais [] def - /vals [] def - barcode dup length 1 sub 1 exch getinterval - { % loop - dup () eq {exit} if - (\)) search pop - exch pop - exch (\() search { - exch pop exch 3 1 roll - } { - () 3 1 roll - } ifelse - [ ais aload pop counttomark 2 add index ] /ais exch def - [ vals aload pop counttomark 1 add index expand ] /vals exch def - pop pop - } loop - pop + barcode /ai //gs1process exec + /fncs exch def + /vals exch def + /ais exch def % Method selection { % common exit @@ -5897,7 +9234,7 @@ begin } if } if } if - + % (01)9...(3202)... ais length 2 eq { ais 0 get (01) eq ais 1 get (3202) eq and { @@ -5906,7 +9243,7 @@ begin } if } if } if - + % (01)9...(3203)... ais length 2 eq { ais 0 get (01) eq ais 1 get (3203) eq and { @@ -5915,7 +9252,7 @@ begin } if } if } if - + % (01)9...(310x/320x)...[(11/13/15/17)...] ais length dup 2 eq exch 3 eq or { /ai310x false 3100 1 3109 {10 4 string cvrs ais 1 get eq or} for def @@ -5929,7 +9266,8 @@ begin ais length 3 eq { vals 0 get 0 1 getinterval (9) eq vals 1 get cvi 99999 le and - vals 2 cvi 999999 le and { + vals 2 get 2 2 getinterval cvi dup 1 ge exch 12 le and and % Month 1-12 + vals 2 get 4 2 getinterval cvi dup 0 ge exch 31 le and and { % Day 0-31 ai310x ais 2 get (11) eq and { (0111000) false exit } if ai320x ais 2 get (11) eq and { (0111001) false exit } if ai310x ais 2 get (13) eq and { (0111010) false exit } if @@ -5948,7 +9286,7 @@ begin } ifelse } if } if - + % (01)9...(392x)... ais length 2 ge { /ai392x false 3920 1 3923 {10 4 string cvrs ais 1 get eq or} for def @@ -5956,7 +9294,7 @@ begin vals 0 get 0 1 getinterval (9) eq { (01100) true exit } if } if } if - + % (01)9...(393x)... ais length 2 ge { /ai393x false 3930 1 3933 {10 4 string cvrs ais 1 get eq or} for def @@ -5964,17 +9302,17 @@ begin vals 0 get 0 1 getinterval (9) eq { (01101) true exit } if } if } if - + % (01)... ais 0 get (01) eq { (1) true exit } if - + % Freeform (00) true exit - + } loop /gpfallow exch def /method exch def - + /conv12to40 { (0000000000000000000000000000000000000000) 40 string copy 2 copy 0 10 getinterval exch 0 3 getinterval cvi 2 10 string cvrs dup length 10 exch sub exch putinterval @@ -5982,32 +9320,35 @@ begin 2 copy 20 10 getinterval exch 6 3 getinterval cvi 2 10 string cvrs dup length 10 exch sub exch putinterval 2 copy 30 10 getinterval exch 9 3 getinterval cvi 2 10 string cvrs dup length 10 exch sub exch putinterval exch pop - } bind def - + } def + /conv13to44 { (00000000000000000000000000000000000000000000) 44 string copy 2 copy 0 4 getinterval exch 0 1 getinterval cvi 2 4 string cvrs dup length 4 exch sub exch putinterval dup 3 -1 roll 1 12 getinterval conv12to40 4 exch putinterval - } bind def - + } def + /tobin { string dup length 1 sub 0 exch 1 exch {1 index exch 48 put} for - dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval - } bind def - + dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval + } def + + /fnc1 -1 def /lnumeric -2 def /lalphanumeric -3 def /liso646 -4 def + method (00) eq { /cdf [] def /gpf [] def } if - + method (1) eq { /cdf vals 0 get 0 13 getinterval conv13to44 def /cdf [ cdf {48 sub} forall ] def /gpf [] def /ais ais 1 ais length 1 sub getinterval def /vals vals 1 vals length 1 sub getinterval def + /fncs fncs 1 fncs length 1 sub getinterval def } if - + method (0100) eq { /cdf 55 string def cdf 0 vals 0 get 1 12 getinterval conv12to40 putinterval @@ -6016,8 +9357,9 @@ begin /gpf [] def /ais [] def /vals [] def + /fncs [] def } if - + method (0101) eq { /cdf 55 string def cdf 0 vals 0 get 1 12 getinterval conv12to40 putinterval @@ -6031,8 +9373,9 @@ begin /gpf [] def /ais [] def /vals [] def + /fncs [] def } if - + method length 7 eq { /cdf 76 string def cdf 0 vals 0 get 1 12 getinterval conv12to40 putinterval @@ -6052,29 +9395,32 @@ begin /gpf [] def /ais [] def /vals [] def + /fncs [] def } if - + method (01100) eq { /cdf 42 string def cdf 0 vals 0 get 1 12 getinterval conv12to40 putinterval cdf 40 ais 1 get 3 1 getinterval cvi 2 tobin putinterval /cdf [ cdf {48 sub} forall ] def - /gpf [ vals 1 get {} forall ] def + /gpf [ vals 1 get {} forall ais length 2 gt { fnc1 } if ] def /ais ais 2 ais length 2 sub getinterval def /vals vals 2 vals length 2 sub getinterval def + /fncs fncs 2 fncs length 2 sub getinterval def } if - + method (01101) eq { /cdf 52 string def cdf 0 vals 0 get 1 12 getinterval conv12to40 putinterval cdf 40 ais 1 get 3 1 getinterval cvi 2 tobin putinterval cdf 42 vals 1 get 0 3 getinterval cvi 10 tobin putinterval /cdf [ cdf {48 sub} forall ] def - /gpf [ vals 1 get dup length 3 sub 3 exch getinterval {} forall ] def + /gpf [ vals 1 get dup length 3 sub 3 exch getinterval {} forall ais length 2 gt { fnc1 } if ] def /ais ais 2 ais length 2 sub getinterval def /vals vals 2 vals length 2 sub getinterval def + /fncs fncs 2 fncs length 2 sub getinterval def } if - + % Variable length symbol field gpfallow { /vlf 2 array def @@ -6082,39 +9428,20 @@ begin /vlf [] def } ifelse - % Pre-defined fixed length data field AIs - % any AI whose prefix is not included in this table must be - % terminated with "FNC1", even if it's fixed length - /aifixed 23 dict def - [ - 0 1 4 {} for - ] { - (00) 2 string copy dup dup 1 5 -1 roll 48 add put aifixed 3 1 roll put - } forall - [ - 11 1 20 {} for - 23 - 31 1 36 {} for - 41 - ] { - 10 2 string cvrs dup aifixed 3 1 roll put - } forall - - /fnc1 -1 def /lnumeric -2 def /lalphanumeric -3 def /liso646 -4 def - +{ /numeric << 0 1 119 { dup (00) 2 string copy dup 3 -1 roll 11 2 string cvrs - dup length 2 exch sub exch putinterval - dup 0 get 65 eq {dup 0 94 put} if - dup 1 get 65 eq {dup 1 94 put} if + dup length 2 exch sub exch putinterval + dup 0 get 65 eq {dup 0 94 put} if + dup 1 get 65 eq {dup 1 94 put} if exch 8 add - (0000000) 7 string copy dup 3 -1 roll 2 7 string cvrs + (0000000) 7 string copy dup 3 -1 roll 2 7 string cvrs dup length 7 exch sub exch putinterval } for lalphanumeric (0000) >> def - + /alphanumeric << 48 1 57 {dup 43 sub 5 tobin} for fnc1 (01111) @@ -6124,7 +9451,7 @@ begin lnumeric (000) liso646 (00100) >> def - + /iso646 << 48 1 57 {dup 43 sub 5 tobin} for fnc1 (01111) @@ -6139,7 +9466,8 @@ begin lnumeric (000) lalphanumeric (00100) >> def - +} ctxdef + % Append the remaining AI data 0 1 ais length 1 sub { /i exch def @@ -6150,7 +9478,7 @@ begin dup gpf length ai [ exch {} forall ] putinterval dup gpf length ai length add val [ exch {} forall ] putinterval /gpf exch def - i ais length 1 sub ne aifixed ai 0 2 getinterval known not and { % Append FNC1 + i ais length 1 sub ne fncs i get and { % Append FNC1 gpf length 1 add array dup 0 gpf putinterval dup gpf length fnc1 put @@ -6161,24 +9489,24 @@ begin % Calculate the number of bits remaining to the next valid symbol size /rembits { dup - 12 div ceiling cvi 12 mul % Round up to multiple of 12 + 12 div ceiling cvi 12 mul % Round up to multiple of 12 48 2 copy lt {exch} if pop % At least 4 symbols dup 12 idiv dup segments mod 1 eq { % At least 2 symbols on last row of stacked symbol 1 add 12 mul exch pop } { pop - } ifelse + } ifelse exch sub - } bind def - + } def + /encode { dup /raw ne {exch get} {pop} ifelse [ exch {48 sub} forall ] dup length exch gpfenc exch j exch putinterval /j exch j add def - } bind def - + } def + % Pre-compute alphanumeric and numeric runlengths and position of next ISO646-only characters /numericruns [ gpf length {0} repeat 0 -1 ] def /alphanumericruns [ gpf length {0} repeat 0 ] def @@ -6187,7 +9515,7 @@ begin /i exch def gpf i get (00) 2 string copy - dup 0 gpf i get dup fnc1 eq {pop 94} if put + dup 0 gpf i get dup fnc1 eq {pop 94} if put i gpf length 1 sub lt {dup 1 gpf i 1 add get dup fnc1 eq {pop 94} if put} if numeric exch known { numericruns i numericruns i 2 add get 2 add put @@ -6205,17 +9533,17 @@ begin nextiso646only i nextiso646only i 1 add get 1 add put } ifelse } for - + % Encode the general purpose field /gpfenc 252 array def /i 0 def /j 0 def /mode (numeric) def { % loop i gpf length eq {exit} if { % not a loop but common exit point - + mode (numeric) eq { i gpf length 2 sub le { - 2 string + 2 string dup 0 gpf i get dup fnc1 eq {pop 94} if put dup 1 gpf i 1 add get dup fnc1 eq {pop 94} if put dup numeric exch known { @@ -6224,7 +9552,7 @@ begin exit } if pop - lalphanumeric numeric encode + lalphanumeric numeric encode /mode (alphanumeric) def exit } { @@ -6241,13 +9569,13 @@ begin /i i 1 add def exit } { % C1.FNC1 - 2 string dup 0 gpf i get put dup 1 94 put numeric encode + 2 string dup 0 gpf i get put dup 1 94 put numeric encode /i i 1 add def exit } ifelse } ifelse } if - + mode (alphanumeric) eq { gpf i get fnc1 eq { fnc1 alphanumeric encode @@ -6274,7 +9602,7 @@ begin /i i 1 add def exit } if - + mode (iso646) eq { gpf i get fnc1 eq { fnc1 iso646 encode @@ -6296,13 +9624,13 @@ begin /i i 1 add def exit } if - + } loop } loop /gpf gpfenc 0 j getinterval def % Complete the variable length field and create pad - 1 12 add method length add vlf length add cdf length add gpf length add + 1 12 add method length add vlf length add cdf length add gpf length add dup rembits dup array /pad exch def vlf length 0 ne { add 12 idiv @@ -6314,16 +9642,16 @@ begin pad length 0 gt { 0 5 pad length 1 sub { % Fill with 00100 /i exch def - pad i [ 0 0 1 0 0 ] 0 pad length i sub 5 2 copy gt {exch} if pop getinterval putinterval - } for + pad i [ 0 0 1 0 0 ] 0 pad length i sub 5 2 copy gt {exch} if pop getinterval putinterval + } for mode (numeric) eq { % Prefix shift from numeric to ASCII /pad [ 0 0 0 0 pad aload pop ] 0 pad length getinterval def } if } if - - % Concatinate fields + + % Concatenate fields /binval [ - linkage {1} {0} ifelse + linkage {1} {0} ifelse method {48 sub} forall vlf aload pop cdf aload pop @@ -6331,7 +9659,7 @@ begin pad aload pop ] def /datalen binval length 12 idiv def - + /ncr { % n r 2 copy sub 2 copy lt {exch} if % n r maxd mind 1 1 5 3 roll % mind j=1 v=1 n maxd @@ -6346,8 +9674,8 @@ begin 1 index idiv exch 1 add exch } loop exch pop exch pop - } bind def - + } def + /getRSSwidths { /oe exch def /el exch def @@ -6358,7 +9686,7 @@ begin /mask 0 def 0 1 el 2 sub { /bar exch def - /ew 1 def + /ew 1 def /mask mask 1 bar bitshift or def { /sval nm ew sub 1 sub el bar sub 2 sub ncr def oe mask 0 eq and nm ew sub el 2 mul sub bar 2 mul add -2 ge and { @@ -6378,15 +9706,16 @@ begin val 0 lt {exit} if /ew ew 1 add def /mask mask 1 bar bitshift not and def - } loop + } loop /val val sval add def /nm nm ew sub def - out bar ew put + out bar ew put } for out el 1 sub nm put out - } bind def + } def +{ /tab174 [ 347 0 12 5 7 2 87 4 1387 348 10 7 5 4 52 20 @@ -6394,9 +9723,10 @@ begin 3987 2948 6 11 3 6 10 104 4191 3988 4 13 1 8 1 204 ] def +} ctxdef /dxw datalen array def - + 0 1 datalen 1 sub { /x exch def @@ -6419,14 +9749,14 @@ begin /dwo d dgs sub dte idiv delo dmwo 4 true getRSSwidths def /dwe d dgs sub dte mod dele dmwe 4 false getRSSwidths def - /dw 8 array def - x 2 mod 0 eq { + /dw 8 array def + x 2 mod 0 eq { 0 1 3 { /j exch def dw 7 j 2 mul sub dwo j get put dw 6 j 2 mul sub dwe j get put } for - } { + } { 0 1 3 { /j exch def dw j 2 mul dwo j get put @@ -6437,7 +9767,8 @@ begin dxw x dw put } for - + +{ /finderwidths [ 1 8 4 1 1 1 1 4 8 1 3 6 4 1 1 1 1 4 6 3 @@ -6459,6 +9790,7 @@ begin [0 1 2 3 4 5 6 9 10 11] [0 1 2 3 4 7 6 9 8 11 10] ] def +} ctxdef /seq finderseq datalen 2 sub 2 idiv get def /fxw seq length array def @@ -6467,12 +9799,13 @@ begin fxw x finderwidths seq x get 5 mul 5 getinterval put } for +{ /checkweights [ -1 -1 -1 -1 -1 -1 -1 -1 % A1L 77 96 32 81 27 9 3 1 % A1R 20 60 180 118 143 7 21 63 % A2L 205 209 140 117 39 13 145 189 % A2R - 193 157 49 147 19 57 171 91 % B1L + 193 157 49 147 19 57 171 91 % B1L 132 44 85 169 197 136 186 62 % B1R 185 133 188 142 4 12 36 108 % B2L 50 87 29 80 97 173 128 113 % B2R @@ -6493,6 +9826,7 @@ begin 55 165 73 8 24 72 5 15 % F2L 89 100 174 58 160 194 135 45 % F2R ] def +} ctxdef /checkweightseq [ seq {16 mul checkweights exch 16 getinterval aload pop} forall @@ -6501,11 +9835,11 @@ begin /widths [ dxw {{} forall} forall ] def - + /checksum 0 def 0 1 widths length 1 sub { /i exch def - /checksum checksum widths i get checkweightseq i get mul add def + /checksum checksum widths i get checkweightseq i get mul add def } for /checksum checksum 211 mod datalen 3 sub 211 mul add def @@ -6524,7 +9858,7 @@ begin /cwo checksum cgs sub cte idiv celo cmwo 4 true getRSSwidths def /cwe checksum cgs sub cte mod cele cmwe 4 false getRSSwidths def - /cw 8 array def + /cw 8 array def 0 1 3 { /i exch def cw i 2 mul cwo i get put @@ -6547,7 +9881,7 @@ begin 0 1 segments 1 sub { /pos exch r segments mul add def pos datalen lt { - dxw pos get {} forall + dxw pos get {} forall pos 2 mod 0 eq {fxw pos 2 idiv get {} forall} if } if } for @@ -6570,6 +9904,8 @@ begin 1 1 ] def + options (parse) undef + << /ren //renlinear /sbs sbs @@ -6599,12 +9935,10 @@ begin % Derive the separator pattern /sep [ row {1 exch sub} forall ] def - sep 0 [ 0 0 0 0 ] putinterval - sep row length 4 sub [ 0 0 0 0 ] putinterval /finderpos [ % Finder pattern module positions 19 98 row length 13 sub {} for 68 98 row length 13 sub {} for - ] def + ] def finderpos { dup 14 add 1 exch { /i exch def @@ -6620,6 +9954,8 @@ begin sep exch i exch put } for } forall + sep 0 [ 0 0 0 0 ] putinterval + sep row length 4 sub [ 0 0 0 0 ] putinterval % For even segment-pair symbols reverse alternate rows segments 4 mod 0 eq r 2 mod 1 eq and { @@ -6643,9 +9979,9 @@ begin % Extend last row and separator to fill width of symbol /pixx rows 0 get length def [ pixx {0} repeat ] dup 0 rows numrows 1 sub get putinterval - rows exch numrows 1 sub exch put + rows exch numrows 1 sub exch put [ pixx {0} repeat ] dup 0 seps numrows 1 sub get putinterval - seps exch numrows 1 sub exch put + seps exch numrows 1 sub exch put % Middle separator pattern /sep [ pixx 2 idiv 1 add { 0 1 } repeat ] 0 pixx getinterval def @@ -6667,6 +10003,8 @@ begin } for ] def + options (parse) undef + << /ren //renmatrix /pixs pixs @@ -6681,9 +10019,13 @@ begin } ifelse + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /databarexpanded dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -6692,15 +10034,15 @@ end % --END ENCODER databarexpanded-- % --BEGIN ENCODER databarexpandedstacked-- -% --REQUIRES preamble raiseerror renlinear renmatrix databarexpanded-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix databarexpanded-- % --DESC: GS1 DataBar Expanded Stacked % --EXAM: (01)95012345678903(3103)000123 % --EXOP: segments=4 % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp databarexpandedstacked 0.0 2017040400 62326 62296 -%%BeginData: 43 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databarexpandedstacked 0.0 2022082100 72659 72245 +%%BeginData: 46 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /databarexpanded dup /uk.co.terryburton.bwipp findresource put @@ -6712,6 +10054,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def % Parse the input options @@ -6733,12 +10076,14 @@ begin args (opt) options put args - + dontdraw not //renmatrix if end -} bind def +} +[/barcode] {null def} forall +bind def /databarexpandedstacked dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -6747,16 +10092,17 @@ end % --END ENCODER databarexpandedstacked-- % --BEGIN ENCODER gs1northamericancoupon-- -% --REQUIRES preamble raiseerror renlinear renmatrix databarexpanded databarexpandedstacked-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix databarexpanded databarexpandedstacked-- % --DESC: GS1 North American Coupon % --EXAM: (8110)106141416543213500110000310123196000 % --EXOP: includetext segments=8 % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp gs1northamericancoupon 0.0 2017040400 84603 84322 -%%BeginData: 133 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp gs1northamericancoupon 0.0 2022082100 84394 87545 +%%BeginData: 105 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /databarexpandedstacked dup /uk.co.terryburton.bwipp findresource put begin @@ -6767,13 +10113,16 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def - /includetext false def % Enable/disable coupon text - /coupontextfont /NimbusSanL-Regu def + /coupontextfont /Helvetica def /coupontextsize 9 def /coupontextxoffset (unset) def /coupontextyoffset (unset) def + /parse false def + /dontlint false def + /lintreqs true def % Parse the input options options type /stringtype eq { @@ -6791,45 +10140,10 @@ begin coupontextxoffset (unset) ne {/coupontextxoffset coupontextxoffset cvr def} if coupontextyoffset (unset) ne {/coupontextyoffset coupontextyoffset cvr def} if - % Expand ordinals of the form ^NNN to ASCII - /expand { - /in exch def - /out in length string def - /j 0 def - in - { % loop - (^) search { - dup out exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi out exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup out exch j exch putinterval - length j add /j exch def - out 0 j getinterval exit - } ifelse - } loop - } bind def - - % Parse out AIs - /ais [] def - /vals [] def - barcode dup length 1 sub 1 exch getinterval - { % loop - dup () eq {exit} if - (\)) search pop - exch pop - exch (\() search { - exch pop exch 3 1 roll - } { - () 3 1 roll - } ifelse - [ ais aload pop counttomark 2 add index ] /ais exch def - [ vals aload pop counttomark 1 add index expand ] /vals exch def - pop pop - } loop + barcode /ai //gs1process exec pop + /vals exch def + /ais exch def % Validate the AI structure ais length 1 ne { @@ -6853,6 +10167,7 @@ begin coupontext gcp length 1 add cod putinterval % Get the result of encoding with databarexpandedstacked + options (parse) undef options (dontdraw) true put /args barcode options //databarexpandedstacked exec def @@ -6883,7 +10198,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /gs1northamericancoupon dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -6897,10 +10214,10 @@ end % --EXAM: 117480 % --EXOP: showborder % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp pharmacode 0.0 2017040400 65042 61361 -%%BeginData: 91 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp pharmacode 0.0 2022082100 55057 54908 +%%BeginData: 94 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -6911,11 +10228,12 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /height 8 2.835 mul 72 div def /nwidth 0.5 2.835 mul def /wwidth 1.5 2.835 mul def - /swidth 1.0 2.835 mul def + /swidth 1.0 2.835 mul def % Parse the input options options type /stringtype eq { @@ -6927,7 +10245,7 @@ begin currentdict end /options exch def } if options {def} forall - + /height height cvr def /nwidth nwidth cvr def /wwidth wwidth cvr def @@ -6953,7 +10271,7 @@ begin txt i [barcode i 1 getinterval 0 0 () 0] put } for - % Convert the integer into the paramacode string + % Convert the integer into the paramacode string /barcode barcode cvi 1 add 2 17 string cvrs def /barcode barcode 1 barcode length 1 sub getinterval def @@ -6986,7 +10304,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /pharmacode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -7000,10 +10320,10 @@ end % --EXAM: 117480 % --EXOP: includetext showborder % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp pharmacode2 0.0 2017040400 65777 62019 -%%BeginData: 96 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp pharmacode2 0.0 2022082100 55888 55662 +%%BeginData: 99 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -7014,6 +10334,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text /height 4 def % Height of short bars in millimetres @@ -7052,12 +10373,10 @@ begin } for /encstr 16 string def - /bhs 16 array def - /bbs 16 array def /sbs 32 array def /bar 1 25.4 div height mul def % bar height (mm) /spc 1 25.4 div 72 mul def % bar width & spacing (1mm) - + % Convert number into a base3 representation /i 15 def /val barcode cvi def @@ -7069,15 +10388,17 @@ begin /i i 1 sub def } loop /encstr encstr i 1 add 15 i sub getinterval def - + % Generate the bar pattern + /bhs encstr length array def + /bbs encstr length array def 0 1 encstr length 1 sub { /i exch def encstr i get dup bhs i bar [1 1 2] 5 -1 roll get mul put bbs i [0 bar 0] 4 -1 roll get put } for - + % Return the arguments << /ren //renlinear @@ -7094,7 +10415,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /pharmacode2 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -7103,15 +10426,17 @@ end % --END ENCODER pharmacode2-- % --BEGIN ENCODER code2of5-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Code 25 % --EXAM: 01234567 % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp code2of5 0.0 2017040400 75739 71770 -%%BeginData: 150 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp code2of5 0.0 2022082100 73003 69031 +%%BeginData: 165 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -7122,12 +10447,13 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includecheck false def /validatecheck false def /includetext false def % Enable/disable text /includecheckintext false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 1 def @@ -7149,6 +10475,8 @@ begin /textyoffset textyoffset cvr def /height height cvr def + /code2of5 //loadctx exec + % Validate input barcode { dup 48 lt exch 57 gt or { @@ -7173,12 +10501,13 @@ begin } if % Create an array containing the character mappings - /versions << +{ + /versions << /industrial [ (1111313111) (3111111131) (1131111131) (3131111111) (1111311131) (3111311111) (1131311111) (1111113131) (3111113111) (1131113111) (313111) (31113) - ] + ] /iata [ (1111313111) (3111111131) (1131111131) (3131111111) (1111311131) (3111311111) (1131311111) (1111113131) @@ -7197,6 +10526,8 @@ begin (133111) (111331) (311311) (131311) (1111) (311) ] >> def +} ctxdef + versions version known not { /bwipp.code2of5badVersion (Unrecognised Code 25 version) //raiseerror exec } if @@ -7204,13 +10535,16 @@ begin /cs encs 0 get length def /cw 0 encs 0 get {48 sub add} forall def - /ss encs dup length 2 sub get length def - /sw 0 encs dup length 2 sub get {48 sub add} forall def + /ss encs 10 get length def + /sw 0 encs 10 get {48 sub add} forall def + /es encs 11 get length def % Create a string of the available characters +{ /barchars (0123456789) def +} ctxdef - /sbs barlen includecheck {1 add} if cs mul ss add ss add string def + /sbs barlen includecheck {1 add} if cs mul ss add es add string def /txt barlen includecheck {1 add} if array def % Put the start character @@ -7254,9 +10588,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /code2of5 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -7265,15 +10603,15 @@ end % --END ENCODER code2of5-- % --BEGIN ENCODER industrial2of5-- -% --REQUIRES preamble raiseerror renlinear code2of5-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear code2of5-- % --DESC: Industrial 2 of 5 % --EXAM: 01234567 % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp industrial2of5 0.0 2017040400 57761 61035 -%%BeginData: 55 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp industrial2of5 0.0 2022082100 57292 60792 +%%BeginData: 58 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code2of5 dup /uk.co.terryburton.bwipp findresource put @@ -7285,14 +10623,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -7308,7 +10647,7 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def % Get the result of encoding with code2of5 with version=industrial options (dontdraw) true put @@ -7320,10 +10659,12 @@ begin args dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /industrial2of5 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -7332,15 +10673,15 @@ end % --END ENCODER industrial2of5-- % --BEGIN ENCODER iata2of5-- -% --REQUIRES preamble raiseerror renlinear code2of5-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear code2of5-- % --DESC: IATA 2 of 5 % --EXAM: 01234567 % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp iata2of5 0.0 2017040400 57731 61011 -%%BeginData: 55 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp iata2of5 0.0 2022082100 57262 60768 +%%BeginData: 58 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code2of5 dup /uk.co.terryburton.bwipp findresource put @@ -7352,14 +10693,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -7375,7 +10717,7 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def % Get the result of encoding with code2of5 with version=iata options (dontdraw) true put @@ -7387,10 +10729,12 @@ begin args dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /iata2of5 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -7399,15 +10743,15 @@ end % --END ENCODER iata2of5-- % --BEGIN ENCODER matrix2of5-- -% --REQUIRES preamble raiseerror renlinear code2of5-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear code2of5-- % --DESC: Matrix 2 of 5 % --EXAM: 01234567 % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp matrix2of5 0.0 2017040400 57741 61019 -%%BeginData: 55 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp matrix2of5 0.0 2022082100 57272 60776 +%%BeginData: 58 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code2of5 dup /uk.co.terryburton.bwipp findresource put @@ -7419,14 +10763,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -7442,7 +10787,7 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def % Get the result of encoding with code2of5 with version=matrix options (dontdraw) true put @@ -7454,10 +10799,12 @@ begin args dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /matrix2of5 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -7466,15 +10813,15 @@ end % --END ENCODER matrix2of5-- % --BEGIN ENCODER coop2of5-- -% --REQUIRES preamble raiseerror renlinear code2of5-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear code2of5-- % --DESC: COOP 2 of 5 % --EXAM: 01234567 % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp coop2of5 0.0 2017040400 57731 61011 -%%BeginData: 55 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp coop2of5 0.0 2022082100 57262 60768 +%%BeginData: 58 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code2of5 dup /uk.co.terryburton.bwipp findresource put @@ -7486,14 +10833,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -7509,7 +10857,7 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def % Get the result of encoding with code2of5 with version=coop options (dontdraw) true put @@ -7521,10 +10869,12 @@ begin args dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /coop2of5 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -7533,15 +10883,15 @@ end % --END ENCODER coop2of5-- % --BEGIN ENCODER datalogic2of5-- -% --REQUIRES preamble raiseerror renlinear code2of5-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear code2of5-- % --DESC: Datalogic 2 of 5 % --EXAM: 01234567 % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp datalogic2of5 0.0 2017040400 57756 61031 -%%BeginData: 55 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp datalogic2of5 0.0 2022082100 57287 60788 +%%BeginData: 58 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code2of5 dup /uk.co.terryburton.bwipp findresource put @@ -7553,14 +10903,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -7576,7 +10927,7 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def % Get the result of encoding with code2of5 with version=datalogic options (dontdraw) true put @@ -7588,10 +10939,12 @@ begin args dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /datalogic2of5 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -7600,15 +10953,17 @@ end % --END ENCODER datalogic2of5-- % --BEGIN ENCODER code11-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Code 11 % --EXAM: 0123456789 % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp code11 0.0 2017040400 78331 78011 -%%BeginData: 158 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp code11 0.0 2022082100 74329 70384 +%%BeginData: 169 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -7619,16 +10974,17 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includecheck false def /validatecheck false def /includetext false def /includecheckintext false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -7639,13 +10995,16 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def - + + /code11 //loadctx exec + % Create an array containing the character mappings +{ /encs [ (111131) (311131) (131131) (331111) (113131) (313111) (133111) (111331) (311311) (311111) @@ -7656,6 +11015,7 @@ begin /barchars (0123456789-) def /charvals 11 dict def 0 1 10 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -7714,15 +11074,15 @@ begin /xpos exch enc exch get 48 sub xpos add def } for } for - + % Put the checksum and end characters includecheck { barlen 10 ge { - sbs barlen 6 mul 6 add encs checksum1 get putinterval + sbs barlen 6 mul 6 add encs checksum1 get putinterval sbs barlen 6 mul 12 add encs checksum2 get putinterval includecheckintext { txt barlen [barchars checksum1 1 getinterval xpos textyoffset textfont textsize] put - /enc encs checksum1 get def + /enc encs checksum1 get def 0 1 5 { % xpos+=width of the character /xpos exch enc exch get 48 sub xpos add def } for @@ -7733,7 +11093,7 @@ begin } ifelse sbs barlen 6 mul 18 add encs 11 get putinterval } { - sbs barlen 6 mul 6 add encs checksum1 get putinterval + sbs barlen 6 mul 6 add encs checksum1 get putinterval includecheckintext { txt barlen [barchars checksum1 1 getinterval xpos textyoffset textfont textsize] put } { @@ -7759,9 +11119,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /code11 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -7770,15 +11134,17 @@ end % --END ENCODER code11-- % --BEGIN ENCODER bc412-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: BC412 % --EXAM: BC412 % --EXOP: semi includetext includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp bc412 0.0 2017040400 72256 72010 -%%BeginData: 148 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp bc412 0.0 2022082100 75365 71341 +%%BeginData: 203 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -7789,6 +11155,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includecheck false def /validatecheck false def @@ -7796,11 +11163,11 @@ begin /includecheckintext false def /includestartstop false def /semi false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -7811,21 +11178,25 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def - + semi { - /includecheck true def + % Implies includecheck and includecheckintext also /includestartstop true def } if + /bc412 //loadctx exec + % Create a string of the available characters +{ /barchars (0R9GLVHA8EZ4NTS1J2Q6C7DYKBUIX3FWP5M) def /charvals 35 dict def 0 1 34 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -7834,33 +11205,77 @@ begin } if } for - /barlen barcode length validatecheck {1 sub} if def + semi { + % Validate length + validatecheck { + barcode length 8 lt barcode length 19 gt or { + /bwipp.bc412semivalidateBadLength (BC412 semi with check digit must be 8 to 19 characters long) //raiseerror exec + } if + } { + barcode length 7 lt barcode length 18 gt or { + /bwipp.bc412semiBadLength (BC412 semi must be 7 to 18 characters long) //raiseerror exec + } if + } ifelse - /checksum 0 def - 0 1 barlen 1 sub { - barcode exch 1 getinterval charvals exch get - checksum add /checksum exch def - } for - /checksum checksum 35 mod def - validatecheck { - barcode barlen get barchars checksum get ne { - /bwipp.bc412badCheckDigit (Incorrect BC412 check digit provided) //raiseerror exec + /barlen barcode length def + validatecheck not { % Place dummy (0) in checksum position (1-based 2nd) + /barlen barlen 1 add def + /sbarcode barlen string def + sbarcode 0 barcode 0 get put + sbarcode 1 48 put % (0) + sbarcode 2 barcode 1 barlen 2 sub getinterval putinterval + /barcode sbarcode def } if - /barcode barcode 0 barlen getinterval def - /includecheck true def - } if + /sumodd 0 def /sumeven 0 def + 0 1 barlen 1 sub { + /i exch def + barcode i 1 getinterval charvals exch get + i 2 mod 0 eq { % 1-based odd + sumodd add /sumodd exch def + } { + sumeven add /sumeven exch def + } ifelse + } for + /checksum sumodd 35 mod sumeven 35 mod 2 mul add 35 mod def % F = Mod35( Mod35( Fodd ) + 2 * Mod35( Feven ) ) + validatecheck { + checksum 0 ne { + /bwipp.bc412semiBadCheckDigit (Incorrect BC412 semi check digit provided) //raiseerror exec + } if + } { + /checksum checksum 17 mul 35 mod def % CD = Mod35( 17 * F ) + barcode 1 barchars checksum get put + } ifelse + } { + /barlen barcode length validatecheck {1 sub} if def + + /checksum 0 def + 0 1 barlen 1 sub { + barcode exch 1 getinterval charvals exch get + checksum add /checksum exch def + } for + /checksum checksum 35 mod def + validatecheck { + barcode barlen get barchars checksum get ne { + /bwipp.bc412badCheckDigit (Incorrect BC412 check digit provided) //raiseerror exec + } if + /barcode barcode 0 barlen getinterval def + /includecheck true def + } if + } ifelse % Create an array containing the character mappings +{ /encs - [ (11111115) (13111212) (11131113) (12111213) (12121311) - (13131111) (12111312) (11131212) (11121411) (11151111) - (15111111) (11111511) (12131211) (13121112) (13111212) - (11111214) (12121113) (11111313) (13111113) (11121213) - (11141112) (11121312) (11141211) (14121111) (12121212) - (11131311) (13121211) (12111411) (14111211) (11111412) - (12111114) (14111112) (12141111) (11121114) (12131112) - (12) (111) + [ (11111115) (13111212) (11131113) (12111213) (12121311) % 0R9GL + (13131111) (12111312) (11131212) (11121411) (11151111) % VHA8E + (15111111) (11111511) (12131211) (13121112) (13111311) % Z4NTS + (11111214) (12121113) (11111313) (13111113) (11121213) % 1J2Q6 + (11141112) (11121312) (11141211) (14121111) (12121212) % C7DYK + (11131311) (13121211) (12111411) (14111211) (11111412) % BUIX3 + (12111114) (14111112) (12141111) (11121114) (12131112) % FWP5M + (12) (111) % Start Stop ] def +} ctxdef /sbs barlen 1 add 8 mul 5 add string def includecheck { @@ -7896,16 +11311,16 @@ begin txt barlen [() barlen 12 mul txtpos add textyoffset textfont textsize] put } ifelse /pos pos 8 add def - } if + } if % Put the stop character - includestartstop { + includestartstop { sbs pos encs 36 get putinterval - /pos pos 2 add def + /pos pos 3 add def } if % Return the arguments - /sbs sbs 0 pos getinterval def + /sbs sbs 0 pos getinterval def << /ren //renlinear /sbs [sbs {48 sub} forall] @@ -7919,9 +11334,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /bc412 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -7930,15 +11349,17 @@ end % --END ENCODER bc412-- % --BEGIN ENCODER rationalizedCodabar-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Codabar % --EXAM: A0123456789B % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp rationalizedCodabar 0.0 2017040400 78699 78295 -%%BeginData: 156 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp rationalizedCodabar 0.0 2022082100 75010 71044 +%%BeginData: 167 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -7949,17 +11370,18 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /altstartstop false def /includecheck false def % Enable/disable checkdigit /validatecheck false def /includetext false def % Enable/disable text /includecheckintext false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -7970,12 +11392,15 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def - + + /rationalizedCodabar //loadctx exec + +{ % Create an array containing the character mappings /encs [ (11111331) (11113311) (11131131) (33111111) (11311311) @@ -7985,11 +11410,12 @@ begin ] def % Create a string of the available characters - altstartstop { - /barchars (0123456789-$:/.+TN*E) def - } { - /barchars (0123456789-$:/.+ABCD) def - } ifelse + /barcharsnormal (0123456789-$:/.+ABCD) def + /barcharsalt (0123456789-$:/.+TN*E) def +} ctxdef + + /barchars altstartstop {barcharsalt} {barcharsnormal} ifelse def + /charvals 20 dict def 0 1 19 {charvals exch dup barchars exch 1 getinterval exch put} for /bodyvals 16 dict def @@ -7998,7 +11424,7 @@ begin 16 1 19 {ssvals exch dup barchars exch 1 getinterval exch put} for % Validate the input - barcode 0 1 getinterval ssvals exch known not + barcode 0 1 getinterval ssvals exch known not barcode barcode length 1 sub 1 getinterval ssvals exch known not or { altstartstop { /bwipp.rationalizedCodabarBadAltStartStop (Codabar start and stop characters must be one of E N T or *) //raiseerror exec @@ -8020,7 +11446,7 @@ begin checksum add /checksum exch def } for barcode barcode length 1 sub 1 getinterval charvals exch get - checksum add /checksum exch def + checksum add /checksum exch def /checksum 16 checksum 16 mod sub 16 mod def validatecheck { barcode barlen 1 sub get barchars checksum get ne { @@ -8087,9 +11513,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /rationalizedCodabar dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -8098,15 +11528,17 @@ end % --END ENCODER rationalizedCodabar-- % --BEGIN ENCODER onecode-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: USPS Intelligent Mail % --EXAM: 0123456709498765432101234567891 % --EXOP: barcolor=FF0000 % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp onecode 0.0 2017040400 113701 113359 -%%BeginData: 335 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp onecode 0.0 2022082100 108651 104892 +%%BeginData: 348 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -8117,9 +11549,10 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /height 0.15 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -8130,11 +11563,13 @@ begin currentdict end /options exch def } if options {def} forall - + /height height cvr def + /onecode //loadctx exec + /barlen barcode length def - + % Create the human readable text /txtdict << 2 dup @@ -8160,32 +11595,32 @@ begin /base exch def /num exch def num length 1 sub -1 1 { - /i exch def + /i exch def num i 1 sub 2 copy get num i get base idiv add put num i num i get base mod put } for { %loop - extend input as necessary num 0 get base lt {exit} if - /num [0 num {} forall] def + /num [0 num {} forall] def num 0 num 0 get num 1 get base idiv add put num 1 num 1 get base mod put } loop % Trim leading zeros - /num [/i true def num {dup 0 eq i and {pop} {/i false def} ifelse} forall] def + /num [/i true def num {dup 0 eq i and {pop} {/i false def} ifelse} forall] def num length 0 eq {/num [0] def} if num - } bind def + } def /bigadd { 2 copy length exch length 2 copy sub abs /offset exch def lt {exch} if - /a exch def /b exch def + /a exch def /b exch def 0 1 b length 1 sub { dup a exch offset add 2 copy get b 5 -1 roll get add put } for a - } bind def + } def % Conversion of data fields into binary data barlen 20 eq {[0]} if @@ -8208,7 +11643,7 @@ begin bintmp j bintmp j get 256 idiv put } for bytes i bintmp bintmp length 1 sub get 256 mod put - bintmp bintmp length 1 sub 2 copy get 256 idiv put + bintmp bintmp length 1 sub 2 copy get 256 idiv put } for % Generation of 11-bit CRC on byte array @@ -8216,7 +11651,7 @@ begin /dat bytes 0 get 5 bitshift def 6 { fcs dat xor 1024 and 0 ne { - /fcs fcs 1 bitshift 3893 xor def + /fcs fcs 1 bitshift 3893 xor def } { /fcs fcs 1 bitshift def } ifelse @@ -8224,10 +11659,10 @@ begin /dat dat 1 bitshift def } repeat 1 1 12 { - bytes exch get 3 bitshift /dat exch def - 8 { + bytes exch get 3 bitshift /dat exch def + 8 { fcs dat xor 1024 and 0 ne { - /fcs fcs 1 bitshift 3893 xor def + /fcs fcs 1 bitshift 3893 xor def } { /fcs fcs 1 bitshift def } ifelse @@ -8249,7 +11684,7 @@ begin /j exch def binval j 1 add 2 copy get binval j get b mod 10 mul add put binval j binval j get b idiv put - } for + } for codewords i binval binval length 1 sub get b mod put binval binval length 1 sub 2 copy get b idiv put } for @@ -8261,109 +11696,111 @@ begin } if % Conversion from codewords to characters +{ /tab513 [ - 31 7936 47 7808 55 7552 59 7040 61 6016 62 3968 79 7744 87 - 7488 91 6976 93 5952 94 3904 103 7360 107 6848 109 5824 110 3776 - 115 6592 117 5568 118 3520 121 5056 122 3008 124 1984 143 7712 151 - 7456 155 6944 157 5920 158 3872 167 7328 171 6816 173 5792 174 3744 - 179 6560 181 5536 182 3488 185 5024 186 2976 188 1952 199 7264 203 - 6752 205 5728 206 3680 211 6496 213 5472 214 3424 217 4960 218 2912 - 220 1888 227 6368 229 5344 230 3296 233 4832 234 2784 236 1760 241 - 4576 242 2528 244 1504 248 992 271 7696 279 7440 283 6928 285 5904 - 286 3856 295 7312 299 6800 301 5776 302 3728 307 6544 309 5520 310 - 3472 313 5008 314 2960 316 1936 327 7248 331 6736 333 5712 334 3664 - 339 6480 341 5456 342 3408 345 4944 346 2896 348 1872 355 6352 357 - 5328 358 3280 361 4816 362 2768 364 1744 369 4560 370 2512 372 1488 - 376 976 391 7216 395 6704 397 5680 398 3632 403 6448 405 5424 406 - 3376 409 4912 410 2864 412 1840 419 6320 421 5296 422 3248 425 4784 - 426 2736 428 1712 433 4528 434 2480 436 1456 440 944 451 6256 453 - 5232 454 3184 457 4720 458 2672 460 1648 465 4464 466 2416 468 1392 - 472 880 481 4336 482 2288 484 1264 488 752 527 7688 535 7432 539 - 6920 541 5896 542 3848 551 7304 555 6792 557 5768 558 3720 563 6536 - 565 5512 566 3464 569 5000 570 2952 572 1928 583 7240 587 6728 589 - 5704 590 3656 595 6472 597 5448 598 3400 601 4936 602 2888 604 1864 - 611 6344 613 5320 614 3272 617 4808 618 2760 620 1736 625 4552 626 - 2504 628 1480 632 968 647 7208 651 6696 653 5672 654 3624 659 6440 - 661 5416 662 3368 665 4904 666 2856 668 1832 675 6312 677 5288 678 - 3240 681 4776 682 2728 684 1704 689 4520 690 2472 692 1448 696 936 - 707 6248 709 5224 710 3176 713 4712 714 2664 716 1640 721 4456 722 - 2408 724 1384 728 872 737 4328 738 2280 740 1256 775 7192 779 6680 - 781 5656 782 3608 787 6424 789 5400 790 3352 793 4888 794 2840 796 - 1816 803 6296 805 5272 806 3224 809 4760 810 2712 812 1688 817 4504 - 818 2456 820 1432 824 920 835 6232 837 5208 838 3160 841 4696 842 - 2648 844 1624 849 4440 850 2392 852 1368 865 4312 866 2264 868 1240 - 899 6200 901 5176 902 3128 905 4664 906 2616 908 1592 913 4408 914 - 2360 916 1336 929 4280 930 2232 932 1208 961 4216 962 2168 964 1144 - 1039 7684 1047 7428 1051 6916 1053 5892 1054 3844 1063 7300 1067 6788 1069 - 5764 1070 3716 1075 6532 1077 5508 1078 3460 1081 4996 1082 2948 1084 1924 - 1095 7236 1099 6724 1101 5700 1102 3652 1107 6468 1109 5444 1110 3396 1113 - 4932 1114 2884 1116 1860 1123 6340 1125 5316 1126 3268 1129 4804 1130 2756 - 1132 1732 1137 4548 1138 2500 1140 1476 1159 7204 1163 6692 1165 5668 1166 - 3620 1171 6436 1173 5412 1174 3364 1177 4900 1178 2852 1180 1828 1187 6308 - 1189 5284 1190 3236 1193 4772 1194 2724 1196 1700 1201 4516 1202 2468 1204 - 1444 1219 6244 1221 5220 1222 3172 1225 4708 1226 2660 1228 1636 1233 4452 - 1234 2404 1236 1380 1249 4324 1250 2276 1287 7188 1291 6676 1293 5652 1294 - 3604 1299 6420 1301 5396 1302 3348 1305 4884 1306 2836 1308 1812 1315 6292 - 1317 5268 1318 3220 1321 4756 1322 2708 1324 1684 1329 4500 1330 2452 1332 - 1428 1347 6228 1349 5204 1350 3156 1353 4692 1354 2644 1356 1620 1361 4436 - 1362 2388 1377 4308 1378 2260 1411 6196 1413 5172 1414 3124 1417 4660 1418 - 2612 1420 1588 1425 4404 1426 2356 1441 4276 1442 2228 1473 4212 1474 2164 - 1543 7180 1547 6668 1549 5644 1550 3596 1555 6412 1557 5388 1558 3340 1561 - 4876 1562 2828 1564 1804 1571 6284 1573 5260 1574 3212 1577 4748 1578 2700 - 1580 1676 1585 4492 1586 2444 1603 6220 1605 5196 1606 3148 1609 4684 1610 - 2636 1617 4428 1618 2380 1633 4300 1634 2252 1667 6188 1669 5164 1670 3116 - 1673 4652 1674 2604 1681 4396 1682 2348 1697 4268 1698 2220 1729 4204 1730 - 2156 1795 6172 1797 5148 1798 3100 1801 4636 1802 2588 1809 4380 1810 2332 - 1825 4252 1826 2204 1857 4188 1858 2140 1921 4156 1922 2108 2063 7682 2071 - 7426 2075 6914 2077 5890 2078 3842 2087 7298 2091 6786 2093 5762 2094 3714 - 2099 6530 2101 5506 2102 3458 2105 4994 2106 2946 2119 7234 2123 6722 2125 - 5698 2126 3650 2131 6466 2133 5442 2134 3394 2137 4930 2138 2882 2147 6338 - 2149 5314 2150 3266 2153 4802 2154 2754 2161 4546 2162 2498 2183 7202 2187 - 6690 2189 5666 2190 3618 2195 6434 2197 5410 2198 3362 2201 4898 2202 2850 - 2211 6306 2213 5282 2214 3234 2217 4770 2218 2722 2225 4514 2226 2466 2243 - 6242 2245 5218 2246 3170 2249 4706 2250 2658 2257 4450 2258 2402 2273 4322 - 2311 7186 2315 6674 2317 5650 2318 3602 2323 6418 2325 5394 2326 3346 2329 - 4882 2330 2834 2339 6290 2341 5266 2342 3218 2345 4754 2346 2706 2353 4498 - 2354 2450 2371 6226 2373 5202 2374 3154 2377 4690 2378 2642 2385 4434 2401 - 4306 2435 6194 2437 5170 2438 3122 2441 4658 2442 2610 2449 4402 2465 4274 - 2497 4210 2567 7178 2571 6666 2573 5642 2574 3594 2579 6410 2581 5386 2582 - 3338 2585 4874 2586 2826 2595 6282 2597 5258 2598 3210 2601 4746 2602 2698 - 2609 4490 2627 6218 2629 5194 2630 3146 2633 4682 2641 4426 2657 4298 2691 - 6186 2693 5162 2694 3114 2697 4650 2705 4394 2721 4266 2753 4202 2819 6170 - 2821 5146 2822 3098 2825 4634 2833 4378 2849 4250 2881 4186 2945 4154 3079 - 7174 3083 6662 3085 5638 3086 3590 3091 6406 3093 5382 3094 3334 3097 4870 - 3107 6278 3109 5254 3110 3206 3113 4742 3121 4486 3139 6214 3141 5190 3145 - 4678 3153 4422 3169 4294 3203 6182 3205 5158 3209 4646 3217 4390 3233 4262 - 3265 4198 3331 6166 3333 5142 3337 4630 3345 4374 3361 4246 3393 4182 3457 - 4150 3587 6158 3589 5134 3593 4622 3601 4366 3617 4238 3649 4174 3713 4142 - 3841 4126 4111 7681 4119 7425 4123 6913 4125 5889 4135 7297 4139 6785 4141 - 5761 4147 6529 4149 5505 4153 4993 4167 7233 4171 6721 4173 5697 4179 6465 - 4181 5441 4185 4929 4195 6337 4197 5313 4201 4801 4209 4545 4231 7201 4235 - 6689 4237 5665 4243 6433 4245 5409 4249 4897 4259 6305 4261 5281 4265 4769 - 4273 4513 4291 6241 4293 5217 4297 4705 4305 4449 4359 7185 4363 6673 4365 - 5649 4371 6417 4373 5393 4377 4881 4387 6289 4389 5265 4393 4753 4401 4497 - 4419 6225 4421 5201 4425 4689 4483 6193 4485 5169 4489 4657 4615 7177 4619 - 6665 4621 5641 4627 6409 4629 5385 4633 4873 4643 6281 4645 5257 4649 4745 - 4675 6217 4677 5193 4739 6185 4741 5161 4867 6169 4869 5145 5127 7173 5131 - 6661 5133 5637 5139 6405 5141 5381 5155 6277 5157 5253 5187 6213 5251 6181 - 5379 6165 5635 6157 6151 7171 6155 6659 6163 6403 6179 6275 6211 5189 4681 - 4433 4321 3142 2634 2386 2274 1612 1364 1252 856 744 496 + 31 7936 47 7808 55 7552 59 7040 61 6016 62 3968 79 7744 87 + 7488 91 6976 93 5952 94 3904 103 7360 107 6848 109 5824 110 3776 + 115 6592 117 5568 118 3520 121 5056 122 3008 124 1984 143 7712 151 + 7456 155 6944 157 5920 158 3872 167 7328 171 6816 173 5792 174 3744 + 179 6560 181 5536 182 3488 185 5024 186 2976 188 1952 199 7264 203 + 6752 205 5728 206 3680 211 6496 213 5472 214 3424 217 4960 218 2912 + 220 1888 227 6368 229 5344 230 3296 233 4832 234 2784 236 1760 241 + 4576 242 2528 244 1504 248 992 271 7696 279 7440 283 6928 285 5904 + 286 3856 295 7312 299 6800 301 5776 302 3728 307 6544 309 5520 310 + 3472 313 5008 314 2960 316 1936 327 7248 331 6736 333 5712 334 3664 + 339 6480 341 5456 342 3408 345 4944 346 2896 348 1872 355 6352 357 + 5328 358 3280 361 4816 362 2768 364 1744 369 4560 370 2512 372 1488 + 376 976 391 7216 395 6704 397 5680 398 3632 403 6448 405 5424 406 + 3376 409 4912 410 2864 412 1840 419 6320 421 5296 422 3248 425 4784 + 426 2736 428 1712 433 4528 434 2480 436 1456 440 944 451 6256 453 + 5232 454 3184 457 4720 458 2672 460 1648 465 4464 466 2416 468 1392 + 472 880 481 4336 482 2288 484 1264 488 752 527 7688 535 7432 539 + 6920 541 5896 542 3848 551 7304 555 6792 557 5768 558 3720 563 6536 + 565 5512 566 3464 569 5000 570 2952 572 1928 583 7240 587 6728 589 + 5704 590 3656 595 6472 597 5448 598 3400 601 4936 602 2888 604 1864 + 611 6344 613 5320 614 3272 617 4808 618 2760 620 1736 625 4552 626 + 2504 628 1480 632 968 647 7208 651 6696 653 5672 654 3624 659 6440 + 661 5416 662 3368 665 4904 666 2856 668 1832 675 6312 677 5288 678 + 3240 681 4776 682 2728 684 1704 689 4520 690 2472 692 1448 696 936 + 707 6248 709 5224 710 3176 713 4712 714 2664 716 1640 721 4456 722 + 2408 724 1384 728 872 737 4328 738 2280 740 1256 775 7192 779 6680 + 781 5656 782 3608 787 6424 789 5400 790 3352 793 4888 794 2840 796 + 1816 803 6296 805 5272 806 3224 809 4760 810 2712 812 1688 817 4504 + 818 2456 820 1432 824 920 835 6232 837 5208 838 3160 841 4696 842 + 2648 844 1624 849 4440 850 2392 852 1368 865 4312 866 2264 868 1240 + 899 6200 901 5176 902 3128 905 4664 906 2616 908 1592 913 4408 914 + 2360 916 1336 929 4280 930 2232 932 1208 961 4216 962 2168 964 1144 + 1039 7684 1047 7428 1051 6916 1053 5892 1054 3844 1063 7300 1067 6788 1069 + 5764 1070 3716 1075 6532 1077 5508 1078 3460 1081 4996 1082 2948 1084 1924 + 1095 7236 1099 6724 1101 5700 1102 3652 1107 6468 1109 5444 1110 3396 1113 + 4932 1114 2884 1116 1860 1123 6340 1125 5316 1126 3268 1129 4804 1130 2756 + 1132 1732 1137 4548 1138 2500 1140 1476 1159 7204 1163 6692 1165 5668 1166 + 3620 1171 6436 1173 5412 1174 3364 1177 4900 1178 2852 1180 1828 1187 6308 + 1189 5284 1190 3236 1193 4772 1194 2724 1196 1700 1201 4516 1202 2468 1204 + 1444 1219 6244 1221 5220 1222 3172 1225 4708 1226 2660 1228 1636 1233 4452 + 1234 2404 1236 1380 1249 4324 1250 2276 1287 7188 1291 6676 1293 5652 1294 + 3604 1299 6420 1301 5396 1302 3348 1305 4884 1306 2836 1308 1812 1315 6292 + 1317 5268 1318 3220 1321 4756 1322 2708 1324 1684 1329 4500 1330 2452 1332 + 1428 1347 6228 1349 5204 1350 3156 1353 4692 1354 2644 1356 1620 1361 4436 + 1362 2388 1377 4308 1378 2260 1411 6196 1413 5172 1414 3124 1417 4660 1418 + 2612 1420 1588 1425 4404 1426 2356 1441 4276 1442 2228 1473 4212 1474 2164 + 1543 7180 1547 6668 1549 5644 1550 3596 1555 6412 1557 5388 1558 3340 1561 + 4876 1562 2828 1564 1804 1571 6284 1573 5260 1574 3212 1577 4748 1578 2700 + 1580 1676 1585 4492 1586 2444 1603 6220 1605 5196 1606 3148 1609 4684 1610 + 2636 1617 4428 1618 2380 1633 4300 1634 2252 1667 6188 1669 5164 1670 3116 + 1673 4652 1674 2604 1681 4396 1682 2348 1697 4268 1698 2220 1729 4204 1730 + 2156 1795 6172 1797 5148 1798 3100 1801 4636 1802 2588 1809 4380 1810 2332 + 1825 4252 1826 2204 1857 4188 1858 2140 1921 4156 1922 2108 2063 7682 2071 + 7426 2075 6914 2077 5890 2078 3842 2087 7298 2091 6786 2093 5762 2094 3714 + 2099 6530 2101 5506 2102 3458 2105 4994 2106 2946 2119 7234 2123 6722 2125 + 5698 2126 3650 2131 6466 2133 5442 2134 3394 2137 4930 2138 2882 2147 6338 + 2149 5314 2150 3266 2153 4802 2154 2754 2161 4546 2162 2498 2183 7202 2187 + 6690 2189 5666 2190 3618 2195 6434 2197 5410 2198 3362 2201 4898 2202 2850 + 2211 6306 2213 5282 2214 3234 2217 4770 2218 2722 2225 4514 2226 2466 2243 + 6242 2245 5218 2246 3170 2249 4706 2250 2658 2257 4450 2258 2402 2273 4322 + 2311 7186 2315 6674 2317 5650 2318 3602 2323 6418 2325 5394 2326 3346 2329 + 4882 2330 2834 2339 6290 2341 5266 2342 3218 2345 4754 2346 2706 2353 4498 + 2354 2450 2371 6226 2373 5202 2374 3154 2377 4690 2378 2642 2385 4434 2401 + 4306 2435 6194 2437 5170 2438 3122 2441 4658 2442 2610 2449 4402 2465 4274 + 2497 4210 2567 7178 2571 6666 2573 5642 2574 3594 2579 6410 2581 5386 2582 + 3338 2585 4874 2586 2826 2595 6282 2597 5258 2598 3210 2601 4746 2602 2698 + 2609 4490 2627 6218 2629 5194 2630 3146 2633 4682 2641 4426 2657 4298 2691 + 6186 2693 5162 2694 3114 2697 4650 2705 4394 2721 4266 2753 4202 2819 6170 + 2821 5146 2822 3098 2825 4634 2833 4378 2849 4250 2881 4186 2945 4154 3079 + 7174 3083 6662 3085 5638 3086 3590 3091 6406 3093 5382 3094 3334 3097 4870 + 3107 6278 3109 5254 3110 3206 3113 4742 3121 4486 3139 6214 3141 5190 3145 + 4678 3153 4422 3169 4294 3203 6182 3205 5158 3209 4646 3217 4390 3233 4262 + 3265 4198 3331 6166 3333 5142 3337 4630 3345 4374 3361 4246 3393 4182 3457 + 4150 3587 6158 3589 5134 3593 4622 3601 4366 3617 4238 3649 4174 3713 4142 + 3841 4126 4111 7681 4119 7425 4123 6913 4125 5889 4135 7297 4139 6785 4141 + 5761 4147 6529 4149 5505 4153 4993 4167 7233 4171 6721 4173 5697 4179 6465 + 4181 5441 4185 4929 4195 6337 4197 5313 4201 4801 4209 4545 4231 7201 4235 + 6689 4237 5665 4243 6433 4245 5409 4249 4897 4259 6305 4261 5281 4265 4769 + 4273 4513 4291 6241 4293 5217 4297 4705 4305 4449 4359 7185 4363 6673 4365 + 5649 4371 6417 4373 5393 4377 4881 4387 6289 4389 5265 4393 4753 4401 4497 + 4419 6225 4421 5201 4425 4689 4483 6193 4485 5169 4489 4657 4615 7177 4619 + 6665 4621 5641 4627 6409 4629 5385 4633 4873 4643 6281 4645 5257 4649 4745 + 4675 6217 4677 5193 4739 6185 4741 5161 4867 6169 4869 5145 5127 7173 5131 + 6661 5133 5637 5139 6405 5141 5381 5155 6277 5157 5253 5187 6213 5251 6181 + 5379 6165 5635 6157 6151 7171 6155 6659 6163 6403 6179 6275 6211 5189 4681 + 4433 4321 3142 2634 2386 2274 1612 1364 1252 856 744 496 ] def /tab213 [ - 3 6144 5 5120 6 3072 9 4608 10 2560 12 1536 17 4352 18 - 2304 20 1280 24 768 33 4224 34 2176 36 1152 40 640 48 384 - 65 4160 66 2112 68 1088 72 576 80 320 96 192 129 4128 130 - 2080 132 1056 136 544 144 288 257 4112 258 2064 260 1040 264 528 - 513 4104 514 2056 516 1032 1025 4100 1026 2052 2049 4098 4097 2050 1028 + 3 6144 5 5120 6 3072 9 4608 10 2560 12 1536 17 4352 18 + 2304 20 1280 24 768 33 4224 34 2176 36 1152 40 640 48 384 + 65 4160 66 2112 68 1088 72 576 80 320 96 192 129 4128 130 + 2080 132 1056 136 544 144 288 257 4112 258 2064 260 1040 264 528 + 513 4104 514 2056 516 1032 1025 4100 1026 2052 2049 4098 4097 2050 1028 520 272 160 ] def +} ctxdef /chars 10 array def 0 1 9 { /i exch def codewords i get dup 1286 le { - tab513 exch get + tab513 exch get } { tab213 exch 1287 sub get } ifelse @@ -8378,6 +11815,7 @@ begin } for % Conversion from characters to the OneCode encoding +{ /barmap [ 7 2 4 3 1 10 0 0 9 12 2 8 5 5 6 11 8 9 3 1 0 1 5 12 2 5 1 8 4 4 9 11 6 3 8 10 3 9 7 6 @@ -8393,8 +11831,9 @@ begin 5 4 0 11 1 5 2 2 9 1 4 12 8 3 6 6 7 0 3 7 4 7 7 5 0 12 1 11 2 9 9 0 6 8 5 3 3 10 8 2 ] def +} ctxdef - /bbs 65 array def + /bbs 65 array def /bhs 65 array def 0 1 64 { /i exch def @@ -8406,18 +11845,18 @@ begin } if dec not asc and { bbs i 3 height mul 8 div put - bhs i 5 height mul 8 div put + bhs i 5 height mul 8 div put } if dec asc not and { bbs i 0 height mul 8 div put - bhs i 5 height mul 8 div put + bhs i 5 height mul 8 div put } if dec asc and { bbs i 0 height mul 8 div put - bhs i 8 height mul 8 div put + bhs i 8 height mul 8 div put } if } for - + % Return the arguments << /ren //renlinear @@ -8426,7 +11865,7 @@ begin /sbs [bhs length 1 sub {1.44 1.872} repeat 1.44] /txt txt /textxalign (left) - /textfont /NimbusSanL-Regu + /textfont /Helvetica /textyoffset 1 /textxoffset -0.3 /opt options @@ -8434,9 +11873,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /onecode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -8445,15 +11888,17 @@ end % --END ENCODER onecode-- % --BEGIN ENCODER postnet-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: USPS POSTNET % --EXAM: 01234 % --EXOP: includetext includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp postnet 0.0 2017040400 73030 72820 -%%BeginData: 140 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp postnet 0.0 2022082100 70644 66913 +%%BeginData: 151 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -8464,15 +11909,16 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text /validatecheck false def /includecheckintext false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 0.125 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -8483,12 +11929,14 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def - + + /postnet //loadctx exec + /barlen barcode length validatecheck {1 sub} if def % Validate the input @@ -8501,9 +11949,18 @@ begin } if } forall +{ % Create a string of the available characters /barchars (0123456789) def + % Create an array containing the character mappings + /encs + [ (55222) (22255) (22525) (22552) (25225) + (25252) (25522) (52225) (52252) (52522) + (5) (5) + ] def +} ctxdef + /checksum 0 def 0 1 barlen 1 sub { /i exch def @@ -8517,13 +11974,6 @@ begin /barcode barcode 0 barlen getinterval def } if - % Create an array containing the character mappings - /encs - [ (55222) (22255) (22525) (22552) (25225) - (25252) (25522) (52225) (52252) (52522) - (5) (5) - ] def - /bhs barlen 5 mul 7 add array def /txt barlen 1 add array def @@ -8555,14 +12005,14 @@ begin /j exch def heights j enc j 1 getinterval cvi height mul 5 div put } for - bhs barlen 5 mul 1 add heights putinterval - + bhs barlen 5 mul 1 add heights putinterval + includecheckintext { txt barlen [barchars checksum 1 getinterval barlen 5 mul 1 add 3.312 mul textyoffset textfont textsize] put } { txt barlen [( ) barlen 5 mul 1 add 72 mul 25 div textyoffset textfont textsize] put } ifelse - + % Put end character /enc encs 11 get def /heights enc length array def @@ -8570,7 +12020,7 @@ begin /j exch def heights j enc j 1 getinterval cvi height mul 5 div put } for - bhs barlen 5 mul 6 add heights putinterval + bhs barlen 5 mul 6 add heights putinterval % Return the arguments << @@ -8586,9 +12036,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /postnet dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -8597,15 +12051,17 @@ end % --END ENCODER postnet-- % --BEGIN ENCODER planet-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: USPS PLANET % --EXAM: 01234567890 % --EXOP: includetext includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp planet 0.0 2017040400 72826 72620 -%%BeginData: 141 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp planet 0.0 2022082100 70504 66777 +%%BeginData: 152 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -8616,15 +12072,16 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text /validatecheck false def /includecheckintext false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 0.125 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -8635,12 +12092,14 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def + /planet //loadctx exec + /barlen barcode length validatecheck {1 sub} if def % Validate the input @@ -8653,9 +12112,18 @@ begin } if } forall +{ % Create a string of the available characters /barchars (0123456789) def + % Create an array containing the character mappings + /encs + [ (22555) (55522) (55252) (55225) (52552) + (52525) (52255) (25552) (25525) (25255) + (5) (5) + ] def +} ctxdef + % Calculate the checksum /checksum 0 def 0 1 barlen 1 sub { @@ -8670,13 +12138,6 @@ begin /barcode barcode 0 barlen getinterval def } if - % Create an array containing the character mappings - /encs - [ (22555) (55522) (55252) (55225) (52552) - (52525) (52255) (25552) (25525) (25255) - (5) (5) - ] def - /bhs barlen 5 mul 7 add array def /txt barlen 1 add array def @@ -8708,14 +12169,14 @@ begin /j exch def heights j enc j 1 getinterval cvi height mul 5 div put } for - bhs barlen 5 mul 1 add heights putinterval - + bhs barlen 5 mul 1 add heights putinterval + includecheckintext { txt barlen [barchars checksum 1 getinterval barlen 5 mul 1 add 3.312 mul textyoffset textfont textsize] put } { txt barlen [( ) barlen 5 mul 1 add 72 mul 25 div textyoffset textfont textsize] put } ifelse - + % Put end character /enc encs 11 get def /heights enc length array def @@ -8723,7 +12184,7 @@ begin /j exch def heights j enc j 1 getinterval cvi height mul 5 div put } for - bhs barlen 5 mul 6 add heights putinterval + bhs barlen 5 mul 6 add heights putinterval % Return the arguments << @@ -8739,9 +12200,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /planet dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -8750,15 +12215,17 @@ end % --END ENCODER planet-- % --BEGIN ENCODER royalmail-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Royal Mail 4 State Customer Code % --EXAM: LE28HS9Z % --EXOP: includetext barcolor=FF0000 % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp royalmail 0.0 2017040400 73773 73626 -%%BeginData: 145 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp royalmail 0.0 2022082100 71475 67703 +%%BeginData: 156 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -8769,15 +12236,16 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text /validatecheck false def /includecheckintext false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 0.175 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -8788,17 +12256,32 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def + /royalmail //loadctx exec + +{ % Create a string of the available characters /barchars (ZUVWXY501234B6789AHCDEFGNIJKLMTOPQRS) def /charvals 36 dict def 0 1 35 {charvals exch dup barchars exch 1 getinterval exch put} for + % Create an array containing the character mappings + /encs + [ (3300) (2211) (2301) (2310) (3201) (3210) + (1122) (0033) (0123) (0132) (1023) (1032) + (1302) (0213) (0303) (0312) (1203) (1212) + (1320) (0231) (0321) (0330) (1221) (1230) + (3102) (2013) (2103) (2112) (3003) (3012) + (3120) (2031) (2121) (2130) (3021) (3030) + (2) (3) + ] def +} ctxdef + % Validate the input 0 1 barcode length 1 sub { barcode exch 1 getinterval charvals exch known not { @@ -8814,7 +12297,7 @@ begin /i exch def /indx charvals barcode i 1 getinterval get def /checksumrow checksumrow indx 6 idiv add def - /checksumcol checksumcol indx 6 mod add def + /checksumcol checksumcol indx 6 mod add def } for /checksum checksumrow 6 mod 6 mul checksumcol 6 mod add def validatecheck { @@ -8824,23 +12307,12 @@ begin /barcode barcode 0 barlen getinterval def } if - % Create an array containing the character mappings - /encs - [ (3300) (2211) (2301) (2310) (3201) (3210) - (1122) (0033) (0123) (0132) (1023) (1032) - (1302) (0213) (0303) (0312) (1203) (1212) - (1320) (0231) (0321) (0330) (1221) (1230) - (3102) (2013) (2103) (2112) (3003) (3012) - (3120) (2031) (2121) (2130) (3021) (3030) - (2) (3) - ] def - /encstr barlen 4 mul 6 add string def /txt barlen 1 add array def % Put start character encstr 0 encs 36 get putinterval - + 0 1 barlen 1 sub { /i exch def /indx charvals barcode i 1 getinterval get def @@ -8855,11 +12327,11 @@ begin } { txt barlen [( ) barlen 4 mul 1 add 3.312 mul textyoffset textfont textsize] put } ifelse - + % Put end character - encstr barlen 4 mul 5 add encs 37 get putinterval + encstr barlen 4 mul 5 add encs 37 get putinterval - /bbs encstr length array def + /bbs encstr length array def /bhs encstr length array def 0 1 encstr length 1 sub { /i exch def @@ -8881,7 +12353,7 @@ begin bhs i 8 height mul 8 div put } if } for - + % Return the arguments << /ren //renlinear @@ -8896,9 +12368,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /royalmail dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -8907,15 +12383,17 @@ end % --END ENCODER royalmail-- % --BEGIN ENCODER auspost-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: AusPost 4 State Customer Code % --EXAM: 5956439111ABA 9 % --EXOP: includetext custinfoenc=character % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp auspost 0.0 2017040400 85865 85800 -%%BeginData: 202 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp auspost 0.0 2022082100 82406 78597 +%%BeginData: 215 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -8926,14 +12404,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 0.175 def /custinfoenc (character) def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -8944,13 +12423,16 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def + /ausport //loadctx exec + % Create an array containing the character mappings +{ /encs [ (000) (001) (002) (010) (011) (012) (020) (021) (022) (100) (101) (102) (110) (111) (112) (120) @@ -8966,7 +12448,8 @@ begin % Create a string of the available characters /barchars (ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz #) def - +} ctxdef + /barlen barcode length def barcode 0 2 getinterval (11) eq {37} if barcode 0 2 getinterval (45) eq {37} if @@ -8980,57 +12463,58 @@ begin % Encode the FCC 0 1 1 { - /i exch def + /i exch def encs barcode i 1 getinterval cvi 64 add get encstr i 2 mul 2 add 3 2 roll putinterval } for - + % Encode the DPID 2 1 9 { - /i exch def + /i exch def encs barcode i 1 getinterval cvi 64 add get encstr i 2 mul 2 add 3 2 roll putinterval txt i 2 sub [barcode i 1 getinterval i 2 sub 2 mul 6 add 3.312 mul textyoffset textfont textsize] put } for - - % Encode the customer information + + % Encode the customer information custinfoenc (numeric) eq { 0 1 barlen 11 sub { /i exch def encs barcode i 10 add 1 getinterval cvi 64 add get encstr i 2 mul 22 add 3 2 roll putinterval txt i 8 add [barcode i 10 add 1 getinterval i 2 mul 22 add 3.312 mul textyoffset textfont textsize] put - } for + } for /ciflen barlen 10 sub 2 mul def } { 0 1 barlen 11 sub { - /i exch def + /i exch def barcode i 10 add 1 getinterval barchars exch search - pop - length /indx exch def - pop pop - /enc encs indx get def + pop + length /indx exch def + pop pop + /enc encs indx get def encstr i 3 mul 22 add enc putinterval txt i 8 add [barcode i 10 add 1 getinterval i 3 mul 22 add 3.312 mul textyoffset textfont textsize] put - } for + } for /ciflen barlen 10 sub 3 mul def } ifelse % Add any filler characters - 22 ciflen add 1 encstr length 14 sub { + 22 ciflen add 1 encstr length 14 sub { encstr exch encs 75 get putinterval } for - + % Create the 64x64 Reed-Solomon table +{ /rstable 64 64 mul array def rstable 0 [ 64 {0} repeat ] putinterval rstable 64 [ 0 1 63 {} for ] putinterval /prev 1 def - 64 { + 64 { /next prev 1 bitshift def next 64 and 0 ne { /next next 67 xor def - } if + } if 0 1 63 { /j exch def /nextcell {rstable 64 next mul j add} def @@ -9041,7 +12525,8 @@ begin } for /prev next def } repeat - +} ctxdef + % Calculate the Reed-Solomon codes for triples /rscodes encstr length 16 sub 3 idiv 4 add array def rscodes 0 [ 4 {0} repeat ] putinterval @@ -9050,9 +12535,9 @@ begin rscodes rscodes length i 2 sub 3 idiv sub 1 sub encstr i 1 getinterval cvi 16 mul encstr i 1 add 1 getinterval cvi 4 mul add - encstr i 2 add 1 getinterval cvi add + encstr i 2 add 1 getinterval cvi add put - } for + } for rscodes length 5 sub -1 0 { /i exch def 0 1 4 { @@ -9068,12 +12553,12 @@ begin /enc rscodes 3 i sub get 4 3 string cvrs def checkcode i 3 mul 3 enc length sub add enc putinterval } for - + % Put checkcode and end characters encstr encstr length 14 sub checkcode putinterval - encstr encstr length 2 sub encs 74 get putinterval + encstr encstr length 2 sub encs 74 get putinterval - /bbs encstr length array def + /bbs encstr length array def /bhs encstr length array def 0 1 encstr length 1 sub { /i exch def @@ -9094,8 +12579,8 @@ begin bbs i 3 height mul 8 div put bhs i 2 height mul 8 div put } if - } for - + } for + % Return the arguments << /ren //renlinear @@ -9110,9 +12595,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /auspost dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -9121,15 +12610,17 @@ end % --END ENCODER auspost-- % --BEGIN ENCODER kix-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Royal Dutch TPG Post KIX % --EXAM: 1231FZ13XHS % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp kix 0.0 2017040400 67923 64189 -%%BeginData: 111 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp kix 0.0 2022082100 66705 63002 +%%BeginData: 122 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -9140,13 +12631,14 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 0.175 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -9157,26 +12649,30 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def - + + /kix //loadctx exec + +{ % Create an array containing the character mappings /encs [ (0033) (0123) (0132) (1023) (1032) (1122) - (0213) (0303) (0312) (1203) (1212) (1302) + (0213) (0303) (0312) (1203) (1212) (1302) (0231) (0321) (0330) (1221) (1230) (1320) (2013) (2103) (2112) (3003) (3012) (3102) - (2031) (2121) (2130) (3021) (3030) (3120) - (2211) (2301) (2310) (3201) (3210) (3300) + (2031) (2121) (2130) (3021) (3030) (3120) + (2211) (2301) (2310) (3201) (3210) (3300) ] def % Create a string of the available characters /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ) def /charvals 36 dict def 0 1 35 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -9188,7 +12684,7 @@ begin /barlen barcode length def /encstr barlen 4 mul string def /txt barlen array def - + 0 1 barlen 1 sub { /i exch def /indx charvals barcode i 1 getinterval get def @@ -9196,7 +12692,7 @@ begin txt i [barcode i 1 getinterval i 4 mul 3.312 mul textyoffset textfont textsize] put } for - /bbs encstr length array def + /bbs encstr length array def /bhs encstr length array def 0 1 encstr length 1 sub { /i exch def @@ -9218,7 +12714,7 @@ begin bhs i 8 height mul 8 div put } if } for - + % Return the arguments << /ren //renlinear @@ -9233,9 +12729,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /kix dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -9244,15 +12744,17 @@ end % --END ENCODER kix-- % --BEGIN ENCODER japanpost-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Japan Post 4 State Customer Code % --EXAM: 6540123789-A-K-Z % --EXOP: includetext includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp japanpost 0.0 2017040400 74350 74174 -%%BeginData: 162 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp japanpost 0.0 2022082100 71516 67819 +%%BeginData: 174 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -9263,14 +12765,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text /includecheckintext false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 0.175 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -9281,24 +12784,29 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def - + + /barlen barcode length def + + /japanpost //loadctx exec + +{ % Create an array containing the character mappings % 0123456789- C1C2C3C4C5C6C7C8 ST EN /encs [ (300) (330) (312) (132) (321) (303) (123) (231) (213) (033) (030) - (120) (102) (210) (012) (201) (021) (003) (333) + (120) (102) (210) (012) (201) (021) (003) (333) (31) (13) ] def % Create a string of the available characters /barchars (0123456789-ABCDEFGHIJKLMNOPQRSTUVWXYZ) def - /barlen barcode length def - +} ctxdef + /encstr 20 1 add 3 mul 4 add string def /digits 20 array def /txt barlen 1 add array def @@ -9407,9 +12915,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /japanpost dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -9418,15 +12930,17 @@ end % --END ENCODER japanpost-- % --BEGIN ENCODER msi-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: MSI Modified Plessey % --EXAM: 0123456789 % --EXOP: includetext includecheck includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp msi 0.0 2017040400 77937 77655 -%%BeginData: 139 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp msi 0.0 2022082100 76335 72636 +%%BeginData: 150 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -9437,17 +12951,18 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includecheck false def % Enable/disable checkdigit /includetext false def % Enable/disable text /includecheckintext false def /checktype (mod10) def /badmod11 false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -9458,12 +12973,15 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def - + + /msi //loadctx exec + +{ % Create an array containing the character mappings /encs [ (12121212) (12121221) (12122112) (12122121) (12211212) @@ -9473,42 +12991,43 @@ begin % Create a string of the available characters /barchars (0123456789) def +} ctxdef /barlen barcode length def % Length of the code /txtlen barlen def /mod10 { /code exch def - 0 0 code {48 sub exch 10 mul add exch} forall pop 2 mul + 0 0 code {48 sub exch 10 mul add exch} forall pop 2 mul 0 {1 index 10 mod add exch 10 idiv dup 0 eq {pop exit} if exch} loop 0 0 code {48 sub add exch} forall exch pop add 10 mod 10 exch sub 10 mod code length 1 add string dup 0 code putinterval dup code length 4 -1 roll 48 add put - } bind def + } def /mod11 { /code exch def code length 1 sub code {48 sub exch dup 1 sub exch 6 mod 2 add exch} forall pop - 0 code length {3 1 roll mul add} repeat + 0 code length {3 1 roll mul add} repeat 11 mod 11 exch sub 11 mod dup 10 eq badmod11 and { pop code length 2 add string dup 0 code putinterval dup code length (10) putinterval } { code length 1 add string dup 0 code putinterval dup code length 4 -1 roll 48 add put } ifelse - } bind def + } def /ncrmod11 { /code exch def code length 1 sub code {48 sub exch dup 1 sub exch 8 mod 2 add exch} forall pop - 0 code length {3 1 roll mul add} repeat + 0 code length {3 1 roll mul add} repeat 11 mod 11 exch sub 11 mod dup 10 eq badmod11 and { pop code length 2 add string dup 0 code putinterval dup code length (10) putinterval } { code length 1 add string dup 0 code putinterval dup code length 4 -1 roll 48 add put } ifelse - } bind def + } def % Calculate checksum includecheck { @@ -9558,9 +13077,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /msi dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -9569,15 +13092,17 @@ end % --END ENCODER msi-- % --BEGIN ENCODER plessey-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Plessey UK % --EXAM: 01234ABCD % --EXOP: includetext includecheckintext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp plessey 0.0 2017040400 75943 75566 -%%BeginData: 146 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp plessey 0.0 2022082100 73069 69275 +%%BeginData: 157 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -9588,16 +13113,17 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text /validatecheck false def /includecheckintext false def /unidirectional false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -9608,17 +13134,30 @@ begin currentdict end /options exch def } if options {def} forall - + /textfont textfont cvlit def /textsize textsize cvr def /textyoffset textyoffset cvr def /height height cvr def - + + /plessey //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEF) def /charvals 16 dict def 0 1 15 {charvals exch dup barchars exch 1 getinterval exch put} for + % Create an array containing the character mappings + /encs + [ (14141414) (32141414) (14321414) (32321414) + (14143214) (32143214) (14323214) (32323214) + (14141432) (32141432) (14321432) (32321432) + (14143232) (32143232) (14323232) (32323232) + (32321432) (541412323) (323) + ] def +} ctxdef + % Validate the input 0 1 barcode length 1 sub { barcode exch 1 getinterval charvals exch known not { @@ -9666,15 +13205,6 @@ begin /barcode barcode 0 barlen getinterval def } if - % Create an array containing the character mappings - /encs - [ (14141414) (32141414) (14321414) (32321414) - (14143214) (32143214) (14323214) (32323214) - (14141432) (32141432) (14321432) (32321432) - (14143232) (32143232) (14323232) (32323232) - (32321432) (541412323) (323) - ] def - /sbs barlen 8 mul unidirectional {27} {33} ifelse add string def /txt barlen 2 add array def @@ -9716,9 +13246,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /plessey dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -9727,16 +13261,19 @@ end % --END ENCODER plessey-- % --BEGIN ENCODER telepen-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renlinear-- % --DESC: Telepen % --EXAM: ABCDEF % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp telepen 0.0 2017040400 76901 76597 -%%BeginData: 173 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp telepen 0.0 2022082100 71738 74915 +%%BeginData: 174 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin /telepen { @@ -9746,10 +13283,11 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /numeric false def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 1 def @@ -9771,28 +13309,20 @@ begin /textyoffset textyoffset cvr def /height height cvr def + /telepen //loadctx exec + % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if + /fncvals << + /parse parse + /parseonly true + /parsefnc false + >> def + /barcode barcode fncvals //parseinput exec def + /barlen barcode length def + options (parse) undef % Create an array containing the character mappings +{ /encs [ (31313131) (1131313111) (33313111) (1111313131) (3111313111) (11333131) (13133131) (111111313111) @@ -9827,6 +13357,7 @@ begin (3113111113) (11311111111111) (331111111111) (111113111113) (31111111111111) (111311111113) (131111111113) (1111111111111111) ] def +} ctxdef /barlen barcode length def % Length of the code /sbs barlen 16 mul 48 add string def @@ -9842,7 +13373,7 @@ begin { % loop i barlen eq {exit} if numeric { % numeric mode: 00-99 & 0X-9X - barcode i get 16 gt { + barcode i get 16 gt { /np barcode i 2 getinterval def np 1 1 getinterval (X) eq { % X in even position amongst digits /indx np 0 1 getinterval cvi 17 add def @@ -9901,9 +13432,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /telepen dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -9912,15 +13447,15 @@ end % --END ENCODER telepen-- % --BEGIN ENCODER telepennumeric-- -% --REQUIRES preamble raiseerror renlinear telepen-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renlinear telepen-- % --DESC: Telepen Numeric % --EXAM: 01234567 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp telepennumeric 0.0 2017040400 57741 61015 -%%BeginData: 55 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp telepennumeric 0.0 2022082100 63671 63649 +%%BeginData: 58 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /telepen dup /uk.co.terryburton.bwipp findresource put @@ -9932,14 +13467,15 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -9955,9 +13491,9 @@ begin /textsize textsize cvr def /textxoffset textxoffset cvr def /textyoffset textyoffset cvr def - /height height cvr def + /height height cvr def - % Get the result of encoding with code2of5 with version=industrial + % Get the result of encoding with telepen with numeric=true options (dontdraw) true put options (numeric) true put @@ -9967,10 +13503,12 @@ begin args dontdraw not //renlinear if - + end -} bind def +} +[/barcode] {null def} forall +bind def /telepennumeric dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -9979,16 +13517,19 @@ end % --END ENCODER telepennumeric-- % --BEGIN ENCODER posicode-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renlinear-- % --DESC: PosiCode % --EXAM: ABC123 % --EXOP: version=b inkspread=-0.5 parsefnc includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp posicode 0.0 2017040400 128220 127472 -%%BeginData: 423 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp posicode 0.0 2022082100 113193 116240 +%%BeginData: 399 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin /posicode { @@ -9998,9 +13539,10 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textxoffset 0 def /textyoffset -7 def @@ -10032,40 +13574,18 @@ begin /checkoffset checkoffset cvi def /height height cvr def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if - - /barlen barcode length def + /posicode //loadctx exec +{ % Special function characters - /la0 -1 def /la1 -2 def /la2 -3 def - /sf0 -4 def /sf1 -5 def /sf2 -6 def + /la0 -1 def /la1 -2 def /la2 -3 def + /sf0 -4 def /sf1 -5 def /sf2 -6 def /fn1 -7 def /fn2 -8 def /fn3 -9 def /fn4 -10 def % Character maps for each state - << - /normal - [ + /charmapsnormal [ % 0 1 2 0 1 2 0 1 2 - [ (0) (^) (') ] [ (1) (;) 27 ] [ (2) (<) 28 ] % 0-2 + [ (0) (^) (') ] [ (1) (;) 27 ] [ (2) (<) 28 ] % 0-2 [ (3) (=) 29 ] [ (4) (>) 30 ] [ (5) (?) 31 ] % 3-5 [ (6) (@) (!) ] [ (7) ([) (") ] [ (8) 92 (#) ] % 6-8 [ (9) (]) (&) ] [ (A) (a) 1 ] [ (B) (b) 2 ] % 9-11 @@ -10081,9 +13601,8 @@ begin [ ($) ({) (*) ] [ (/) (|) (,) ] [ (+) (}) (:) ] % 39-41 [ (%) (~) fn1 ] [ la1 la0 fn2 ] [ sf1 sf0 fn3 ] % 42-44 [ sf2 sf2 fn4 ] % 45 - ] - /limited - [ + ] def + /chapmapslimited [ [ (0) -98 -98 ] [ (1) -98 -98 ] [ (2) -98 -98 ] % 0-2 [ (3) -98 -98 ] [ (4) -98 -98 ] [ (5) -98 -98 ] % 3-5 [ (6) -98 -98 ] [ (7) -98 -98 ] [ (8) -98 -98 ] % 6-8 @@ -10097,10 +13616,10 @@ begin [ (U) -98 -98 ] [ (V) -98 -98 ] [ (W) -98 -98 ] % 30-32 [ (X) -98 -98 ] [ (Y) -98 -98 ] [ (Z) -98 -98 ] % 33-35 [ (-) -98 -98 ] [ (.) -98 -98 ] % 36-37 - ] - >> - version (a) eq version (b) eq or {/normal} {/limited} ifelse get - /charmaps exch def + ] def +} ctxdef + + /charmaps version (a) eq version (b) eq or {charmapsnormal} {chapmapslimited} ifelse def % Invert charmaps to give character to value maps for each state /charvals [ @@ -10112,7 +13631,7 @@ begin 0 1 2 { /j exch def encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required - charvals j get exch i put + charvals j get exch i put } for } for /set0 charvals 0 get def @@ -10122,10 +13641,10 @@ begin raw {/encoding (raw) def} if encoding (raw) eq { - /cws barlen array def + /cws barcode length array def /i 0 def /j 0 def { % loop - i barlen eq {exit} if + i barcode length eq {exit} if /cw barcode i 1 add 3 getinterval cvi def cws j cw put /i i 4 add def @@ -10135,38 +13654,25 @@ begin /text () def } if - encoding (auto) eq { + encoding (auto) eq { + % Parse the input /fncvals << + /parse parse + /parsefnc parsefnc (FNC1) fn1 (FNC2) fn2 (FNC3) fn3 % (FNC4) fn4 Not user accessible as encoded automatically >> def - - % Convert input into bytes accounting for FNC characters - /msg barlen array def - /text barlen string def - /i 0 def /j 0 def { - i barlen eq {exit} if - /char barcode i get def - text j char put - parsefnc char 94 eq and i barlen 4 sub lt and { - barcode i 1 add get 94 ne { - /char fncvals barcode i 1 add 4 getinterval get def - text j ( ) putinterval - /i i 4 add def - } { - /i i 1 add def - } ifelse - } if - msg j char put - /i i 1 add def - /j j 1 add def - } loop - /msg msg 0 j getinterval def + /msg barcode fncvals //parseinput exec def /msglen msg length def - /text text 0 j getinterval def + + /text msglen string def + 0 1 msglen 1 sub { + /i exch def + text i msg i get dup 0 lt { pop 32 } if put + } for % Standard and extended ASCII runlength at position /numSA [ msglen {0} repeat 0 ] def @@ -10206,13 +13712,13 @@ begin /enc { exch get cws exch j exch put /j j 1 add def - } bind def + } def /cws msglen 2 mul array def /i 0 def /j 0 def /cset (set0) def { i msglen eq {exit} if - + { % common exit % Read next two characters @@ -10220,7 +13726,7 @@ begin /char2 i 1 add msglen lt {msg i 1 add get} {-99} ifelse def % If current mode is sufficient then directly encode - cset load char1 known { + cset load char1 known { char1 cset load enc /i i 1 add def exit @@ -10232,7 +13738,7 @@ begin char1 set2 enc /i i 1 add def exit - } if + } if % If char2 is also not in this set then latch else shift encode cset load char2 known not { @@ -10244,27 +13750,28 @@ begin /cset (set0) def } ifelse exit - } { + } { cset (set0) eq { sf1 cset load enc char1 set1 enc } { sf0 cset load enc char1 set0 enc - } ifelse + } ifelse /i i 1 add def exit } ifelse exit } loop - + } loop /cws cws 0 j getinterval def } if % auto encoding % Create an array containing the character mappings - << % ";"=11, "<"=12 +{ + /encmaps << % ";"=11, "<"=12 /a [ (141112) (131212) (121312) (111412) (131113) (121213) (111313) (121114) (111214) (111115) @@ -10309,16 +13816,19 @@ begin (131415) (121515) (141216) (131316) (121416) (131217) (121317) (121218) (141212) (1) ] - >> - version get /encs exch def + >> def +} ctxdef + encmaps version get /encs exch def +{ /c2w [ [ 495 330 210 126 70 35 15 5 ] [ 165 120 84 56 35 20 10 4 ] - [ 45 36 28 21 15 10 6 3 ] + [ 45 36 28 21 15 10 6 3 ] [ 9 8 7 6 5 4 3 2 ] [ 1 1 1 1 1 1 1 1 ] ] def +} ctxdef /v 0 def cws { /cw exch def @@ -10328,7 +13838,7 @@ begin } if /v v -1 bitshift def /cw cw -1 bitshift def - } repeat + } repeat } forall /v v checkoffset add def @@ -10336,7 +13846,7 @@ begin /v v 1023 and def v 824 gt v 853 lt and { /v v 292 add def - } if + } if } { /v v 1023 and 45 add def } ifelse @@ -10364,7 +13874,7 @@ begin } loop 20 0 1 4 {d exch get sub} for d exch 5 exch put - version (b) eq version (limitedb) eq or { + version (b) eq version (limitedb) eq or { /d [ d {1 add} forall ] def } if /cbs (111111111111) 12 string copy def @@ -10375,8 +13885,8 @@ begin % Concatenate the space bar successions /sbs cws length 6 mul 31 add string def - encs encs length 2 sub get dup - sbs exch 0 exch putinterval + encs encs length 2 sub get dup + sbs exch 0 exch putinterval length /j exch def 0 1 cws length 1 sub { /i exch def @@ -10403,9 +13913,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /posicode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -10414,16 +13928,19 @@ end % --END ENCODER posicode-- % --BEGIN ENCODER codablockf-- -% --REQUIRES preamble raiseerror renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- % --DESC: Codablock F % --EXAM: CODABLOCK F 34567890123456789010040digit % --EXOP: columns=8 % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp codablockf 0.0 2017040400 157635 163565 -%%BeginData: 520 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp codablockf 0.0 2022082100 134261 137478 +%%BeginData: 501 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /codablockf { @@ -10433,6 +13950,7 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def /rows -1 def /columns 8 def @@ -10457,41 +13975,42 @@ begin /rowheight rowheight cvi def /sepheight sepheight cvi def - columns 4 ge columns 62 le and - rows 2 ge rows 44 le and rows -1 eq or and {/c columns def} if + /c columns 4 ge columns 62 le and {columns} {8} ifelse def + /rows rows 2 ge rows 44 le and {rows} {-1} ifelse def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if + /codablockf //loadctx exec - /barlen barcode length def - - % Convert input into bytes accounting for FNC characters + % Convert input into bytes accounting for FNC characters /swa -1 def /swb -2 def /swc -3 def /sft -4 def /fn1 -5 def /fn2 -6 def /fn3 -7 def /fn4 -8 def /sta -9 def /stp -10 def + % Parse the input + /fncvals << + /parse parse + /parsefnc parsefnc + (FNC1) fn1 +% (FNC2) fn2 Not permitted for Codablock F + (FNC3) fn3 +% (FNC4) fn4 Not user accessible as encoded automatically + >> def + /msg barcode fncvals //parseinput exec def + /msglen msg length def + + % FNC4 codeword insertion for extended ASCII + /msgtmp [] def + msg { + /char exch def + /msgtmp [ msgtmp aload pop char 128 lt {char} {fn4 char 127 and} ifelse ] def + } forall + /msg msgtmp def + /msglen msg length def + % Character maps for each state +{ /charmaps [ % A B C A B C A B C - [ 32 32 (00) ] [ (!) (!) (01) ] [ (") (") (02) ] % 0-2 + [ 32 32 (00) ] [ (!) (!) (01) ] [ (") (") (02) ] % 0-2 [ (#) (#) (03) ] [ ($) ($) (04) ] [ (%) (%) (05) ] % 3-5 [ (&) (&) (06) ] [ (') (') (07) ] [ 40 40 (08) ] % 6-8 [ 41 41 (09) ] [ (*) (*) (10) ] [ (+) (+) (11) ] % 9-11 @@ -10527,7 +14046,7 @@ begin [ swc swc (99) ] [ swb fn4 swb ] [ fn4 swa swa ] % 99-101 [ fn1 fn1 fn1 ] [ sta sta sta ] [ stp stp stp ] % 102-104 ] def - + % Invert charmaps to give character to value maps for each state /charvals [ 105 dict 105 dict 105 dict ] def 0 1 charmaps length 1 sub { @@ -10536,46 +14055,13 @@ begin 0 1 2 { /j exch def encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required - charvals j get exch i put + charvals j get exch i put } for } for /seta charvals 0 get def /setb charvals 1 get def /setc charvals 2 get def - - /fncvals << - (FNC1) fn1 -% (FNC2) fn2 Not permitted for Codablock F - (FNC3) fn3 -% (FNC4) fn4 Not user accessible as encoded automatically - >> def - /msg barlen array def - /i 0 def /j 0 def { - i barlen eq {exit} if - /char barcode i get def - parsefnc char 94 eq and i barlen 4 sub lt and { - barcode i 1 add get 94 ne { - /char fncvals barcode i 1 add 4 getinterval get def - /i i 4 add def - } { - /i i 1 add def - } ifelse - } if - msg j char put - /i i 1 add def - /j j 1 add def - } loop - /msg msg 0 j getinterval def - /msglen msg length def - - % FNC4 codeword insertion for extended ASCII - /msgtmp [] def - msg { - /char exch def - /msgtmp [ msgtmp aload pop char 128 lt {char} {fn4 char 127 and} ifelse ] def - } forall - /msg msgtmp def - /msglen msg length def +} ctxdef % Determine digit runlength and characters from given position /numsscr { @@ -10593,17 +14079,17 @@ begin /p p 1 add def } loop n s - } bind def + } def % Encoding for each alphabet /enca { seta exch get cws exch j exch put /j j 1 add def - } bind def + } def /encb { setb exch get cws exch j exch put /j j 1 add def - } bind def + } def /encc { dup type /arraytype ne { setc exch get @@ -10612,11 +14098,11 @@ begin } ifelse cws exch j exch put /j j 1 add def - } bind def + } def % Character exclusively in either alphabet A or B - /anotb {dup seta exch known exch setb exch known not and} bind def - /bnota {dup setb exch known exch seta exch known not and} bind def + /anotb {dup seta exch known exch setb exch known not and} def + /bnota {dup setb exch known exch seta exch known not and} def % Pre-compute relative position of next anotb and next bnota characters /nextanotb [ msg length {0} repeat 9999 ] def @@ -10636,8 +14122,8 @@ begin } for % Does a-only come before b-only after given position and vice versa - /abeforeb {dup nextanotb exch get exch nextbnota exch get lt} bind def - /bbeforea {dup nextbnota exch get exch nextanotb exch get lt} bind def + /abeforeb {dup nextanotb exch get exch nextbnota exch get lt} def + /bbeforea {dup nextbnota exch get exch nextanotb exch get lt} def % Add padding to row /padrow { @@ -10648,14 +14134,14 @@ begin cset (setc) eq {swb encc /cset (setb) def exit} if } loop } repeat - } bind def + } def % Convert message to codewords - /cws c 5 add rows -1 ne {rows} {44} ifelse mul array def + /cws c 5 add 44 mul array def /i 0 def /j 0 def /r 1 def /lastrow false def { - + lastrow {exit} if % Add start character and code subset selector @@ -10672,11 +14158,11 @@ begin /cset (setc) def exit } if - i abeforeb { + i abeforeb { sft enca /cset (seta) def - exit - } if + exit + } if swb enca /cset (setb) def exit @@ -10688,14 +14174,15 @@ begin /rem c 3 add j c 5 add mod sub def % Codewords to end of row i msglen eq endofrow or {exit} if - + i numsscr /nums exch def /nchars exch def + /remnums nums rem 2 mul gt {rem 2 mul} {nums} ifelse def % Determine switches and shifts { % common exit - cset (seta) eq cset (setb) eq or nums 4 ge and + cset (seta) eq cset (setb) eq or remnums 4 ge and msg i get fn1 ne and { - nums 2 mod 0 eq + remnums 2 mod 0 eq rem 3 ge and { swc cset (seta) eq {enca} {encb} ifelse /cset (setc) def @@ -10710,7 +14197,7 @@ begin } repeat exit } if - nums 2 mod 0 ne + remnums 2 mod 0 ne rem 4 ge and { msg i get cset (seta) eq {enca} {encb} ifelse /i i 1 add def @@ -10728,10 +14215,10 @@ begin exit } if } if - cset (setb) eq msg i get anotb and - rem 2 ge and { + cset (setb) eq msg i get anotb and + rem 2 ge and { i msglen 1 sub lt { - i 1 add bbeforea { + i 1 add bbeforea { sft encb msg i get enca /i i 1 add def @@ -10760,7 +14247,7 @@ begin /i i 1 add def exit } if - cset (setc) eq nums 2 lt and + cset (setc) eq remnums 2 lt and rem 2 ge and { i abeforeb { swa encc @@ -10775,7 +14262,7 @@ begin /i i 1 add def exit } if - + % No switches or latches so try to encode cset (seta) eq seta msg i get known and rem 1 ge and { @@ -10789,14 +14276,14 @@ begin /i i 1 add def exit } if - cset (setc) eq nums 2 ge and + cset (setc) eq remnums 2 ge and rem 1 ge and { msg i get fn1 eq { fn1 encc /i i 1 add def } { msg i 2 getinterval encc - /i i 2 add def + /i i 2 add def } ifelse exit } if @@ -10810,7 +14297,7 @@ begin } loop % Determine whether this is the final row - r rows eq rows -1 eq or r 1 gt and i msglen eq and rem 2 ge and { + r rows ge rows -1 eq or r 1 gt and i msglen eq and rem 2 ge and { rem 2 sub padrow /j j 3 add def % Skip symbol and row checksum character positions stp enca @@ -10826,13 +14313,15 @@ begin /cws cws 0 j getinterval def % Maps for row indicators and symbol checksums +{ /abmap [ 64 1 95 {} for 0 1 15 {} for 26 1 63 {} for ] def /cmap [ 0 1 85 {} for ] def - +} ctxdef + % Add symbol check characters to last row /chkmsg msglen array def /j 0 def @@ -10872,6 +14361,7 @@ begin } for % Create an array containing the character mappings +{ /encs [ (212222) (222122) (222221) (121223) (121322) (131222) (122213) (122312) (132212) (221213) (221312) (231212) (112232) (122132) @@ -10889,6 +14379,7 @@ begin (412121) (111143) (111341) (131141) (114113) (114311) (411113) (411311) (113141) (114131) (311141) (411131) (211412) (2331112) ] def +} ctxdef % Derive the bits for each row /rowbits r array def @@ -10897,7 +14388,7 @@ begin /sbs [ cws i c 5 add mul c 5 add getinterval { encs exch get {48 sub} forall - } forall + } forall ] def mark 0 sbs {1 index 1 eq {{0}} {{1}} ifelse repeat} forall @@ -10921,7 +14412,7 @@ begin rowheight {rowbits r 1 sub get aload pop} repeat symwid sepheight mul {1} repeat ] def - + % Return the arguments << /ren //renmatrix @@ -10935,9 +14426,13 @@ begin dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /codablockf dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -10946,16 +14441,19 @@ end % --END ENCODER codablockf-- % --BEGIN ENCODER code16k-- -% --REQUIRES preamble raiseerror renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- % --DESC: Code 16K % --EXAM: Abcd-1234567890-wxyZ % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp code16k 0.0 2017040400 189660 202445 -%%BeginData: 744 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp code16k 0.0 2022082100 158983 161726 +%%BeginData: 725 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /code16k { @@ -10965,6 +14463,7 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def /mode -1 def /pos -1 def @@ -10993,42 +14492,22 @@ begin /rowheight rowheight cvi def /sepheight sepheight cvi def - pos -1 ne {/rows 16 def} if + /code16k //loadctx exec - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if - - /barlen barcode length def + pos -1 ne {/rows 16 def} if - % Convert input into bytes accounting for FNC characters - /swa -1 def /swb -2 def /swc -3 def - /sa1 -4 def /sb1 -5 def /sc1 -6 def - /sa2 -7 def /sb2 -8 def /sc2 -9 def + % Convert input into bytes accounting for FNC characters +{ + /swa -1 def /swb -2 def /swc -3 def + /sa1 -4 def /sb1 -5 def /sc1 -6 def + /sa2 -7 def /sb2 -8 def /sc2 -9 def /pad -10 def /sb3 -11 def /sc3 -12 def /fn1 -13 def /fn2 -14 def /fn3 -15 def /fn4 -16 def % Character maps for each state /charmaps [ % A B C A B C A B C - [ 32 32 (00) ] [ (!) (!) (01) ] [ (") (") (02) ] % 0-2 + [ 32 32 (00) ] [ (!) (!) (01) ] [ (") (") (02) ] % 0-2 [ (#) (#) (03) ] [ ($) ($) (04) ] [ (%) (%) (05) ] % 3-5 [ (&) (&) (06) ] [ (') (') (07) ] [ 40 40 (08) ] % 6-8 [ 41 41 (09) ] [ (*) (*) (10) ] [ (+) (+) (11) ] % 9-11 @@ -11064,8 +14543,8 @@ begin [ swc swc (99) ] [ swb fn4 swb ] [ fn4 swa swa ] % 99-101 [ fn1 fn1 fn1 ] [ pad pad pad ] [ sb2 sa2 sb1 ] % 102-104 [ sc2 sc2 sb2 ] [ sc3 sc3 sb3 ] % 105-106 - ] def - + ] def + % Invert charmaps to give character to value maps for each state /charvals [ 109 dict 109 dict 109 dict ] def 0 1 charmaps length 1 sub { @@ -11074,56 +14553,44 @@ begin 0 1 2 { /j exch def encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required - charvals j get exch i put + charvals j get exch i put } for } for /seta charvals 0 get def /setb charvals 1 get def /setc charvals 2 get def +} ctxdef raw {/encoding (raw) def} if encoding (raw) eq { - /cws barlen array def + /cws barcode length array def /i 0 def /j 0 def { % loop - i barlen eq {exit} if + i barcode length eq {exit} if /cw barcode i 1 add 3 getinterval cvi def cws j cw put /i i 4 add def /j j 1 add def } loop /cws cws 0 j getinterval def - /text () def } if - encoding (auto) eq { + encoding (auto) eq { + % Parse the input /fncvals << + /parse parse + /parsefnc parsefnc + /eci true (FNC1) fn1 (FNC2) fn2 (FNC3) fn3 % (FNC4) fn4 Not user accessible as encoded automatically >> def - /msg barlen array def - /i 0 def /j 0 def { - i barlen eq {exit} if - /char barcode i get def - parsefnc char 94 eq and i barlen 4 sub lt and { - barcode i 1 add get 94 ne { - /char fncvals barcode i 1 add 4 getinterval get def - /i i 4 add def - } { - /i i 1 add def - } ifelse - } if - msg j char put - /i i 1 add def - /j j 1 add def - } loop - /msg msg 0 j getinterval def + /msg barcode fncvals //parseinput exec def /msglen msg length def - + % Standard and extended ASCII runlength at position /numSA [ msglen {0} repeat 0 ] def /numEA [ msglen {0} repeat 0 ] def @@ -11157,7 +14624,7 @@ begin } for /msg msgtmp def /msglen msg length def - + % Determine digit runlength and characters from given position /numsscr { /n 0 def /s 0 def @@ -11174,17 +14641,17 @@ begin /p p 1 add def } loop n s - } bind def + } def % Encoding for each alphabet /enca { seta exch get cws exch j exch put /j j 1 add def - } bind def + } def /encb { setb exch get cws exch j exch put /j j 1 add def - } bind def + } def /encc { dup type /arraytype ne { setc exch get @@ -11193,11 +14660,11 @@ begin } ifelse cws exch j exch put /j j 1 add def - } bind def + } def % Character exclusively in either alphabet A or B - /anotb {dup seta exch known exch setb exch known not and} bind def - /bnota {dup setb exch known exch seta exch known not and} bind def + /anotb {dup seta exch known exch setb exch known not and} def + /bnota {dup setb exch known exch seta exch known not and} def % Pre-compute relative position of next anotb and next bnota characters /nextanotb [ msg length {0} repeat 9999 ] def @@ -11217,11 +14684,11 @@ begin } for % Does a-only come before b-only after given position and vice versa - /abeforeb {dup nextanotb exch get exch nextbnota exch get lt} bind def - /bbeforea {dup nextbnota exch get exch nextanotb exch get lt} bind def - + /abeforeb {dup nextanotb exch get exch nextbnota exch get lt} def + /bbeforea {dup nextbnota exch get exch nextanotb exch get lt} def + /cws barcode length 2 mul 3 add array def - + % Select mode and encode first characters /i 0 def /j 0 def { % common exit @@ -11229,7 +14696,7 @@ begin pos -1 ne { % encode one and two cws 0 pos 10 idiv 1 sub put - cws 1 pos 10 mod 1 sub put + cws 1 pos 10 mod 1 sub put /j 2 def /cset (setb) def /mode 7 def @@ -11281,7 +14748,7 @@ begin /i 1 def exit } if - % b . 3+ odd nums => c sb2 encode + % b . 3+ odd nums => c sb2 encode setb msg 0 get known 1 numsscr exch pop dup 3 ge exch 2 mod 1 eq and and { msg 0 get encb @@ -11317,9 +14784,9 @@ begin { % Encode remainder i msglen eq {exit} if - + i numsscr /nums exch def /nchars exch def - + % Determine switches and shifts { % common exit cset (seta) eq { @@ -11353,7 +14820,7 @@ begin } if % 4 nums . a => sc2 encode i msglen 4 sub lt { - nums 4 eq + nums 4 eq seta msg i 4 add get known and { sc2 enca 2 { @@ -11362,15 +14829,15 @@ begin /i i 1 add def } { msg i 2 getinterval encc - /i i 2 add def + /i i 2 add def } ifelse } repeat exit } if } if % 6 nums . a => sc3 encode - i msglen 6 sub lt { - nums 6 eq + i msglen 6 sub lt { + nums 6 eq seta msg i 6 add get known and { sc3 enca 3 { @@ -11409,7 +14876,7 @@ begin } if % anotb . anotb . bnota before anotb => sa2 encode i msglen 2 sub lt { - msg i get anotb + msg i get anotb msg i 1 add get anotb and i 2 add bbeforea and { sa2 encb @@ -11468,7 +14935,7 @@ begin % otherwise => encode msg i get encb /i i 1 add def - exit + exit } if cset (setc) eq { % 2+ nums => encode @@ -11530,7 +14997,7 @@ begin } if % b . b . b . 2+ even nums => sb3 encode i msglen 3 sub lt { - setb msg i get known + setb msg i get known setb msg i 1 add get known and setb msg i 2 add get known and i 3 add numsscr exch pop dup 2 ge exch 2 mod 0 eq and and { @@ -11539,7 +15006,7 @@ begin msg i 1 add get encb msg i 2 add get encb /i i 3 add def - exit + exit } if } if % anotb before bnota => swa @@ -11555,13 +15022,14 @@ begin } if exit } loop - + } loop /cws cws 0 j getinterval def } if % auto encoding - + % Basic metrics for the each symbol - % r dcws + % r dcws +{ /metrics [ [ 2 7 ] [ 3 12 ] @@ -11579,6 +15047,7 @@ begin [ 15 72 ] [ 16 77 ] ] def +} ctxdef % Select metrics of an appropriate symbol /urows rows def @@ -11601,13 +15070,14 @@ begin /cws [ r 2 sub 7 mul mode add cws aload pop ] def % Calculate the check characters - 0 0 1 dcws {dup 2 add exch cws exch get mul add} for + 0 0 1 dcws {dup 2 add exch cws exch get mul add} for 107 mod /c1 exch def - 0 0 1 dcws {dup 1 add exch cws exch get mul add} for + 0 0 1 dcws {dup 1 add exch cws exch get mul add} for c1 dcws 2 add mul add 107 mod /c2 exch def /cws [ cws aload pop c1 c2 ] def % Create an array containing the character mappings +{ /encs [ (212222) (222122) (222221) (121223) (121322) (131222) (122213) (122312) (132212) (221213) (221312) (231212) (112232) (122132) @@ -11628,7 +15098,7 @@ begin ] def % Start/stop character encodings - /startencs [ + /startencs [ (3211) (2221) (2122) (1411) (1132) (1231) (1114) (3112) (3211) (2221) (2122) (1411) (1132) (1231) (1114) (3112) ] def @@ -11640,12 +15110,14 @@ begin (2122) (1411) (1132) (1231) (1114) (3112) (1132) (1231) (1114) (3112) (3211) (2221) (2122) (1411) (3211) (2221) ] def +} ctxdef + pos -1 eq pos 10 idiv 2 mod 1 eq or { /stopencs stopencsodd def } { /stopencs stopencseven def } ifelse - + % Derive the bits for each row /rowbits r array def 0 1 r 1 sub { @@ -11656,7 +15128,7 @@ begin 1 cws i 5 mul 5 getinterval { encs exch get {48 sub} forall - } forall + } forall stopencs i get {48 sub} forall 1 ] def @@ -11677,7 +15149,7 @@ begin rowheight {rowbits r 1 sub get aload pop} repeat 81 sepheight mul {1} repeat ] def - + % Return the arguments << /ren //renmatrix @@ -11691,9 +15163,13 @@ begin dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /code16k dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -11702,16 +15178,19 @@ end % --END ENCODER code16k-- % --BEGIN ENCODER code49-- -% --REQUIRES preamble raiseerror renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- % --DESC: Code 49 % --EXAM: MULTIPLE ROWS IN CODE 49 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp code49 0.0 2017040400 291373 297357 -%%BeginData: 1076 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp code49 0.0 2022082100 261468 264326 +%%BeginData: 1063 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /code49 { @@ -11721,6 +15200,7 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def /mode -1 def /pos -1 def @@ -11747,55 +15227,24 @@ begin /rowheight rowheight cvi def /sepheight sepheight cvi def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if - - /barlen barcode length def + /code49 //loadctx exec - % Convert input into bytes accounting for FNC characters +{ /s1 -1 def /s2 -2 def /fn1 -3 def /fn2 -4 def /fn3 -5 def /ns -6 def +} ctxdef + + % Parse the input /fncvals << + /parse parse + /parsefnc parsefnc (FNC1) fn1 (FNC2) fn2 (FNC3) fn3 >> def - /msg barlen array def - /i 0 def /j 0 def { - i barlen eq {exit} if - /char barcode i get def - parsefnc char 94 eq and i barlen 4 sub lt and { - barcode i 1 add get 94 ne { - /char fncvals barcode i 1 add 4 getinterval get def - /i i 4 add def - } { - /i i 1 add def - } ifelse - } if - msg j char put - /i i 1 add def - /j j 1 add def - } loop - /msg msg 0 j getinterval def + /msg barcode fncvals //parseinput exec def /msglen msg length def +{ % Character encodings /charmap [ (0) (1) (2) (3) (4) (5) (6) (7) (8) (9) @@ -11809,9 +15258,9 @@ begin /charvals 49 dict def 0 1 48 { /i exch def - charmap i get + charmap i get dup type /stringtype eq {0 get} if % convert string to ASCII if required - charvals exch i put + charvals exch i put } for % Shifted character encodings @@ -11835,13 +15284,14 @@ begin charvals i [ charvals s2 get charvals c2 get ] put } if } for +} ctxdef /encodealpha { charvals exch get dup type /arraytype ne {1 array astore} if dup cws exch j exch putinterval length j add /j exch def - } bind def + } def /base48 { 0 exch {48 sub exch 10 mul add} forall @@ -11849,7 +15299,7 @@ begin [ exch dup length 1 sub -1 0 {1 index exch get exch} for pop ] dup cws exch j exch putinterval length j add /j exch def - } bind def + } def /encodenumeric { /nums exch def @@ -11864,7 +15314,7 @@ begin 3 [49 48 nums 0 4 getinterval aload pop] base48 2 nums 4 3 getinterval base48 } if - } bind def + } def % Pre-compute alphanumeric and numeric runlengths /numericruns [ msglen {0} repeat 0 ] def @@ -11893,20 +15343,23 @@ begin /cws msglen 2 mul 1 add array def /method (alpha) def /i -1 def /j -1 def +{ + /posval [ + 12 22 + 13 23 33 + 14 24 34 44 + 15 25 35 45 55 + 16 26 36 46 56 66 + 17 27 37 47 57 67 77 + 18 28 38 48 58 68 78 88 + 19 29 39 49 59 69 79 89 99 + ] def +} ctxdef + % Handle start for each mode - mode 0 eq mode 1 eq or {/method (alpha) def /i 0 def /j 0 def} if + mode 0 eq mode 1 eq or {/method (alpha) def /i 0 def /j 0 def} if mode 2 eq {/method (numeric) def /i 0 def /j 0 def} if mode 3 eq { - /posval [ - 12 22 - 13 23 33 - 14 24 34 44 - 15 25 35 45 55 - 16 26 36 46 56 66 - 17 27 37 47 57 67 77 - 18 28 38 48 58 68 78 88 - 19 29 39 49 59 69 79 89 99 - ] def cws 0 0 1 43 {dup posval exch get pos ne {pop} if} for 1 add put /method (alpha) def /i 0 def /j 1 def } if @@ -11944,7 +15397,8 @@ begin /cws cws 0 j getinterval def % Basic metrics for the each symbol - % r dcws + % r dcws +{ /metrics [ [ 2 9 ] [ 3 16 ] @@ -11954,6 +15408,7 @@ begin [ 7 42 ] [ 8 49 ] ] def +} ctxdef % Select metrics of an appropriate symbol /urows rows def @@ -11978,7 +15433,7 @@ begin 0 1 r 2 sub { /i exch def /cc cws j 7 getinterval def - ccs i 8 mul cc putinterval + ccs i 8 mul cc putinterval ccs i 8 mul 7 add 0 cc {add} forall 49 mod put /j j 7 add def } for @@ -11991,21 +15446,23 @@ begin ccs ccs length 2 sub cr7 put % Calculate the symbol check characters +{ [ 1 9 31 26 2 12 17 23 37 18 22 6 27 44 15 43 39 11 13 5 41 33 36 8 4 32 3 19 40 25 29 10 24 30 ] dup [ exch 20 exch 0 32 getinterval aload pop ] /weightx exch def dup [ exch 16 exch 1 32 getinterval aload pop ] /weighty exch def [ exch 38 exch 2 32 getinterval aload pop ] /weightz exch def +} ctxdef /calccheck { /weights exch def /score 0 def 0 1 r 1 sub 8 mul 2 idiv 1 sub { /i exch def - ccs i 2 mul get 49 mul ccs i 2 mul 1 add get add + ccs i 2 mul get 49 mul ccs i 2 mul 1 add get add weights i 1 add get mul /score exch score add def } for score - } bind def + } def /lastrow ccs ccs length 8 sub 8 getinterval def % wr1 check character @@ -12017,10 +15474,10 @@ begin /wr1 lastrow 0 get 49 mul lastrow 1 get add def % wr2 check character - cr7 weighty 0 get mul weighty calccheck add + cr7 weighty 0 get mul weighty calccheck add wr1 weighty r 4 mul 3 sub get mul add 2401 mod dup /wr2 exch def - dup 49 idiv exch 49 mod 2 array astore + dup 49 idiv exch 49 mod 2 array astore lastrow 2 3 -1 roll putinterval % wr3 check character @@ -12028,13 +15485,14 @@ begin wr1 weightx r 4 mul 3 sub get mul add wr2 weightx r 4 mul 2 sub get mul add 2401 mod - dup 49 idiv exch 49 mod 2 array astore + dup 49 idiv exch 49 mod 2 array astore lastrow 4 3 -1 roll putinterval % Place last row check character ccs ccs length 8 sub 7 getinterval 0 exch {add} forall 49 mod ccs ccs length 1 sub 3 -1 roll put +{ /patterns [ [ % Even parity (11521132) (25112131) (14212132) (25121221) (14221222) (12412132) (23321221) @@ -12730,6 +16188,7 @@ begin /parity [ (1001) (0101) (1100) (0011) (1010) (0110) (1111) (0000) ] def +} ctxdef % Derive the bits for each row /rowbits r array def @@ -12779,9 +16238,13 @@ begin dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /code49 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -12790,15 +16253,17 @@ end % --END ENCODER code49-- % --BEGIN ENCODER channelcode-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Channel Code % --EXAM: 3493 -% --EXOP: height=0.5 includetext +% --EXOP: height=0.5 includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp channelcode 0.0 2017040400 74649 74470 -%%BeginData: 149 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp channelcode 0.0 2022082100 132918 128171 +%%BeginData: 262 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -12809,12 +16274,13 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /shortfinder false def /includetext false def /includecheck false def /height 1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -12828,6 +16294,8 @@ begin /height height cvr def + /channelcode //loadctx exec + % Validate the input barcode length 2 lt barcode length 7 gt or { /bwipp.channelcodeBadLength (Channel Code must be 2 to 7 digits) //raiseerror exec @@ -12841,50 +16309,151 @@ begin /bwipp.channelcodeTooBig (The Channel Code value is too big for the number of channels) //raiseerror exec } if - /nextb { - dup - dup s exch get exch - dup b exch 1 sub get exch - dup s exch 1 sub get exch - b exch 2 sub get exch - add add add 4 gt {1} {2} ifelse - 1 index chan 2 add lt { - dup 1 4 index { - b 3 index 2 index put - 3 index exch sub 1 add 4 index 3 index 1 add nexts - } for - } { - dup 3 index le { - b 2 index 4 index put - value target eq { - /out [ - 3 1 10 {dup s exch get exch b exch get} for - ] 0 chan 2 mul getinterval def - } if - /value value 1 add def - } if - } ifelse - pop pop pop pop - } bind def - - /nexts { - dup chan 2 add lt {1} {1 index} ifelse 1 3 index { - s 2 index 2 index put - 2 index exch sub 1 add 3 index 2 index nextb - } for - pop pop pop - } bind def + % Tail-call optimisation FTW! + /loops1 { /s2max s1max 1 add s1 sub def /b1 1 def + s1 1 eq {nextb1} {loopb1} ifelse } def + /loopb1 { /b2max b1max 1 add b1 sub def /s2 1 def loops2 } def + /loops2 { /s3max s2max 1 add s2 sub def /b2 1 def + s1 b1 add s2 add 3 eq {nextb2} {loopb2} ifelse } def + /loopb2 { /b3max b2max 1 add b2 sub def /s3 1 def loops3 } def + /loops3 { /s4max s3max 1 add s3 sub def /b3 1 def + b1 s2 add b2 add s3 add 4 eq {nextb3} {loopb3} ifelse } def + /loopb3 { /b4max b3max 1 add b3 sub def /s4 1 def loops4 } def + /loops4 { /s5max s4max 1 add s4 sub def /b4 1 def + b2 s3 add b3 add s4 add 4 eq {nextb4} {loopb4} ifelse } def + /loopb4 { /b5max b4max 1 add b4 sub def /s5 1 def loops5 } def + /loops5 { /s6max s5max 1 add s5 sub def /b5 1 def + b3 s4 add b4 add s5 add 4 eq {nextb5} {loopb5} ifelse } def + /loopb5 { /b6max b5max 1 add b5 sub def /s6 1 def loops6 } def + /loops6 { /s7max s6max 1 add s6 sub def /b6 1 def + b4 s5 add b5 add s6 add 4 eq {nextb6} {loopb6} ifelse } def + /loopb6 { /b7max b6max 1 add b6 sub def /s7 1 def loops7 } def + /loops7 { /s8 s7max 1 add s7 sub def /b7 1 def + b5 s6 add b6 add s7 add 4 eq {nextb7} {loopb7} ifelse } def + /loopb7 { /b8 b7max 1 add b7 sub def + b6 s7 add b7 add s8 add b8 add 5 eq {nextb7} {chkchr} ifelse } def + /chkchr { + value target eq { + [s1 b1 s2 b2 s3 b3 s4 b4 s5 b5 s6 b6 s7 b7 s8 b8] exit + } if + /value value 1 add def + nextb7 + } def + /nextb7 { /b7 b7 1 add def b7 b7max le {loopb7} {nexts7} ifelse } def + /nexts7 { /s7 s7 1 add def s7 s7max le {loops7} {nextb6} ifelse } def + /nextb6 { /b6 b6 1 add def b6 b6max le {loopb6} {nexts6} ifelse } def + /nexts6 { /s6 s6 1 add def s6 s6max le {loops6} {nextb5} ifelse } def + /nextb5 { /b5 b5 1 add def b5 b5max le {loopb5} {nexts5} ifelse } def + /nexts5 { /s5 s5 1 add def s5 s5max le {loops5} {nextb4} ifelse } def + /nextb4 { /b4 b4 1 add def b4 b4max le {loopb4} {nexts4} ifelse } def + /nexts4 { /s4 s4 1 add def s4 s4max le {loops4} {nextb3} ifelse } def + /nextb3 { /b3 b3 1 add def b3 b3max le {loopb3} {nexts3} ifelse } def + /nexts3 { /s3 s3 1 add def s3 s3max le {loops3} {nextb2} ifelse } def + /nextb2 { /b2 b2 1 add def b2 b2max le {loopb2} {nexts2} ifelse } def + /nexts2 { /s2 s2 1 add def s2 s2max le {loops2} {nextb1} ifelse } def + /nextb1 { /b1 b1 1 add def b1 b1max le {loopb1} {nexts1} ifelse } def + /nexts1 { /s1 s1 1 add def s1 s1max le {loops1} if } def + +{ + /memo [ % Accelerate generation of bar patterns + [ % CH3 + [ 0 [1 1 1 1 1 2 1 2] [1 1 1 1 1 1 1 3] [1 1 1 1 1 3 2] [1 1 1 1 1 3 3] ] + ] + [ % CH4 + [ 0 [1 1 1 1 2 1 1 3] [1 1 1 1 1 1 1 4] [1 1 1 1 4 3 3] [1 1 1 1 4 4 4] ] + ] + [ % CH5 + [ 0 [1 1 1 2 1 1 2 3] [1 1 1 1 1 1 1 5] [1 1 1 5 4 4 4] [1 1 1 5 5 5 5] ] + ] + [ % CH6 + [ 0 [1 1 2 1 1 2 1 4] [1 1 1 1 1 1 1 6] [1 1 6 5 5 5 4] [1 1 6 6 6 6 6] ] + ] + [ % CH7 + [ 0 [1 2 1 1 2 1 1 5] [1 1 1 1 1 1 1 7] [1 7 6 6 6 5 5] [1 7 7 7 7 7 7] ] + [ 150000 [1 3 1 1 2 4 1 1] [1 1 3 1 2 3 2 1] [1 7 5 5 5 4 1] [1 7 7 5 5 4 2] ] + [ 300000 [1 1 4 2 1 1 1 3] [1 2 4 1 1 1 2 2] [1 7 7 4 3 3 3] [1 7 6 3 3 3 3] ] + [ 450000 [1 1 4 1 1 4 1 1] [1 3 2 1 2 1 2 2] [1 7 7 4 4 4 1] [1 7 5 4 4 3 3] ] + ] + [ % CH8 + [ 0 [2 1 1 2 1 1 2 5] [1 1 1 1 1 1 1 8] [8 7 7 7 6 6 6] [8 8 8 8 8 8 8] ] + [ 150000 [2 1 1 2 1 1 5 2] [1 1 2 1 5 2 1 2] [8 7 7 7 6 6 6] [8 8 8 7 7 3 2] ] + [ 300000 [2 1 1 4 2 2 2 1] [1 1 4 2 1 2 1 3] [8 7 7 7 4 3 2] [8 8 8 5 4 4 3] ] + [ 450000 [2 2 2 1 1 3 1 3] [1 1 2 1 1 2 4 3] [8 7 6 5 5 5 3] [8 8 8 7 7 7 6] ] + [ 600000 [2 3 1 1 4 2 1 1] [1 1 3 1 3 1 2 3] [8 7 5 5 5 2 1] [8 8 8 6 6 4 4] ] + [ 750000 [2 1 3 1 2 3 2 1] [1 2 1 1 3 4 1 2] [8 7 7 5 5 4 2] [8 8 7 7 7 5 2] ] + [ 900000 [2 2 1 4 1 2 2 1] [1 2 1 2 1 5 1 2] [8 7 6 6 3 3 2] [8 8 7 7 6 6 2] ] + [ 1050000 [2 4 1 1 1 2 2 2] [1 2 1 2 1 3 1 4] [8 7 4 4 4 4 3] [8 8 7 7 6 6 4] ] + [ 1200000 [2 2 1 5 2 1 1 1] [1 3 1 3 2 1 1 3] [8 7 6 6 2 1 1] [8 8 6 6 4 3 3] ] + [ 1350000 [2 2 1 3 3 1 1 2] [1 4 1 2 1 1 4 1] [8 7 6 6 4 2 2] [8 8 5 5 4 4 4] ] + [ 1500000 [3 1 2 2 2 1 1 3] [1 1 1 1 2 2 4 3] [8 6 6 5 4 3 3] [8 8 8 8 8 7 6] ] + [ 1650000 [3 2 1 2 3 1 2 1] [1 1 1 1 3 2 4 2] [8 6 5 5 4 2 2] [8 8 8 8 8 6 5] ] + [ 1800000 [3 1 1 3 2 3 1 1] [1 2 1 1 3 4 2 1] [8 6 6 6 4 3 1] [8 8 7 7 7 5 2] ] + [ 1950000 [3 2 1 2 1 2 2 2] [1 2 4 1 2 2 1 2] [8 6 5 5 4 4 3] [8 8 7 4 4 3 2] ] + [ 2100000 [3 1 2 1 4 2 1 1] [1 4 1 2 1 1 2 3] [8 6 6 5 5 2 1] [8 8 5 5 4 4 4] ] + [ 2250000 [4 1 1 4 1 1 2 1] [1 1 4 2 1 1 1 4] [8 5 5 5 2 2 2] [8 8 8 5 4 4 4] ] + [ 2400000 [4 3 1 2 1 2 1 1] [1 2 4 2 2 2 1 1] [8 5 3 3 2 2 1] [8 8 7 4 3 2 1] ] + [ 2550000 [5 1 1 1 1 1 3 2] [1 2 2 4 3 1 1 1] [8 4 4 4 4 4 4] [8 8 7 6 3 1 1] ] + [ 2700000 [1 1 3 6 1 1 1 1] [2 1 1 2 1 1 6 1] [8 8 8 6 1 1 1] [8 7 7 7 6 6 6] ] + [ 2850000 [1 1 1 2 2 3 2 3] [2 1 3 3 2 1 1 2] [8 8 8 8 7 6 4] [8 7 7 5 3 2 2] ] + [ 3000000 [1 2 3 3 3 1 1 1] [2 1 1 1 5 1 2 2] [8 8 7 5 3 1 1] [8 7 7 7 7 3 3] ] + [ 3150000 [1 3 1 2 2 2 3 1] [2 1 1 3 2 1 3 2] [8 8 6 6 5 4 3] [8 7 7 7 5 4 4] ] + [ 3300000 [1 5 1 1 3 1 1 2] [2 1 1 4 3 2 1 1] [8 8 4 4 4 2 2] [8 7 7 7 4 2 1] ] + [ 3450000 [1 1 2 2 2 5 1 1] [2 2 2 2 3 1 1 2] [8 8 8 7 6 5 1] [8 7 6 5 4 2 2] ] + [ 3600000 [1 2 1 1 3 4 2 1] [2 2 3 1 1 1 2 3] [8 8 7 7 7 5 2] [8 7 6 4 4 4 4] ] + [ 3750000 [1 1 2 1 1 5 3 1] [2 3 1 1 4 1 2 1] [8 8 8 7 7 7 3] [8 7 5 5 5 2 2] ] + [ 3900000 [1 3 1 2 4 2 1 1] [2 3 3 1 1 1 2 2] [8 8 6 6 5 2 1] [8 7 5 3 3 3 3] ] + [ 4050000 [1 3 1 2 3 1 2 2] [2 6 2 1 1 1 1 1] [8 8 6 6 5 3 3] [8 7 2 1 1 1 1] ] + [ 4200000 [2 1 1 2 1 2 2 4] [2 1 3 1 3 3 1 1] [8 7 7 7 6 6 5] [8 7 7 5 5 3 1] ] + [ 4350000 [2 2 1 4 1 2 2 1] [2 1 4 1 3 1 2 1] [8 7 6 6 3 3 2] [8 7 7 4 4 2 2] ] + [ 4500000 [2 1 1 1 2 1 3 4] [2 2 2 1 2 1 3 2] [8 7 7 7 7 6 6] [8 7 6 5 5 4 4] ] + [ 4650000 [2 4 2 1 2 2 1 1] [2 2 2 1 2 1 2 3] [8 7 4 3 3 2 1] [8 7 6 5 5 4 4] ] + [ 4800000 [2 3 2 1 1 2 2 2] [2 4 1 2 1 1 3 1] [8 7 5 4 4 4 3] [8 7 4 4 3 3 3] ] + [ 4950000 [3 2 2 1 2 1 1 3] [2 1 1 2 1 1 1 6] [8 6 5 4 4 3 3] [8 7 7 7 6 6 6] ] + [ 5100000 [3 2 1 1 1 3 3 1] [2 2 3 2 1 1 3 1] [8 6 5 5 5 5 3] [8 7 6 4 3 3 3] ] + [ 5250000 [4 1 2 1 2 2 1 2] [2 1 4 1 2 1 1 3] [8 5 5 4 4 3 2] [8 7 7 4 4 3 3] ] + [ 5400000 [5 1 2 1 2 1 1 2] [2 2 1 1 4 1 3 1] [8 4 4 3 3 2 2] [8 7 6 6 6 3 3] ] + [ 5550000 [1 1 4 4 1 2 1 1] [3 1 2 1 1 3 2 2] [8 8 8 5 2 2 1] [8 6 6 5 5 5 3] ] + [ 5700000 [1 2 1 1 2 1 3 4] [3 1 4 1 2 2 1 1] [8 8 7 7 7 6 6] [8 6 6 3 3 2 1] ] + [ 5850000 [1 1 3 3 2 2 2 1] [3 2 1 1 2 1 4 1] [8 8 8 6 4 3 2] [8 6 5 5 5 4 4] ] + [ 6000000 [1 4 3 1 1 2 1 2] [3 2 2 1 2 2 1 2] [8 8 5 3 3 3 2] [8 6 5 4 4 3 2] ] + [ 6150000 [2 1 1 4 1 2 1 3] [3 1 1 2 1 2 1 4] [8 7 7 7 4 4 3] [8 6 6 6 5 5 4] ] + [ 6300000 [2 2 2 1 3 2 2 1] [3 1 4 1 3 1 1 1] [8 7 6 5 5 3 2] [8 6 6 3 3 1 1] ] + [ 6450000 [2 5 1 3 1 1 1 1] [3 2 1 1 2 3 1 2] [8 7 3 3 1 1 1] [8 6 5 5 5 4 2] ] + [ 6600000 [3 2 3 1 2 1 2 1] [3 1 3 2 2 1 1 2] [8 6 5 3 3 2 2] [8 6 6 4 3 2 2] ] + [ 6750000 [4 1 2 2 1 1 3 1] [3 2 1 3 1 1 3 1] [8 5 5 4 3 3 3] [8 6 5 5 3 3 3] ] + [ 6900000 [1 2 1 4 2 2 2 1] [4 1 1 2 2 2 2 1] [8 8 7 7 4 3 2] [8 5 5 5 4 3 2] ] + [ 7050000 [1 2 5 2 1 2 1 1] [4 2 1 3 2 1 1 1] [8 8 7 3 2 2 1] [8 5 4 4 2 1 1] ] + [ 7200000 [2 2 2 1 3 1 3 1] [4 1 3 1 3 1 1 1] [8 7 6 5 5 3 3] [8 5 5 3 3 1 1] ] + [ 7350000 [3 1 4 2 1 1 1 2] [4 2 2 1 1 1 2 2] [8 6 6 3 2 2 2] [8 5 4 3 3 3 3] ] + [ 7500000 [1 1 1 4 1 1 3 3] [5 2 1 2 2 1 1 1] [8 8 8 8 5 5 5] [8 4 3 3 2 1 1] ] + [ 7650000 [5 2 1 2 1 2 1 1] [5 2 2 1 1 2 1 1] [8 4 3 3 2 2 1] [8 4 3 2 2 2 1] ] + ] + ] def +} ctxdef /encode { /chan exch def /target exch def - /value 0 def - /out -1 def - /b [ 1 1 1 0 0 0 0 0 0 0 0 ] def - /s [ 0 1 1 0 0 0 0 0 0 0 0 ] def - chan dup 3 nexts - out - } bind def + + % Lookup memoized starting value close to the target + memo chan 3 sub get { + /m exch def + m 0 get target gt {exit} if + /mv m 0 get def + /mb m 1 get def + /ms m 2 get def + /mbmax m 3 get def + /msmax m 4 get def + } forall + /value mv def + mb aload pop [/b8 /b7 /b6 /b5 /b4 /b3 /b2 /b1] {exch def} forall + ms aload pop [/s8 /s7 /s6 /s5 /s4 /s3 /s2 /s1] {exch def} forall + mbmax aload pop [/b7max /b6max /b5max /b4max /b3max /b2max /b1max] {exch def} forall + msmax aload pop [/s7max /s6max /s5max /s4max /s3max /s2max /s1max] {exch def} forall + + 1 {chkchr} repeat 8 chan sub 2 mul dup 16 exch sub getinterval + + } def /barlen barcode length def @@ -12895,17 +16464,20 @@ begin /data barcode cvi barlen 1 add encode def % Determine check data - /check [] def - includecheck { - /mod23 [ +{ + /mod23map [ [] [] [ 13 12 4 9 3 1 ] - [ 13 2 12 3 18 16 4 1 ] + [ 8 2 12 3 18 16 4 1 ] [ 11 16 17 8 20 4 10 2 5 1 ] [ 1 4 16 18 3 12 2 8 9 13 6 1 ] - [ 20 16 22 13 15 12 5 4 8 9 21 3 7 1 ] + [ 20 16 22 13 15 12 5 4 17 9 21 3 7 1 ] [ 2 6 18 8 1 3 9 4 12 13 16 2 6 18 8 1 ] - ] barlen get def + ] def +} ctxdef + /check [] def + includecheck { + /mod23 mod23map barlen get def 0 0 1 data length 1 sub { dup data exch get 1 sub exch mod23 exch get mul add @@ -12940,9 +16512,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /channelcode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -12951,15 +16527,17 @@ end % --END ENCODER channelcode-- % --BEGIN ENCODER flattermarken-- -% --REQUIRES preamble raiseerror renlinear-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear-- % --DESC: Flattermarken % --EXAM: 11099 % --EXOP: inkspread=-0.25 showborder borderleft=0 borderright=0 % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp flattermarken 0.0 2017040400 63805 60185 -%%BeginData: 93 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp flattermarken 0.0 2022082100 63195 59686 +%%BeginData: 104 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -12970,9 +16548,10 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /includetext false def % Enable/disable text - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /height 0.3 def @@ -13000,6 +16579,8 @@ begin /textyoffset textyoffset cvr def /height height cvr def + /flattermarken //loadctx exec + % Validate the input barcode { dup 48 lt exch 57 gt or { @@ -13007,6 +16588,7 @@ begin } if } forall +{ % Create an array containing the character mappings /encs [ (0018) (0117) (0216) (0315) (0414) (0513) (0612) (0711) (0810) @@ -13015,6 +16597,7 @@ begin % Create a string of the available characters /barchars (1234567890) def +} ctxdef /barlen barcode length def % Length of the code @@ -13045,9 +16628,13 @@ begin dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /flattermarken dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -13061,10 +16648,10 @@ end % --EXAM: 331132131313411122131311333213114131131221323 % --EXOP: height=0.5 % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp raw 0.0 2017040400 58495 55088 -%%BeginData: 52 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp raw 0.0 2022082100 49590 49483 +%%BeginData: 55 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -13075,6 +16662,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /height 1 def @@ -13111,7 +16699,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /raw dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -13125,10 +16715,10 @@ end % --EXAM: FATDAFTDAD % --EXOP: % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp daft 0.0 2017040400 62389 58827 -%%BeginData: 76 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp daft 0.0 2022082100 52828 52694 +%%BeginData: 79 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -13139,6 +16729,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /height 0.175 def @@ -13199,7 +16790,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /daft dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -13213,10 +16806,10 @@ end % --EXAM: fima % --EXOP: backgroundcolor=DD000011 % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp symbol 0.0 2017040400 61969 58378 -%%BeginData: 72 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp symbol 0.0 2022082100 53420 53349 +%%BeginData: 80 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put begin @@ -13227,6 +16820,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def % Parse the input options @@ -13261,15 +16855,20 @@ begin /bhs [.625 .625 .625 .625 .625 .625 .625] def /bbs [0 0 0 0 0 0 0] def } bind + /fime { + /sbs [2.25 6.75 2.25 15.75 2.25 6.75 2.25] def + /bhs [.625 .625 .625 .625 .625 .625 .625] def + /bbs [0 0 0 0 0 0 0] def + } bind >> def - % Valiate input + % Valiate input symbols barcode known not { - /bwipp.symbolUnknownSymbol (Unknown symbol name provided) //raiseerror exec + /bwipp.symbolUnknownSymbol (Unknown symbol name provided) //raiseerror exec } if symbols barcode get exec - + % Return the arguments << /ren //renlinear @@ -13283,7 +16882,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /symbol dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -13292,16 +16893,19 @@ end % --END ENCODER symbol-- % --BEGIN ENCODER pdf417-- -% --REQUIRES preamble raiseerror renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- % --DESC: PDF417 % --EXAM: This is PDF417 % --EXOP: columns=2 % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp pdf417 0.0 2017040400 225385 234487 -%%BeginData: 873 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp pdf417 0.0 2022082100 202024 204168 +%%BeginData: 911 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /pdf417 { @@ -13311,6 +16915,7 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def /compact false def /eclevel -1 def @@ -13321,6 +16926,7 @@ begin /ccc false def /raw false def /parse false def + /parsefnc false def % Parse the input options options type /stringtype eq { @@ -13338,26 +16944,98 @@ begin /rows rows cvi def /rowmult rowmult cvr def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if + /pdf417 //loadctx exec + +{ + % Modes and text submodes + /T 0 def /N 1 def /B 2 def + /A 0 def /L 1 def /M 2 def /P 3 def + + % Special function characters for mode switching + /tl -1 def /nl -2 def /bl -3 def /bl6 -4 def /bs -5 def + + % Special function characters for text mode + /al -6 def /ll -7 def /ml -8 def /pl -9 def /as -10 def /ps -11 def + + % Character maps for each state + /charmaps [ + % A L M P + [ (A) (a) (0) (;) ] % 0 + [ (B) (b) (1) (<) ] % 1 + [ (C) (c) (2) (>) ] % 2 + [ (D) (d) (3) (@) ] % 3 + [ (E) (e) (4) ([) ] % 4 + [ (F) (f) (5) 92 ] % 5 + [ (G) (g) (6) (]) ] % 6 + [ (H) (h) (7) (_) ] % 7 + [ (I) (i) (8) (`) ] % 8 + [ (J) (j) (9) (~) ] % 9 + [ (K) (k) (&) (!) ] % 10 + [ (L) (l) 13 13 ] % 11 + [ (M) (m) 9 9 ] % 12 + [ (N) (n) (,) (,) ] % 13 + [ (O) (o) (:) (:) ] % 14 + [ (P) (p) (#) 10 ] % 15 + [ (Q) (q) (-) (-) ] % 16 + [ (R) (r) (.) (.) ] % 17 + [ (S) (s) ($) ($) ] % 18 + [ (T) (t) (/) (/) ] % 19 + [ (U) (u) (+) (") ] % 20 + [ (V) (v) (%) (|) ] % 21 + [ (W) (w) (*) (*) ] % 22 + [ (X) (x) (=) 40 ] % 23 + [ (Y) (y) (^) 41 ] % 24 + [ (Z) (z) pl (?) ] % 25 + [ ( ) ( ) ( ) ({) ] % 26 + [ ll as ll (}) ] % 27 + [ ml ml al (') ] % 28 + [ ps ps ps al ] % 29 + ] def + + % Invert charmaps to give character to value maps for each state + /charvals [ 30 dict 30 dict 30 dict 30 dict ] def + /alltext 104 dict def + 0 1 charmaps length 1 sub { + /i exch def + /encs charmaps i get def + 0 1 3 { + /j exch def + encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required + dup charvals j get exch i put + alltext exch -1 put + } for + } for + + /e 10000 def % "Empty" + + /latlen [ % Bit length of latch between submodes + % To: A L M P From + [ 0 1 1 2 ] % A + [ 2 0 1 2 ] % L + [ 1 1 0 1 ] % M + [ 1 2 2 0 ] % P + ] def + + /latseq [ % Latch sequences between submodes + % To: A L M P From + [ [] [ll] [ml] [ml pl] ] % A + [ [ml al] [] [ml] [ml pl] ] % L + [ [al] [ll] [] [pl] ] % M + [ [al] [al ll] [al ml] [] ] % P + ] def + + /shftlen [ % Bit length of shift to submode + % To: A L M P From + [ e e e 1 ] % A + [ 1 e e 1 ] % L + [ e e e 1 ] % M + [ e e e e ] % P + ] def + + /latchcws << + tl 900 bl 901 bl6 924 nl 902 bs 913 + >> def +} ctxdef raw {/encoding (raw) def} if @@ -13375,9 +17053,6 @@ begin /datcws datcws 0 j getinterval def } if - /barcode [ barcode {} forall ] def - /barlen barcode length def - ccc {/encoding (ccc) def} if /encb { @@ -13414,130 +17089,67 @@ begin putinterval } if out - } bind def - + } def + encoding (byte) eq encoding (ccc) eq or { + /barlen barcode length def /datcws barlen 6 idiv 5 mul barlen 6 mod add 1 add array def datcws 0 barlen 6 mod 0 eq {924} {901} ifelse put - datcws 1 barcode encb putinterval + datcws 1 [ barcode {} forall ] encb putinterval encoding (ccc) eq {/datcws [920 datcws aload pop] def} if } if encoding (auto) eq { - % Modes and text submodes - /T 0 def /N 1 def /B 2 def - /A 0 def /L 1 def /M 2 def /P 3 def - - % Special function characters for mode switching - /tl -1 def /nl -2 def /bl -3 def /bl6 -4 def /bs -5 def - - % Special function characters for text mode - /al -6 def /ll -7 def /ml -8 def /pl -9 def /as -10 def /ps -11 def - - % Character maps for each state - /charmaps [ - % A L M P - [ (A) (a) (0) (;) ] % 0 - [ (B) (b) (1) (<) ] % 1 - [ (C) (c) (2) (>) ] % 2 - [ (D) (d) (3) (@) ] % 3 - [ (E) (e) (4) ([) ] % 4 - [ (F) (f) (5) 92 ] % 5 - [ (G) (g) (6) (]) ] % 6 - [ (H) (h) (7) (_) ] % 7 - [ (I) (i) (8) (`) ] % 8 - [ (J) (j) (9) (~) ] % 9 - [ (K) (k) (&) (!) ] % 10 - [ (L) (l) 13 13 ] % 11 - [ (M) (m) 9 9 ] % 12 - [ (N) (n) (,) (,) ] % 13 - [ (O) (o) (:) (:) ] % 14 - [ (P) (p) (#) 10 ] % 15 - [ (Q) (q) (-) (-) ] % 16 - [ (R) (r) (.) (.) ] % 17 - [ (S) (s) ($) ($) ] % 18 - [ (T) (t) (/) (/) ] % 19 - [ (U) (u) (+) (") ] % 20 - [ (V) (v) (%) (|) ] % 21 - [ (W) (w) (*) (*) ] % 22 - [ (X) (x) (=) 40 ] % 23 - [ (Y) (y) (^) 41 ] % 24 - [ (Z) (z) pl (?) ] % 25 - [ ( ) ( ) ( ) ({) ] % 26 - [ ll as ll (}) ] % 27 - [ ml ml al (') ] % 28 - [ ps ps ps al ] % 29 - ] def - - % Invert charmaps to give character to value maps for each state - /charvals [ 30 dict 30 dict 30 dict 30 dict ] def - /alltext 104 dict def - 0 1 charmaps length 1 sub { - /i exch def - /encs charmaps i get def - 0 1 3 { - /j exch def - encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required - dup charvals j get exch i put - alltext exch -1 put - } for - } for - - /e 10000 def % "Empty" - - /latlen [ % Bit length of latch between submodes - % To: A L M P From - [ 0 1 1 2 ] % A - [ 2 0 1 2 ] % L - [ 1 1 0 1 ] % M - [ 1 2 2 0 ] % P - ] def - - /latseq [ % Latch sequences between submodes - % To: A L M P From - [ [] [ll] [ml] [ml pl] ] % A - [ [ml al] [] [ml] [ml pl] ] % L - [ [al] [ll] [] [pl] ] % M - [ [al] [al ll] [al ml] [] ] % P - ] def - - /shftlen [ % Bit length of shift to submode - % To: A L M P From - [ e e e 1 ] % A - [ 1 e e 1 ] % L - [ e e e 1 ] % M - [ e e e e ] % P - ] def - + % Parse the input + /fncvals << + /parse parse + /parsefnc parsefnc + /eci true + % Predates FNC non-data codewords, but supports ECI + >> def + /msg barcode fncvals //parseinput exec def + /msglen msg length def + % Determine runlengths of digits - /numdigits [ barlen {0} repeat 0 ] def - /numtext [ barlen {0} repeat 0 ] def - /numbytes [ barlen {0} repeat 0 ] def - barlen 1 sub -1 0 { + /numdigits [ msglen {0} repeat 0 ] def + /numtext [ msglen {0} repeat 0 ] def + /numbytes [ msglen {0} repeat 0 ] def + /iseci [ msglen {0} repeat 0 ] def + msglen 1 sub -1 0 { /i exch def - barcode i get dup 48 ge exch 57 le and { + msg i get dup 48 ge exch 57 le and { numdigits i numdigits i 1 add get 1 add put } if - alltext barcode i get known numdigits i get 13 lt and { + alltext msg i get known numdigits i get 13 lt and { numtext i numtext i 1 add get 1 add put } if - numtext i get 5 lt numdigits i get 13 lt and { + msg i get 0 ge numtext i get 5 lt and numdigits i get 13 lt and { numbytes i numbytes i 1 add get 1 add put } if + iseci i msg i get -1000000 le put } for - /numdigits numdigits 0 barlen getinterval def - /numtext numtext 0 barlen getinterval def - /numbytes numbytes 0 barlen getinterval def - + /numdigits numdigits 0 msglen getinterval def + /numtext numtext 0 msglen getinterval def + /numbytes numbytes 0 msglen getinterval def + /seq [] def /seqlen 0 def /state T def /p 0 def { % loop - p barlen eq {exit} if + p msglen eq {exit} if + iseci p get { + /eci msg p get def + /seq [ + seq aload pop + [ eci ] + ] def + /p p 1 add def + /seqlen seqlen eci -1810900 le {2} {eci -1000900 le {3} {2} ifelse} ifelse add def + } { /n numdigits p get def n 13 ge { /seq [ seq aload pop nl - [ barcode p n getinterval aload pop ] + [ msg p n getinterval aload pop ] ] def /state N def /p p n add def @@ -13547,8 +17159,10 @@ begin t 5 ge { /seq [ seq aload pop - state T ne {tl} if - [ barcode p t getinterval aload pop ] + state T ne { + tl + } if + [ msg p t getinterval aload pop ] ] def /state T def /p p t add def @@ -13559,7 +17173,7 @@ begin /seq [ seq aload pop bs - [ barcode p get ] + [ msg p get ] ] def /p p b add def /seqlen seqlen 2 add def @@ -13567,43 +17181,38 @@ begin /seq [ seq aload pop b 6 mod 0 ne {bl} {bl6} ifelse - [ barcode p b getinterval aload pop ] + [ msg p b getinterval aload pop ] ] def /state B def /p p b add def /seqlen seqlen 1 add b add def - } ifelse } ifelse } ifelse + } ifelse } ifelse } ifelse } ifelse } loop - - /latchcws << - tl 900 bl 901 bl6 924 nl 902 bs 913 - >> def - + % Submode encoding functions - /enca {charvals A get exch get} bind def - /encl {charvals L get exch get} bind def - /encm {charvals M get exch get} bind def - /encp {charvals P get exch get} bind def + /enca {charvals A get exch get} def + /encl {charvals L get exch get} def + /encm {charvals M get exch get} def + /encp {charvals P get exch get} def /textencfuncs [ /enca /encl /encm /encp ] def - + /addtotext { text exch l exch put /l l 1 add def - } bind def - + } def + /enct { - /in exch def - + /curlen [ e e e e ] def curlen submode 0 put /curseq [ [] [] [] [] ] def - + % Derive the optimal sequences ending in each submode in { - + /char exch def - + % Check for optimisations in the current sequences by latching from x to y { % loop /imp false def @@ -13624,25 +17233,25 @@ begin } forall imp not {exit} if % Repeat unless no improvement } loop - + % Determine optimal next sequences for each valid encoding /nxtlen [ e e e e ] def /nxtseq 4 array def - + [ A L M P ] { /x exch def - + { % loop for common exit - + charvals x get char known not {exit} if - + % Extend directly /cost curlen x get 1 add def cost nxtlen x get lt { nxtlen x cost put nxtseq x [ curseq x get aload pop char ] put } if - + % Optimise for direct shifts from y to x [ A L M P ] { /y exch def @@ -13658,17 +17267,17 @@ begin } if } if } forall - + exit } loop - + } forall - + /curlen nxtlen def /curseq nxtseq def - + } forall - + % Select the optimal sequence /minseq e def [ A L M P ] { @@ -13678,31 +17287,31 @@ begin /txtseq curseq k get def } if } forall - + % Encode the sequence /text minseq array def /k 0 def /l 0 def { k txtseq length ge {exit} if - + /char txtseq k get def - + % Encode character char textencfuncs submode get load exec addtotext /k k 1 add def - + % Encode shifted next character char as eq char ps eq or { txtseq k get char as eq {enca} {encp} ifelse addtotext /k k 1 add def } if - + % Latches to new submode char al eq {/submode A def} if char ll eq {/submode L def} if char ml eq {/submode M def} if char pl eq {/submode P def} if } loop - + text length 2 mod 1 eq { submode P eq { /pad al encp def @@ -13712,17 +17321,17 @@ begin } ifelse /text [ text aload pop pad ] def } if - + /out text length 2 idiv array def 0 1 out length 1 sub { /k exch def out k text k 2 mul get 30 mul text k 2 mul 1 add get add put } for - + out - - } bind def - + + } def + /encn { /in exch def /out [] def @@ -13755,23 +17364,40 @@ begin /out [ out aload pop cwn aload pop ] def } for out - } bind def - + } def + + /ence { + 0 get neg 1000000 sub + dup 000899 le { % ECI 000000 - 000899 + 927 exch 2 array astore + } { dup 810899 le { % ECI 000900 - 810899 + 926 exch dup 900 idiv 1 sub exch 900 mod 3 array astore + } { dup 811799 le { % ECI 810900 - 811799 + 925 exch 810900 sub 2 array astore + } { + /bwipp.pdf417badECI (PDF417 supports ECIs 000000 to 811799) //raiseerror exec + } ifelse } ifelse } ifelse + } def + /encfuncs [ /enct /encn /encb ] def - + /addtocws { dup datcws j 3 -1 roll putinterval length j add /j exch def - } bind def - + } def + % Encode the sequence /state T def /submode A def /datcws seqlen array def /i 0 def /j 0 def { i seq length ge {exit} if /chars seq i get def - chars type /arraytype eq { % Encode data according to mode - chars encfuncs state get load exec addtocws + chars type /arraytype eq { + chars 0 get -1000000 le { % ECI + chars ence addtocws + } { % Encode data according to mode + chars encfuncs state get load exec addtocws + } ifelse } { % Encode the latch to new state or byte shift [ latchcws chars get ] addtocws chars tl eq {/state T def /submode A def} if @@ -13803,13 +17429,18 @@ begin % To determine size of matrix, number of columns if given by user... columns 0 eq {/columns m k add 3 div sqrt round cvi def} if - columns 1 ge columns 30 le and {/c columns def} if + /c columns 1 ge {columns} {1} ifelse def % ... and rows is greater of those required and that given by user within limits /r m k add 1 add columns div ceiling cvi def % Required r rows lt rows 90 le and {/r rows def} if r 3 lt {/r 3 def} if + % Symbol cannot exceed 90 rows + r 90 gt { + /bwipp.pdf417insufficientCapacity (Insufficient capacity in the symbol) //raiseerror exec + } if + % Opportunistically raise the error level if a better fit to the matrix is possible /maxeclevel c r mul 1 sub m sub ln 2 ln div cvi 1 sub 8 2 copy gt {exch} if pop def maxeclevel eclevel gt { @@ -13837,17 +17468,17 @@ begin } { pop pop 0 } ifelse - } bind def + } def % Generate the coefficients /coeffs [ 1 k {0} repeat ] def 1 1 k { - /i exch def + /i exch def coeffs i coeffs i 1 sub get put i 1 sub -1 1 { /j exch def coeffs j coeffs j 1 sub get coeffs j get rsalog i get rsprod add 929 mod put - } for + } for coeffs 0 coeffs 0 get rsalog i get rsprod put } for /coeffs coeffs 0 coeffs length 1 sub getinterval def @@ -13866,7 +17497,10 @@ begin % Trim the working space from the end of the codewords /cws cws 0 cws length 1 sub getinterval def + options /debugcws known { /bwipp.debugcws cws //raiseerror exec } if + % Base 10 encoding of the bar space successions for the codewords in each cluster +{ /clusters [ [ 120256 125680 128380 120032 125560 128318 108736 119920 108640 86080 108592 86048 @@ -14107,13 +17741,14 @@ begin 67476 69556 67474 69554 116714 ] ] def +} ctxdef % Return the 17 bits for a codeword in a given cluster /cwtobits { clusters exch get exch get /v exch def [ 17 {0} repeat v 2 17 string cvrs {48 sub} forall ] dup length 17 sub 17 getinterval - } bind def + } def % Populate bitmap for the image compact { @@ -14123,7 +17758,7 @@ begin } ifelse /pixs rwid r mul array def - 0 1 r 1 sub { + 0 1 r 1 sub { /i exch def i 3 mod 0 eq { @@ -14166,9 +17801,13 @@ begin dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /pdf417 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -14177,15 +17816,15 @@ end % --END ENCODER pdf417-- % --BEGIN ENCODER pdf417compact-- -% --REQUIRES preamble raiseerror renmatrix pdf417-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix pdf417-- % --DESC: Compact PDF417 % --EXAM: This is compact PDF417 % --EXOP: columns=2 % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp pdf417compact 0.0 2017040400 59527 59274 -%%BeginData: 43 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp pdf417compact 0.0 2022082100 62537 62516 +%%BeginData: 46 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /pdf417 dup /uk.co.terryburton.bwipp findresource put @@ -14197,6 +17836,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def % Parse the input options @@ -14218,12 +17858,14 @@ begin args (opt) options put args - + dontdraw not //renmatrix if end -} bind def +} +[/barcode] {null def} forall +bind def /pdf417compact dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -14232,16 +17874,19 @@ end % --END ENCODER pdf417compact-- % --BEGIN ENCODER micropdf417-- -% --REQUIRES preamble raiseerror renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- % --DESC: MicroPDF417 % --EXAM: MicroPDF417 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp micropdf417 0.0 2017040400 241907 247375 -%%BeginData: 959 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp micropdf417 0.0 2022082100 212812 214997 +%%BeginData: 998 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /micropdf417 { @@ -14251,6 +17896,7 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def /version (unset) def /columns 0 def @@ -14261,6 +17907,7 @@ begin /ccb false def /raw false def /parse false def + /parsefnc false def % Parse the input options options type /stringtype eq { @@ -14283,26 +17930,94 @@ begin /rows rows cvi def /rowmult rowmult cvr def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if + /micropdf417 //loadctx exec + +{ + % Modes and text submodes + /T 0 def /N 1 def /B 2 def + /A 0 def /L 1 def /M 2 def /P 3 def + + % Special function characters for mode switching + /tl -1 def /nl -2 def /bl -3 def /bl6 -4 def /bs -5 def + + % Special function characters for text mode + /al -6 def /ll -7 def /ml -8 def /pl -9 def /as -10 def /ps -11 def + + % Character maps for each state + /charmaps [ + % A L M P + [ (A) (a) (0) (;) ] % 0 + [ (B) (b) (1) (<) ] % 1 + [ (C) (c) (2) (>) ] % 2 + [ (D) (d) (3) (@) ] % 3 + [ (E) (e) (4) ([) ] % 4 + [ (F) (f) (5) 92 ] % 5 + [ (G) (g) (6) (]) ] % 6 + [ (H) (h) (7) (_) ] % 7 + [ (I) (i) (8) (`) ] % 8 + [ (J) (j) (9) (~) ] % 9 + [ (K) (k) (&) (!) ] % 10 + [ (L) (l) 13 13 ] % 11 + [ (M) (m) 9 9 ] % 12 + [ (N) (n) (,) (,) ] % 13 + [ (O) (o) (:) (:) ] % 14 + [ (P) (p) (#) 10 ] % 15 + [ (Q) (q) (-) (-) ] % 16 + [ (R) (r) (.) (.) ] % 17 + [ (S) (s) ($) ($) ] % 18 + [ (T) (t) (/) (/) ] % 19 + [ (U) (u) (+) (") ] % 20 + [ (V) (v) (%) (|) ] % 21 + [ (W) (w) (*) (*) ] % 22 + [ (X) (x) (=) 40 ] % 23 + [ (Y) (y) (^) 41 ] % 24 + [ (Z) (z) pl (?) ] % 25 + [ ( ) ( ) ( ) ({) ] % 26 + [ ll as ll (}) ] % 27 + [ ml ml al (') ] % 28 + [ ps ps ps al ] % 29 + ] def + + % Invert charmaps to give character to value maps for each state + /charvals [ 30 dict 30 dict 30 dict 30 dict ] def + /alltext 104 dict def + 0 1 charmaps length 1 sub { + /i exch def + /encs charmaps i get def + 0 1 3 { + /j exch def + encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required + dup charvals j get exch i put + alltext exch -1 put + } for + } for + + /e 10000 def % "Empty" + + /latlen [ % Bit length of latch between submodes + % To: A L M P From + [ 0 1 1 2 ] % A + [ 2 0 1 2 ] % L + [ 1 1 0 1 ] % M + [ 1 2 2 0 ] % P + ] def + + /latseq [ % Latch sequences between submodes + % To: A L M P From + [ [] [ll] [ml] [ml pl] ] % A + [ [ml al] [] [ml] [ml pl] ] % L + [ [al] [ll] [] [pl] ] % M + [ [al] [al ll] [al ml] [] ] % P + ] def + + /shftlen [ % Bit length of shift to submode + % To: A L M P From + [ e e e 1 ] % A + [ 1 e e 1 ] % L + [ e e e 1 ] % M + [ e e e e ] % P + ] def +} ctxdef raw {/encoding (raw) def} if cca {/encoding (cca) def} if @@ -14321,9 +18036,6 @@ begin /datcws datcws 0 j getinterval def } if - /barcode [ barcode {} forall ] def - /barlen barcode length def - ccb {/encoding (ccb) def} if /encb { @@ -14360,130 +18072,67 @@ begin putinterval } if out - } bind def + } def encoding (byte) eq encoding (ccb) eq or { + /barlen barcode length def /datcws barlen 6 idiv 5 mul barlen 6 mod add 1 add array def datcws 0 barlen 6 mod 0 eq {924} {901} ifelse put - datcws 1 barcode encb putinterval + datcws 1 [ barcode {} forall ] encb putinterval encoding (ccb) eq {/datcws [920 datcws aload pop] def} if } if encoding (auto) eq { - % Modes and text submodes - /T 0 def /N 1 def /B 2 def - /A 0 def /L 1 def /M 2 def /P 3 def - - % Special function characters for mode switching - /tl -1 def /nl -2 def /bl -3 def /bl6 -4 def /bs -5 def - - % Special function characters for text mode - /al -6 def /ll -7 def /ml -8 def /pl -9 def /as -10 def /ps -11 def - - % Character maps for each state - /charmaps [ - % A L M P - [ (A) (a) (0) (;) ] % 0 - [ (B) (b) (1) (<) ] % 1 - [ (C) (c) (2) (>) ] % 2 - [ (D) (d) (3) (@) ] % 3 - [ (E) (e) (4) ([) ] % 4 - [ (F) (f) (5) 92 ] % 5 - [ (G) (g) (6) (]) ] % 6 - [ (H) (h) (7) (_) ] % 7 - [ (I) (i) (8) (`) ] % 8 - [ (J) (j) (9) (~) ] % 9 - [ (K) (k) (&) (!) ] % 10 - [ (L) (l) 13 13 ] % 11 - [ (M) (m) 9 9 ] % 12 - [ (N) (n) (,) (,) ] % 13 - [ (O) (o) (:) (:) ] % 14 - [ (P) (p) (#) 10 ] % 15 - [ (Q) (q) (-) (-) ] % 16 - [ (R) (r) (.) (.) ] % 17 - [ (S) (s) ($) ($) ] % 18 - [ (T) (t) (/) (/) ] % 19 - [ (U) (u) (+) (") ] % 20 - [ (V) (v) (%) (|) ] % 21 - [ (W) (w) (*) (*) ] % 22 - [ (X) (x) (=) 40 ] % 23 - [ (Y) (y) (^) 41 ] % 24 - [ (Z) (z) pl (?) ] % 25 - [ ( ) ( ) ( ) ({) ] % 26 - [ ll as ll (}) ] % 27 - [ ml ml al (') ] % 28 - [ ps ps ps al ] % 29 - ] def - - % Invert charmaps to give character to value maps for each state - /charvals [ 30 dict 30 dict 30 dict 30 dict ] def - /alltext 104 dict def - 0 1 charmaps length 1 sub { - /i exch def - /encs charmaps i get def - 0 1 3 { - /j exch def - encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required - dup charvals j get exch i put - alltext exch -1 put - } for - } for - - /e 10000 def % "Empty" - - /latlen [ % Bit length of latch between submodes - % To: A L M P From - [ 0 1 1 2 ] % A - [ 2 0 1 2 ] % L - [ 1 1 0 1 ] % M - [ 1 2 2 0 ] % P - ] def - - /latseq [ % Latch sequences between submodes - % To: A L M P From - [ [] [ll] [ml] [ml pl] ] % A - [ [ml al] [] [ml] [ml pl] ] % L - [ [al] [ll] [] [pl] ] % M - [ [al] [al ll] [al ml] [] ] % P - ] def - - /shftlen [ % Bit length of shift to submode - % To: A L M P From - [ e e e 1 ] % A - [ 1 e e 1 ] % L - [ e e e 1 ] % M - [ e e e e ] % P - ] def - + % Parse the input + /fncvals << + /parse parse + /parsefnc parsefnc + /eci true + % Predates FNC non-data codewords, but supports ECI + >> def + /msg barcode fncvals //parseinput exec def + /msglen msg length def + % Determine runlengths of digits - /numdigits [ barlen {0} repeat 0 ] def - /numtext [ barlen {0} repeat 0 ] def - /numbytes [ barlen {0} repeat 0 ] def - barlen 1 sub -1 0 { + /numdigits [ msglen {0} repeat 0 ] def + /numtext [ msglen {0} repeat 0 ] def + /numbytes [ msglen {0} repeat 0 ] def + /iseci [ msglen {0} repeat ] def + msglen 1 sub -1 0 { /i exch def - barcode i get dup 48 ge exch 57 le and { + msg i get dup 48 ge exch 57 le and { numdigits i numdigits i 1 add get 1 add put } if - alltext barcode i get known numdigits i get 13 lt and { + alltext msg i get known numdigits i get 13 lt and { numtext i numtext i 1 add get 1 add put } if - numtext i get 5 lt numdigits i get 13 lt and { + msg i get 0 ge numtext i get 5 lt and numdigits i get 13 lt and { numbytes i numbytes i 1 add get 1 add put } if + iseci i msg i get -1000000 le put } for - /numdigits numdigits 0 barlen getinterval def - /numtext numtext 0 barlen getinterval def - /numbytes numbytes 0 barlen getinterval def - + /numdigits numdigits 0 msglen getinterval def + /numtext numtext 0 msglen getinterval def + /numbytes numbytes 0 msglen getinterval def + /seq [] def /seqlen 0 def /state B def /p 0 def { % loop - p barlen eq {exit} if + p msglen eq {exit} if + iseci p get { + /eci msg p get def + /seq [ + seq aload pop + [ eci ] + ] def + /p p 1 add def + /seqlen seqlen eci -1810900 le {2} {eci -1000900 le {3} {2} ifelse} ifelse add def + } { /n numdigits p get def n 13 ge { /seq [ seq aload pop nl - [ barcode p n getinterval aload pop ] + [ msg p n getinterval aload pop ] ] def /state N def /p p n add def @@ -14493,8 +18142,10 @@ begin t 5 ge { /seq [ seq aload pop - state T ne {tl} if - [ barcode p t getinterval aload pop ] + state T ne { + tl + } if + [ msg p t getinterval aload pop ] ] def /state T def /p p t add def @@ -14505,7 +18156,7 @@ begin /seq [ seq aload pop bs - [ barcode p get ] + [ msg p get ] ] def /p p b add def /seqlen seqlen 2 add def @@ -14513,43 +18164,43 @@ begin /seq [ seq aload pop b 6 mod 0 ne {bl} {bl6} ifelse - [ barcode p b getinterval aload pop ] + [ msg p b getinterval aload pop ] ] def /state B def /p p b add def /seqlen seqlen 1 add b add def - } ifelse } ifelse } ifelse + } ifelse } ifelse } ifelse } ifelse } loop - + /latchcws << tl 900 bl 901 bl6 924 nl 902 bs 913 >> def - + % Submode encoding functions - /enca {charvals A get exch get} bind def - /encl {charvals L get exch get} bind def - /encm {charvals M get exch get} bind def - /encp {charvals P get exch get} bind def + /enca {charvals A get exch get} def + /encl {charvals L get exch get} def + /encm {charvals M get exch get} def + /encp {charvals P get exch get} def /textencfuncs [ /enca /encl /encm /encp ] def - + /addtotext { text exch l exch put /l l 1 add def - } bind def - + } def + /enct { - + /in exch def - + /curlen [ e e e e ] def curlen submode 0 put /curseq [ [] [] [] [] ] def - + % Derive the optimal sequences ending in each submode in { - + /char exch def - + % Check for optimisations in the current sequences by latching from x to y { % loop /imp false def @@ -14570,25 +18221,25 @@ begin } forall imp not {exit} if % Repeat unless no improvement } loop - + % Determine optimal next sequences for each valid encoding /nxtlen [ e e e e ] def /nxtseq 4 array def - + [ A L M P ] { /x exch def - + { % loop for common exit - + charvals x get char known not {exit} if - + % Extend directly /cost curlen x get 1 add def cost nxtlen x get lt { nxtlen x cost put nxtseq x [ curseq x get aload pop char ] put } if - + % Optimise for direct shifts from y to x [ A L M P ] { /y exch def @@ -14604,17 +18255,17 @@ begin } if } if } forall - + exit } loop - + } forall - + /curlen nxtlen def /curseq nxtseq def - + } forall - + % Select the optimal sequence /minseq e def [ A L M P ] { @@ -14624,31 +18275,31 @@ begin /txtseq curseq k get def } if } forall - + % Encode the sequence /text minseq array def /k 0 def /l 0 def { k txtseq length ge {exit} if - + /char txtseq k get def - + % Encode character char textencfuncs submode get load exec addtotext /k k 1 add def - + % Encode shifted next character char as eq char ps eq or { txtseq k get char as eq {enca} {encp} ifelse addtotext /k k 1 add def } if - + % Latches to new submode char al eq {/submode A def} if char ll eq {/submode L def} if char ml eq {/submode M def} if char pl eq {/submode P def} if } loop - + text length 2 mod 1 eq { submode P eq { /pad al encp def @@ -14658,17 +18309,17 @@ begin } ifelse /text [ text aload pop pad ] def } if - + /out text length 2 idiv array def 0 1 out length 1 sub { /k exch def out k text k 2 mul get 30 mul text k 2 mul 1 add get add put } for - + out - - } bind def - + + } def + /encn { /in exch def /out [] def @@ -14701,23 +18352,40 @@ begin /out [ out aload pop cwn aload pop ] def } for out - } bind def - + } def + + /ence { + 0 get neg 1000000 sub + dup 000899 le { % ECI 000000 - 000899 + 927 exch 2 array astore + } { dup 810899 le { % ECI 000900 - 810899 + 926 exch dup 900 idiv 1 sub exch 900 mod 3 array astore + } { dup 811799 le { % ECI 810900 - 811799 + 925 exch 810900 sub 2 array astore + } { + /bwipp.pdf417badECI (PDF417 supports ECIs 000000 to 811799) //raiseerror exec + } ifelse } ifelse } ifelse + } def + /encfuncs [ /enct /encn /encb ] def - + /addtocws { dup datcws j 3 -1 roll putinterval length j add /j exch def - } bind def - + } def + % Encode the sequence - /state T def /submode A def + % No need to set state as seq will always begin with a latch, unlike for pdf417 /datcws seqlen array def /i 0 def /j 0 def { i seq length ge {exit} if /chars seq i get def chars type /arraytype eq { % Encode data according to mode - chars encfuncs state get load exec addtocws + chars 0 get -1000000 le { % ECI + chars ence addtocws + } { % Encode data according to mode + chars encfuncs state get load exec addtocws + } ifelse } { % Encode the latch to new state or byte shift [ latchcws chars get ] addtocws chars tl eq {/state T def /submode A def} if @@ -14733,9 +18401,32 @@ begin /datcws datcws 0 j getinterval def } if +{ % Basic metrics for the each symbol % c r ecw rl rc rr - /metrics [ + /ccametrics [ + [ 2 5 4 39 0 19 ] + [ 2 6 4 1 0 33 ] + [ 2 7 5 32 0 12 ] + [ 2 8 5 8 0 40 ] + [ 2 9 6 14 0 46 ] + [ 2 10 6 43 0 23 ] + [ 2 12 7 20 0 52 ] + [ 3 4 4 11 43 23 ] + [ 3 5 5 1 33 13 ] + [ 3 6 6 5 37 17 ] + [ 3 7 7 15 47 27 ] + [ 3 8 7 21 1 33 ] + [ 4 3 4 40 20 52 ] + [ 4 4 5 43 23 3 ] + [ 4 5 6 46 26 6 ] + [ 4 6 7 34 14 46 ] + [ 4 7 8 29 9 41 ] + ] def + + % Basic metrics for the each symbol + % c r ecw rl rc rr + /nonccametrics [ [ 1 11 7 1 0 9 ] [ 1 14 7 8 0 8 ] [ 1 17 7 36 0 36 ] @@ -14771,29 +18462,9 @@ begin [ 4 38 44 15 31 47 ] [ 4 44 50 1 25 49 ] ] def +} ctxdef - % Basic metrics for the each symbol - % c r ecw rl rc rr - /ccametrics [ - [ 2 5 4 39 0 19 ] - [ 2 6 4 1 0 33 ] - [ 2 7 5 32 0 12 ] - [ 2 8 5 8 0 40 ] - [ 2 9 6 14 0 46 ] - [ 2 10 6 43 0 23 ] - [ 2 12 7 20 0 52 ] - [ 3 4 4 11 43 23 ] - [ 3 5 5 1 33 13 ] - [ 3 6 6 5 37 17 ] - [ 3 7 7 15 47 27 ] - [ 3 8 7 21 1 33 ] - [ 4 3 4 40 20 52 ] - [ 4 4 5 43 23 3 ] - [ 4 5 6 46 26 6 ] - [ 4 6 7 34 14 46 ] - [ 4 7 8 29 9 41 ] - ] def - cca {/metrics ccametrics def} if + /metrics cca {ccametrics} {nonccametrics} ifelse def % Select metrics of an appropriate symbol /urows rows def @@ -14825,9 +18496,11 @@ begin cws n [ k {0} repeat 0 ] putinterval % Calculate the log and anti-log tables +{ /rsalog [ 1 928 {dup 3 mul 929 mod} repeat ] def /rslog 929 array def 1 1 928 {dup rsalog exch get exch rslog 3 1 roll put} for +} ctxdef % Function to calculate the product in the field /rsprod { @@ -14836,17 +18509,17 @@ begin } { pop pop 0 } ifelse - } bind def + } def % Generate the coefficients /coeffs [ 1 k {0} repeat ] def 1 1 k { - /i exch def + /i exch def coeffs i coeffs i 1 sub get put i 1 sub -1 1 { /j exch def coeffs j coeffs j 1 sub get coeffs j get rsalog i get rsprod add 929 mod put - } for + } for coeffs 0 coeffs 0 get rsalog i get rsprod put } for /coeffs coeffs 0 coeffs length 1 sub getinterval def @@ -14865,6 +18538,9 @@ begin % Trim the working space from the end of the codewords /cws cws 0 cws length 1 sub getinterval def + options /debugcws known { /bwipp.debugcws cws //raiseerror exec } if + +{ % Base 10 encoding of the bar space successions for the codewords in each cluster /clusters [ [ @@ -15121,20 +18797,21 @@ begin 654 652 668 664 696 688 656 720 592 600 604 732 734 ] ] def +} ctxdef % Return the 17 bits for a codeword in a given cluster /cwtobits { clusters exch get exch get /v exch def [ 17 {0} repeat v 2 17 string cvrs {48 sub} forall ] dup length 17 sub 17 getinterval - } bind def + } def % Return the 10 bits for a row address pattern /raptobits { raps exch get exch get /v exch def [ 10 {0} repeat v 2 10 string cvrs {48 sub} forall ] dup length 10 sub 10 getinterval - } bind def + } def % Populate bitmap for the image /rwid [38 55 82 99] c 1 sub get def @@ -15192,9 +18869,13 @@ begin dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /micropdf417 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -15203,16 +18884,19 @@ end % --END ENCODER micropdf417-- % --BEGIN ENCODER datamatrix-- -% --REQUIRES preamble raiseerror renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- % --DESC: Data Matrix % --EXAM: This is Data Matrix! % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp datamatrix 0.0 2017040400 258183 263444 -%%BeginData: 889 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp datamatrix 0.0 2022082100 213189 215115 +%%BeginData: 934 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /datamatrix { @@ -15222,6 +18906,7 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def /columns 0 def /rows 0 def @@ -15229,7 +18914,12 @@ begin /version (unset) def /parse false def /parsefnc false def - /dmre false def + /encoding (auto) def + /mailmark false def + /raw false def + /dmre false def % Alias for isodmre + /dindmre false def + /isodmre false def % Parse the input options options type /stringtype eq { @@ -15251,121 +18941,67 @@ begin /columns columns cvi def /rows rows cvi def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if + /isodmre dmre def - % Macro 05/06 compression of [)>{RS}05/06{GS}...{RS}{EOT} structured data - /mac05comp false def - /mac06comp false def - barcode length 9 ge { - barcode 0 7 getinterval - dup ([\)>\03605\035) eq - exch ([\)>\03606\035) eq or - barcode barcode length 2 sub 2 getinterval (\036\004) eq and { - barcode 5 get 53 eq {/mac05comp} {/mac06comp} ifelse true def - /barcode barcode 7 barcode length 9 sub getinterval def - } if - } if - - /barlen barcode length def - - % Convert input into bytes accounting for FNC characters - /fnc1 -1 def /prog -2 def /m05 -3 def /m06 -4 def - /fncvals << - (FNC1) fnc1 - (PROG) prog - (MAC5) m05 - (MAC6) m06 - >> def - /msg barlen array def - /i 0 def /j 0 def { - i barlen eq {exit} if - /char barcode i get def - parsefnc char 94 eq and i barlen 4 sub lt and { - barcode i 1 add get 94 ne { - /char fncvals barcode i 1 add 4 getinterval get def - /i i 4 add def - } { - /i i 1 add def - } ifelse - } if - msg j char put - /i i 1 add def - /j j 1 add def - } loop - /msg msg 0 j getinterval def - - % Prefix the Macro 05/06 compression indicator - mac05comp { /msg [ m05 msg aload pop ] def } if - mac06comp { /msg [ m06 msg aload pop ] def } if - - /msglen msg length def + /datamatrix //loadctx exec + % TODO make this "static" % Basic metrics for the each symbol - % rows cols regh regv rscw rsbl + % rows cols regh regv rscw rsbl /metrics [ % Standard square symbols - [ 10 10 1 1 5 1 ] - [ 12 12 1 1 7 1 ] - [ 14 14 1 1 10 1 ] - [ 16 16 1 1 12 1 ] - [ 18 18 1 1 14 1 ] - [ 20 20 1 1 18 1 ] - [ 22 22 1 1 20 1 ] - [ 24 24 1 1 24 1 ] - [ 26 26 1 1 28 1 ] - [ 32 32 2 2 36 1 ] - [ 36 36 2 2 42 1 ] - [ 40 40 2 2 48 1 ] - [ 44 44 2 2 56 1 ] - [ 48 48 2 2 68 1 ] - [ 52 52 2 2 84 2 ] - [ 64 64 4 4 112 2 ] - [ 72 72 4 4 144 4 ] - [ 80 80 4 4 192 4 ] - [ 88 88 4 4 224 4 ] - [ 96 96 4 4 272 4 ] - [ 104 104 4 4 336 6 ] - [ 120 120 6 6 408 6 ] - [ 132 132 6 6 496 8 ] - [ 144 144 6 6 620 10 ] + [ 10 10 1 1 5 1 ] + [ 12 12 1 1 7 1 ] + [ 14 14 1 1 10 1 ] + [ 16 16 1 1 12 1 ] + [ 18 18 1 1 14 1 ] + [ 20 20 1 1 18 1 ] + [ 22 22 1 1 20 1 ] + [ 24 24 1 1 24 1 ] + [ 26 26 1 1 28 1 ] + [ 32 32 2 2 36 1 ] + [ 36 36 2 2 42 1 ] + [ 40 40 2 2 48 1 ] + [ 44 44 2 2 56 1 ] + [ 48 48 2 2 68 1 ] + [ 52 52 2 2 84 2 ] + [ 64 64 4 4 112 2 ] + [ 72 72 4 4 144 4 ] + [ 80 80 4 4 192 4 ] + [ 88 88 4 4 224 4 ] + [ 96 96 4 4 272 4 ] + [ 104 104 4 4 336 6 ] + [ 120 120 6 6 408 6 ] + [ 132 132 6 6 496 8 ] + [ 144 144 6 6 620 10 ] % Optional rectangular symbols - [ 8 18 1 1 7 1 ] - [ 8 32 1 2 11 1 ] - dmre { [ 8 48 1 2 15 1 ] } if - dmre { [ 8 64 1 4 18 1 ] } if - [ 12 26 1 1 14 1 ] - [ 12 36 1 2 18 1 ] - dmre { [ 12 64 1 4 27 1 ] } if - [ 16 36 1 2 24 1 ] - [ 16 48 1 2 28 1 ] - dmre { [ 16 64 1 4 36 1 ] } if - dmre { [ 24 32 1 2 28 1 ] } if - dmre { [ 24 36 1 2 33 1 ] } if - dmre { [ 24 48 1 2 41 1 ] } if - dmre { [ 24 64 1 4 46 1 ] } if - dmre { [ 26 32 1 2 32 1 ] } if - dmre { [ 26 40 1 2 38 1 ] } if - dmre { [ 26 48 1 2 42 1 ] } if - dmre { [ 26 64 1 4 50 1 ] } if + [ 8 18 1 1 7 1 ] + [ 8 32 1 2 11 1 ] + dindmre isodmre or { [ 8 48 1 2 15 1 ] } if + dindmre isodmre or { [ 8 64 1 4 18 1 ] } if + isodmre { [ 8 80 1 4 22 1 ] } if + isodmre { [ 8 96 1 4 28 1 ] } if + isodmre { [ 8 120 1 6 32 1 ] } if + isodmre { [ 8 144 1 6 36 1 ] } if + [ 12 26 1 1 14 1 ] + [ 12 36 1 2 18 1 ] + dindmre isodmre or { [ 12 64 1 4 27 1 ] } if + isodmre { [ 12 88 1 4 36 1 ] } if + [ 16 36 1 2 24 1 ] + [ 16 48 1 2 28 1 ] + dindmre isodmre or { [ 16 64 1 4 36 1 ] } if + isodmre { [ 20 36 1 2 28 1 ] } if + isodmre { [ 20 44 1 2 34 1 ] } if + isodmre { [ 20 64 1 4 42 1 ] } if + isodmre { [ 22 48 1 2 38 1 ] } if + dindmre { [ 24 32 1 2 28 1 ] } if + dindmre { [ 24 36 1 2 33 1 ] } if + dindmre isodmre or { [ 24 48 1 2 41 1 ] } if + dindmre isodmre or { [ 24 64 1 4 46 1 ] } if + dindmre { [ 26 32 1 2 32 1 ] } if + dindmre isodmre or { [ 26 40 1 2 38 1 ] } if + dindmre isodmre or { [ 26 48 1 2 42 1 ] } if + dindmre isodmre or { [ 26 64 1 4 50 1 ] } if ] def % Create array of codewords remaining to make a full symbol @@ -15399,11 +19035,13 @@ begin } if } for +{ % Special characters + /fnc1 -1 def /prog -2 def /m05 -3 def /m06 -4 def /lC -5 def /lB -6 def /lX -7 def /lT -8 def /lE -9 def /unl -10 def /sapp -11 def /usft -12 def /sft1 -13 def /sft2 -14 def /sft3 -15 def /eci -16 def /pad -17 def /unlcw 254 def - + /Avals << 0 1 128 {dup 1 add} for pad 129 @@ -15416,7 +19054,7 @@ begin /Avals << Avals {[exch]} forall >> def - + /CNvals << sft1 0 sft2 1 @@ -15440,7 +19078,7 @@ begin C2vals {[exch CNvals sft2 get exch]} forall C3vals {[exch CNvals sft3 get exch]} forall >> def - + /TNvals << sft1 0 sft2 1 @@ -15468,7 +19106,7 @@ begin T2vals {[exch TNvals sft2 get exch]} forall T3vals {[exch TNvals sft3 get exch]} forall >> def - + % Extended ASCII mappings 128 1 255 { /i exch def @@ -15476,7 +19114,7 @@ begin Cvals i [ Cvals usft get aload pop Cvals i 128 sub get aload pop ] put Tvals i [ Tvals usft get aload pop Tvals i 128 sub get aload pop ] put } for - + /Xvals << 13 0 42 1 @@ -15488,7 +19126,7 @@ begin /Xvals << Xvals {[exch]} forall >> def - + /Evals << 64 1 94 {dup 64 sub} for unl 31 @@ -15497,345 +19135,425 @@ begin /Evals << Evals {[exch]} forall >> def - + /Bvals << 0 1 255 {dup} for >> def /Bvals << Bvals {[exch]} forall >> def - + /encvals [ Avals Cvals Tvals Xvals Evals Bvals ] def - - /numD [ msglen {0} repeat 0 ] def - /nextXterm [ msglen {0} repeat 9999 ] def - /nextNonX [ msglen {0} repeat 9999 ] def - msglen 1 sub -1 0 { - /i exch def - /barchar msg i get def - barchar 48 ge barchar 57 le and { - numD i numD i 1 add get 1 add put - } if - barchar 13 eq barchar 42 eq or barchar 62 eq or { - nextXterm i 0 put - } { - nextXterm i nextXterm i 1 add get 1 add put - } ifelse - Xvals barchar known not { - nextNonX i 0 put - } { - nextNonX i nextNonX i 1 add get 1 add put - } ifelse - } for - /nextXterm [nextXterm {dup 10000 gt {pop 10000} if} forall] def - /nextNonX [nextNonX {dup 10000 gt {pop 10000} if} forall] def - - /isD {char 48 ge char 57 le and} bind def - /isC {CNvals char known} bind def - /isT {TNvals char known} bind def - /isX {Xvals char known} bind def - /isE {Evals char known} bind def - /isEA {char 127 gt} bind def - /isFN {char 0 lt} bind def - /XtermFirst {dup nextXterm exch get exch nextNonX exch get lt} bind def - + /A 0 def /C 1 def /T 2 def /X 3 def /E 4 def /B 5 def +} ctxdef - /lookup { - /ac 1 def /cc 2 def /tc 2 def /xc 2 def /ec 2 def /bc 2.25 def - mode A eq {/ac 0 def /cc 1 def /tc 1 def /xc 1 def /ec 1 def /bc 1.25 def} if - mode C eq {/cc 0 def} if - mode T eq {/tc 0 def} if - mode X eq {/xc 0 def} if - mode E eq {/ec 0 def} if - mode B eq {/bc 0 def} if - 1 { % common exit - /k 0 def { % loop - i k add msglen eq { - [/ac /cc /tc /xc /ec /bc] {dup load ceiling def} forall - true [ cc tc xc ec bc] {ac exch le and} forall {A exit} if - true [ac cc tc xc ec ] {bc exch lt and} forall {B exit} if - true [ac cc tc xc bc] {ec exch lt and} forall {E exit} if - true [ac cc xc ec bc] {tc exch lt and} forall {T exit} if - true [ac cc tc ec bc] {xc exch lt and} forall {X exit} if - C exit - } if - /char msg i k add get def - /ac ac isD {1 2 div add} {isEA {ceiling 2 add} {ceiling 1 add} ifelse} ifelse def - /cc cc isC {2 3 div add} {isEA { 8 3 div add } { 4 3 div add } ifelse} ifelse def - /tc tc isT {2 3 div add} {isEA { 8 3 div add } { 4 3 div add } ifelse} ifelse def - /xc xc isX {2 3 div add} {isEA {13 3 div add } {10 3 div add } ifelse} ifelse def - /ec ec isE {3 4 div add} {isEA {17 4 div add } {13 4 div add } ifelse} ifelse def - /bc bc isFN {4 add} {1 add} ifelse def - k 4 ge { - true [ cc tc xc ec bc] {ac 1 add exch le and} forall {A exit} if - bc 1 add ac le {B exit} if - true [ cc tc xc ec ] {bc 1 add exch lt and} forall {B exit} if - true [ac cc tc xc bc] {ec 1 add exch lt and} forall {E exit} if - true [ac cc xc ec bc] {tc 1 add exch lt and} forall {T exit} if - true [ac cc tc ec bc] {xc 1 add exch lt and} forall {X exit} if - true [ac tc ec bc] {cc 1 add exch lt and} forall { - cc xc lt {C exit} if - cc xc eq {i k add 1 add XtermFirst {X exit} {C exit} ifelse} if - } if + raw {/encoding (raw) def} if + + encoding (raw) eq { + /cws barcode length array def + /i 0 def /j 0 def + { % loop + i barcode length eq {exit} if + /cw barcode i 1 add 3 getinterval cvi def + cws j cw put + /i i 4 add def + /j j 1 add def + } loop + /cws cws 0 j getinterval def + } if % encoding=raw + + encoding (auto) eq { + + % Parse the input + /fncvals << + /parse parse + /parsefnc parsefnc + /eci true + (FNC1) fnc1 + (PROG) prog +% (MAC5) m05 Encoded automatically +% (MAC6) m06 Encoded automatically + >> def + /msg barcode fncvals //parseinput exec def + /msglen msg length def + + % Macro 05/06 compression of [)>{RS}05/06{GS}...{RS}{EOT} structured data + msglen 9 ge { + msg 0 7 getinterval aload pop + 29 eq exch pop exch 48 eq and exch % [)>{RS}0*{GS}... + 30 eq and exch 62 eq and exch 41 eq and exch 91 eq and { + msg msglen 2 sub 2 getinterval aload pop + 4 eq exch 30 eq and { % ...{RS}{EOT} + msg 5 get 53 eq { % ...5... + /msg [ m05 msg 7 msg length 9 sub getinterval aload pop ] def + } { + msg 5 get 54 eq { % ...6... + /msg [ m06 msg 7 msg length 9 sub getinterval aload pop ] def + } if + } ifelse } if - /k k 1 add def - } loop - } repeat - } bind def - - /addtocws { - dup cws exch j exch putinterval - /j exch length j add def - } bind def - - /encA { - 1 { % Common exit - numD i get 2 ge { - 2 string dup 0 msg i get put dup 1 msg i 1 add get put Avals exch get addtocws - /i i 2 add def - exit } if - /newmode lookup def - newmode mode ne { - Avals [-1 lC lT lX lE lB] newmode get get addtocws - /mode newmode def - exit + } if + /msglen msg length def + + /numD [ msglen {0} repeat 0 ] def + /nextXterm [ msglen {0} repeat 9999 ] def + /nextNonX [ msglen {0} repeat 9999 ] def + /isECI [ msglen {false} repeat false ] def + msglen 1 sub -1 0 { + /i exch def + /barchar msg i get def + barchar 48 ge barchar 57 le and { + numD i numD i 1 add get 1 add put } if - Avals msg i get get addtocws - /i i 1 add def - exit - } repeat - } bind def - - /CTXvalstocws { - /in exch def - mark - 0 3 in length 1 sub { - in exch 3 getinterval 0 exch {add 40 mul} forall 40 idiv 1 add - dup 256 idiv exch 256 mod + barchar 13 eq barchar 42 eq or barchar 62 eq or { + nextXterm i 0 put + } { + nextXterm i nextXterm i 1 add get 1 add put + } ifelse + Xvals barchar known not { + nextNonX i 0 put + } { + nextNonX i nextNonX i 1 add get 1 add put + } ifelse + isECI i barchar -1000000 le put } for - counttomark array astore exch pop - } bind def - - /encCTX { - /p 0 def - /ctxvals 2500 array def - - % Lookup the values for each character - { - i msglen eq {exit} if - encvals mode get msg i get known not {exit} if - p 3 mod 0 eq { - lookup mode ne { - ctxvals 0 p getinterval CTXvalstocws addtocws - [unlcw] addtocws - /mode A def + /nextXterm [nextXterm {dup 10000 gt {pop 10000} if} forall] def + /nextNonX [nextNonX {dup 10000 gt {pop 10000} if} forall] def + + /isD {char 48 ge char 57 le and} def + /isC {CNvals char known} def + /isT {TNvals char known} def + /isX {Xvals char known} def + /isE {Evals char known} def + /isEA {char 127 gt} def + /isFN {char 0 lt} def + /XtermFirst {dup nextXterm exch get exch nextNonX exch get lt} def + + /lookup { + /ac 1 def /cc 2 def /tc 2 def /xc 2 def /ec 2 def /bc 2.25 def + mode A eq {/ac 0 def /cc 1 def /tc 1 def /xc 1 def /ec 1 def /bc 1.25 def} if + mode C eq {/cc 0 def} if + mode T eq {/tc 0 def} if + mode X eq {/xc 0 def} if + mode E eq {/ec 0 def} if + mode B eq {/bc 0 def} if + 1 { % common exit + isECI i get {A exit} if % ECI only in ASCII + mailmark i 45 lt and {C exit} if % Mailmark is C40 only for 45 characters + /k 0 def { % loop + i k add msglen eq { + [/ac /cc /tc /xc /ec /bc] {dup load ceiling def} forall + true [ cc tc xc ec bc] {ac exch le and} forall {A exit} if + true [ac cc tc xc ec ] {bc exch lt and} forall {B exit} if + true [ac cc tc xc bc] {ec exch lt and} forall {E exit} if + true [ac cc xc ec bc] {tc exch lt and} forall {T exit} if + true [ac cc tc ec bc] {xc exch lt and} forall {X exit} if + C exit + } if + /char msg i k add get def + /ac ac isD {1 2 div add} {isEA {ceiling 2 add} {ceiling 1 add} ifelse} ifelse def + /cc cc isC {2 3 div add} {isEA { 8 3 div add } { 4 3 div add } ifelse} ifelse def + /tc tc isT {2 3 div add} {isEA { 8 3 div add } { 4 3 div add } ifelse} ifelse def + /xc xc isX {2 3 div add} {isEA {13 3 div add } {10 3 div add } ifelse} ifelse def + /ec ec isE {3 4 div add} {isEA {17 4 div add } {13 4 div add } ifelse} ifelse def + /bc bc isFN {4 add} {1 add} ifelse def + k 4 ge { + true [ cc tc xc ec bc] {ac 1 add exch le and} forall {A exit} if + bc 1 add ac le {B exit} if + true [ cc tc xc ec ] {bc 1 add exch lt and} forall {B exit} if + true [ac cc tc xc bc] {ec 1 add exch lt and} forall {E exit} if + true [ac cc xc ec bc] {tc 1 add exch lt and} forall {T exit} if + true [ac cc tc ec bc] {xc 1 add exch lt and} forall {X exit} if + true [ac tc ec bc] {cc 1 add exch lt and} forall { + cc xc lt {C exit} if + cc xc eq {i k add 1 add XtermFirst {X exit} {C exit} ifelse} if + } if + } if + /k k 1 add def + } loop + } repeat + } def + + /addtocws { + dup cws exch j exch putinterval + /j exch length j add def + } def + + /ECItocws { + neg 1000000 sub + dup 000126 le { % ECI 000000 - 000126 + 1 add + 1 array astore + } { dup 016382 le { % ECI 000127 - 016382 + 127 sub + dup 254 idiv 128 add exch + 254 mod 1 add + 2 array astore + } { % ECI 016383 - 999999 + 16383 sub + dup 64516 idiv 192 add exch + dup 254 idiv 254 mod 1 add exch + 254 mod 1 add + 3 array astore + } ifelse } ifelse + } def + + /encA { + 1 { % Common exit + isECI i get { + Avals eci get addtocws + msg i get ECItocws addtocws + /i i 1 add def exit } if - msglen i sub 3 le { % Check end of data conditions - /remcws numremcws j p 3 idiv 2 mul add get def - /remvals [ - msg i msglen i sub getinterval { - dup encvals mode get exch known { - encvals mode get exch get aload pop - } { % Unencodable X12 characters - pop -1 -1 -1 -1 - } ifelse - } forall - ] def - remcws 2 eq remvals length 3 eq and { - % Encode and omit unlatch - [ - ctxvals 0 p getinterval aload pop - remvals aload pop - ] CTXvalstocws addtocws - /mode A def - /i msglen def - exit - } if - remcws 2 eq remvals length 2 eq and mode X ne and { - % Encode with sft1 as third value, omit unlatch - [ - ctxvals 0 p getinterval aload pop - remvals aload pop - encvals mode get sft1 get aload pop - ] CTXvalstocws addtocws - /mode A def - /i msglen def - exit + numD i get 2 ge { + 2 string dup 0 msg i get put dup 1 msg i 1 add get put Avals exch get addtocws + /i i 2 add def + exit + } if + /newmode lookup def + newmode mode ne { + Avals [-1 lC lT lX lE lB] newmode get get addtocws + /mode newmode def + exit + } if + Avals msg i get get addtocws + /i i 1 add def + exit + } repeat + } def + + /CTXvalstocws { + /in exch def + mark + 0 3 in length 1 sub { + in exch 3 getinterval 0 exch {add 40 mul} forall 40 idiv 1 add + dup 256 idiv exch 256 mod + } for + counttomark array astore exch pop + } def + + /encCTX { + /p 0 def + /ctxvals 2500 array def + /done false def + + % Lookup the values for each character + { + i msglen eq {exit} if + encvals mode get msg i get known not {exit} if + p 3 mod 0 eq { + p 0 gt { + /newmode lookup def + newmode mode ne { + ctxvals 0 p getinterval CTXvalstocws addtocws + [unlcw] addtocws + newmode A ne { + Avals [-1 lC lT lX lE lB] newmode get get addtocws + } if + /mode newmode def + /done true def + exit + } if } if - remcws 2 eq remvals length 1 eq and { - % Unlatch to ASCII - ctxvals 0 p getinterval CTXvalstocws addtocws - [unlcw] addtocws - Avals msg i get get addtocws - /mode A def - /i msglen def - exit + msglen i sub 3 le { % Check end of data conditions + /remcws numremcws j p 3 idiv 2 mul add get def + /remvals [ + msg i msglen i sub getinterval { + dup encvals mode get exch known { + encvals mode get exch get aload pop + } { % Unencodable X12 characters + pop -1 -1 -1 -1 + } ifelse + } forall + ] def + remcws 2 eq remvals length 3 eq and { + % Encode and omit unlatch + [ + ctxvals 0 p getinterval aload pop + remvals aload pop + ] CTXvalstocws addtocws + /mode A def + /i msglen def + /done true def + exit + } if + remcws 2 eq remvals length 2 eq and mode X ne and { + % Encode with sft1 as third value, omit unlatch + [ + ctxvals 0 p getinterval aload pop + remvals aload pop + encvals mode get sft1 get aload pop + ] CTXvalstocws addtocws + /mode A def + /i msglen def + /done true def + exit + } if + remcws 2 eq remvals length 1 eq and { + % Unlatch to ASCII + ctxvals 0 p getinterval CTXvalstocws addtocws + [unlcw] addtocws + Avals msg i get get addtocws + /mode A def + /i msglen def + /done true def + exit + } if + remcws 1 eq remvals length 1 eq and { + % Implied unlatch to ASCII + ctxvals 0 p getinterval CTXvalstocws addtocws + Avals msg i get get addtocws + /mode A def + /i msglen def + /done true def + exit + } if } if - remcws 1 eq remvals length 1 eq and { - % Implied unlatch to ASCII - ctxvals 0 p getinterval CTXvalstocws addtocws + } if + encvals mode get msg i get get + dup ctxvals exch p exch putinterval + /p exch length p add def + /i i 1 add def + } loop + + % Backtrack to a boundary and return to ASCII + done not { + { + p 3 mod 0 eq {exit} if + /i i 1 sub def + /p p encvals mode get msg i get get length sub def + } loop + [ + ctxvals 0 p getinterval aload pop + ] CTXvalstocws addtocws + [unlcw] addtocws + /mode A def + % Encode something to avoid latching immediately back + i msglen ne isECI i get not and { + numD i get 2 ge { + 2 string dup 0 msg i get put dup 1 msg i 1 add get put Avals exch get addtocws + /i i 2 add def + } { Avals msg i get get addtocws - /mode A def - /i msglen def - exit - } if + /i i 1 add def + } ifelse } if } if - encvals mode get msg i get get - dup ctxvals exch p exch putinterval - /p exch length p add def - /i i 1 add def - } loop - % Backtrack to a boundary and return to ASCII - mode A ne { + } def + + /Evalstocws { + /in exch def + /inlen in length def + /outlen in length 4 div 3 mul ceiling cvi def + /in [ in aload pop 0 0 0 ] def + mark + 0 4 inlen 1 sub { + in exch 4 getinterval 0 exch {or 6 bitshift} forall -6 bitshift + dup -16 bitshift 255 and exch + dup -8 bitshift 255 and exch + 255 and + } for + counttomark array astore exch pop + 0 outlen getinterval + } def + + /encE { + /p 0 def + /edifactvals 2100 array def + + % Lookup the values for each character { - p 3 mod 0 eq {exit} if - /i i 1 sub def - /p p encvals mode get msg i get get length sub def - } loop - [ - ctxvals 0 p getinterval aload pop - ] CTXvalstocws addtocws - [unlcw] addtocws - /mode A def - % Encode something to avoid latching immediately back - i msglen ne { - numD i get 2 ge { - 2 string dup 0 msg i get put dup 1 msg i 1 add get put Avals exch get addtocws - /i i 2 add def - } { - Avals msg i get get addtocws - /i i 1 add def - } ifelse - } if - } if - - } bind def - - /Evalstocws { - /in exch def - /inlen in length def - /outlen in length 4 div 3 mul ceiling cvi def - /in [ in aload pop 0 0 0 ] def - mark - 0 4 inlen 1 sub { - in exch 4 getinterval 0 exch {or 6 bitshift} forall -6 bitshift - dup -16 bitshift 255 and exch - dup -8 bitshift 255 and exch - 255 and - } for - counttomark array astore exch pop - 0 outlen getinterval - } bind def - - /encE { - /p 0 def - /edifactvals 2100 array def - - % Lookup the values for each character - { - i msglen eq {exit} if - Evals msg i get known not {exit} if - p 4 mod 0 eq { - lookup mode ne {exit} if - msglen i sub 2 le { % Check end of data conditions - /remcws numremcws j p 4 idiv 3 mul add get def - /remvals [ - msg i msglen i sub getinterval { - dup Evals exch known { - Evals exch get aload pop - } { % Unencodable EDIFACT characters - pop -1 -1 -1 -1 -1 - } ifelse - } forall - ] def - remcws 2 eq remvals length 2 eq and { - % Implied unlatch to ASCII - edifactvals 0 p getinterval Evalstocws addtocws - Avals msg i get get addtocws - Avals msg i 1 add get get addtocws - /mode A def - /i msglen def - exit - } if - remcws 2 eq remcws 1 eq or remvals length 1 eq and { - % Implied unlatch to ASCII - edifactvals 0 p getinterval Evalstocws addtocws - Avals msg i get get addtocws - /mode A def - /i msglen def - exit + i msglen eq {exit} if + Evals msg i get known not {exit} if + p 4 mod 0 eq { + msglen i sub 2 le { % Check end of data condition + /remcws numremcws j p 4 idiv 3 mul add get def + /remvals [ + msg i msglen i sub getinterval { + Avals exch get aload pop + } forall + ] def + remcws 1 eq remcws 2 eq or remvals length remcws le and { + % Implied unlatch to ASCII + edifactvals 0 p getinterval Evalstocws addtocws + remvals addtocws + /mode A def + /i msglen def + exit + } if } if + lookup mode ne {exit} if } if - } if - Evals msg i get get - dup edifactvals exch p exch putinterval - /p exch length p add def - /i i 1 add def - } loop - - % Unlatch and pad with zeros until boundary - mode A ne { - /remcws numremcws j p 4 idiv 3 mul add 1 sub get 1 sub def - remcws 0 ne { % Unlatch if we haven't filled symbol - Evals unl get + Evals msg i get get dup edifactvals exch p exch putinterval /p exch length p add def + /i i 1 add def + } loop + + % Unlatch and pad with zeros until boundary + mode A ne { + /remcws numremcws j p 4 idiv 3 mul add 1 sub get 1 sub def + p 4 mod 0 ne i msglen ne or remcws 3 ge or { % Unlatch unless less than 3 codewords remain + Evals unl get + dup edifactvals exch p exch putinterval + /p exch length p add def + } if + edifactvals 0 p getinterval Evalstocws addtocws + /mode A def + % Encode something to avoid latching immediately back + i msglen ne isECI i get not and { + numD i get 2 ge { + 2 string dup 0 msg i get put dup 1 msg i 1 add get put Avals exch get addtocws + /i i 2 add def + } { + Avals msg i get get addtocws + /i i 1 add def + } ifelse + } if } if - edifactvals 0 p getinterval Evalstocws addtocws - /mode A def - % Encode something to avoid latching immediately back - i msglen ne { - numD i get 2 ge { - 2 string dup 0 msg i get put dup 1 msg i 1 add get put Avals exch get addtocws - /i i 2 add def + + } def + + /encB { + /p 0 def /bvals 1558 array def { + i msglen eq {exit} if + lookup mode ne {exit} if + bvals p msg i get put + /p p 1 add def + /i i 1 add def + } loop + /remcws numremcws j p add get 1 sub def + /bvals [ + remcws 0 eq i msglen eq and { % Terminates symbol + 0 } { - Avals msg i get get addtocws - /i i 1 add def + p 250 lt {p} {p 250 idiv 249 add p 250 mod} ifelse } ifelse - } if - } if + bvals 0 p getinterval aload pop + ] def + 0 1 bvals length 1 sub { % Pseudo-randomise based on codeword position + /p exch def + j p add 1 add 149 mul 255 mod 1 add bvals p get add + dup 256 ge {256 sub} if + bvals exch p exch put + } for + bvals addtocws + /mode A def + } def - } bind def - - /encB { - /p 0 def /bvals 1558 array def { - i msglen eq {exit} if - lookup mode ne {exit} if - bvals p msg i get put - /p p 1 add def - /i i 1 add def + % Derive the codewords + /cws 1558 array def + /mode A def /i 0 def /j 0 def { + i msglen ge {exit} if + [ /encA /encCTX /encCTX /encCTX /encE /encB ] mode get load exec } loop - /remcws numremcws j p add get 1 sub def - /bvals [ - remcws 0 eq i msglen eq and { % Terminates symbol - 0 - } { - p 250 lt {p} {p 250 idiv 249 add p 250 mod} ifelse - } ifelse - bvals 0 p getinterval aload pop - ] def - 0 1 bvals length 1 sub { % Pseudo-randomise based on codeword position - /p exch def - j p add 1 add 149 mul 255 mod 1 add bvals p get add - dup 256 ge {256 sub} if - bvals exch p exch put - } for - bvals addtocws - /mode A def - } bind def - - % Derive the codewords - /cws 1558 array def - /mode A def /i 0 def /j 0 def { - i msglen ge {exit} if - [ /encA /encCTX /encCTX /encCTX /encE /encB ] mode get load exec - } loop - /cws cws 0 j getinterval def + /cws cws 0 j getinterval def + + } if % encoding=auto % Extend codewords to fill symbol with pseudo-randomised pad characters /datlen cws length def @@ -15850,6 +19568,8 @@ begin } for } if + options /debugcws known { /bwipp.debugcws cws //raiseerror exec } if + % Lookup symbol metrics based on number of codewords and user specification /i 0 def { % loop /m metrics i get def @@ -15884,38 +19604,40 @@ begin } { i 7 le {/cwbsize 156 def} {/cwbsize 155 def} ifelse } ifelse - /cwb cwbsize array def + /cwb cwbsize array def 0 1 cwbsize 1 sub { /j exch def cwb j cws j rsbl mul i add get put - } for + } for cwbs i cwb put ecbs i [ rscw rsbl idiv {0} repeat ] put } for % Calculate the log and anti-log tables +{ /rsalog [ 1 255 { dup 2 mul dup 256 ge {301 xor} if } repeat ] def /rslog 256 array def 1 1 255 {dup rsalog exch get exch rslog 3 1 roll put} for +} ctxdef % Function to calculate the product in the field /rsprod { - 2 copy 0 ne exch 0 ne and { + 2 copy 0 ne exch 0 ne and { rslog exch get exch rslog exch get add 255 mod rsalog exch get } { pop pop 0 } ifelse - } bind def + } def % Generate the coefficients /coeffs [ 1 rscw rsbl idiv {0} repeat ] def 1 1 rscw rsbl idiv { - /i exch def + /i exch def coeffs i coeffs i 1 sub get put i 1 sub -1 1 { /j exch def coeffs j coeffs j 1 sub get coeffs j get rsalog i get rsprod xor put - } for + } for coeffs 0 coeffs 0 get rsalog i get rsprod put } for /coeffs coeffs 0 coeffs length 1 sub getinterval def @@ -15926,13 +19648,13 @@ begin /cwb cwbs i get def /ecb ecbs i get def 0 1 cwb length 1 sub { - /t exch cwb exch get ecb 0 get xor def + /t exch cwb exch get ecb 0 get xor def ecb length 1 sub -1 0 { /j exch def /p ecb length j sub 1 sub def ecb p t coeffs j get rsprod put j 0 gt { ecb p ecb p 1 add get ecb p get xor put } if - } for + } for } for } for @@ -15951,9 +19673,9 @@ begin % Place the codewords into the matrix /module { % cw row col shape - 4 -1 roll - (00000000) 8 string copy dup 3 -1 roll 2 8 string cvrs - dup length 8 exch sub exch putinterval + 4 -1 roll + (00000000) 8 string copy dup 3 -1 roll 2 8 string cvrs + dup length 8 exch sub exch putinterval 7 -1 0 {1 index exch get 48 sub exch} for pop 11 -3 roll % 1 2 4 8 16 32 64 128 row col shape @@ -15973,7 +19695,7 @@ begin exch mcols mul add mmat exch 5 -1 roll put } forall - } bind def + } def % Placement patterns /dmn [ @@ -15982,28 +19704,28 @@ begin { 2 copy exch 1 sub exch } bind { 2 copy 2 sub } bind { 2 copy 1 sub } bind { 2 copy } bind ] def - + /dmc1 [ { mrows 1 sub 0 } bind { mrows 1 sub 1 } bind { mrows 1 sub 2 } bind { 0 mcols 2 sub } bind { 0 mcols 1 sub } bind { 1 mcols 1 sub } bind { 2 mcols 1 sub } bind { 3 mcols 1 sub } bind ] def - + /dmc2 [ { mrows 3 sub 0 } bind { mrows 2 sub 0 } bind { mrows 1 sub 0 } bind { 0 mcols 4 sub } bind { 0 mcols 3 sub } bind { 0 mcols 2 sub } bind { 0 mcols 1 sub } bind { 1 mcols 1 sub } bind ] def - + /dmc3 [ { mrows 3 sub 0 } bind { mrows 2 sub 0 } bind { mrows 1 sub 0 } bind { 0 mcols 2 sub } bind { 0 mcols 1 sub } bind { 1 mcols 1 sub } bind { 2 mcols 1 sub } bind { 3 mcols 1 sub } bind ] def - + /dmc4 [ { mrows 1 sub 0 } bind { mrows 1 sub mcols 1 sub } bind { 0 mcols 3 sub } bind { 0 mcols 2 sub } bind @@ -16065,8 +19787,8 @@ begin /cwpos 0 def 0 1 rows 1 sub { /i exch def - i rrows 2 add mod 0 eq { pixs i cols mul [ cols 2 idiv {1 0} repeat ] putinterval } if - i rrows 2 add mod rrows 1 add eq { pixs i cols mul [ cols {1} repeat ] putinterval } if + i rrows 2 add mod 0 eq { pixs i cols mul [ cols 2 idiv {1 0} repeat ] putinterval } if + i rrows 2 add mod rrows 1 add eq { pixs i cols mul [ cols {1} repeat ] putinterval } if i rrows 2 add mod 0 ne i rrows 2 add mod rrows 1 add ne and { 0 1 cols 1 sub { /j exch def @@ -16077,7 +19799,7 @@ begin /cwpos cwpos 1 add def } if } for - } if + } if } for % Return the arguments @@ -16093,9 +19815,13 @@ begin dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /datamatrix dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -16104,15 +19830,15 @@ end % --END ENCODER datamatrix-- % --BEGIN ENCODER datamatrixrectangular-- -% --REQUIRES preamble raiseerror renmatrix datamatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix datamatrix-- % --DESC: Data Matrix Rectangular % --EXAM: 1234 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp datamatrixrectangular 0.0 2017040400 59583 59426 -%%BeginData: 43 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp datamatrixrectangular 0.0 2022082100 62617 62460 +%%BeginData: 46 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /datamatrix dup /uk.co.terryburton.bwipp findresource put @@ -16124,6 +19850,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def % Parse the input options @@ -16145,12 +19872,14 @@ begin args (opt) options put args - + dontdraw not //renmatrix if end -} bind def +} +[/barcode] {null def} forall +bind def /datamatrixrectangular dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -16158,17 +19887,181 @@ end %%EndResource % --END ENCODER datamatrixrectangular-- +% --BEGIN ENCODER datamatrixrectangularextension-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix datamatrix-- +% --DESC: Data Matrix Rectangular Extension +% --EXAM: 1234 +% --EXOP: version=8x96 +% --RNDR: renmatrix +%%BeginResource: uk.co.terryburton.bwipp datamatrixrectangularextension 0.0 2022082100 63804 63742 +%%BeginData: 56 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +20 dict +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +dup /datamatrix dup /uk.co.terryburton.bwipp findresource put +begin +/datamatrixrectangularextension { + + 20 dict begin + + /options exch def + /barcode exch def + + /ctx null def + /dontdraw false def + + /dmre false def + /dindmre false def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + % Get the result of encoding with datamatrix + options (dontdraw) true put + options (format) (rectangle) put + + dindmre dmre or not { % Default is (ISO) DMRE + options (dmre) true put + } { % Otherwise enable formats as given + options (dmre) dmre put % ISO + options (dindmre) dindmre put % DIN + } ifelse + + /args barcode options //datamatrix exec def + + args (opt) options put + args + + dontdraw not //renmatrix if + + end + +} +[/barcode] {null def} forall +bind def +/datamatrixrectangularextension dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER datamatrixrectangularextension-- + +% --BEGIN ENCODER mailmark-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix datamatrix-- +% --DESC: Royal Mail Mailmark +% --EXAM: JGB 012100123412345678AB19XY1A 0 www.xyz.com +% --EXOP: type=29 +% --RNDR: renmatrix +%%BeginResource: uk.co.terryburton.bwipp mailmark 0.0 2022082100 66101 65894 +%%BeginData: 81 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +dup /datamatrix dup /uk.co.terryburton.bwipp findresource put +begin +/mailmark { + + 20 dict begin % Confine variables to local scope + + /options exch def % We are given an option string + /barcode exch def % We are given a barcode string + + /ctx null def + /type (unset) def % 7, 9 or 29 + /parse false def + /dontdraw false def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + % Parse ordinals of the form ^NNN to ASCII + /fncvals << + /parse parse + /parseonly true + /parsefnc false + >> def + /barcode barcode fncvals //parseinput exec def + /barlen barcode length def + options (parse) undef + + % Map the given type to a format and version of Data Matrix + << + (7) (24x24) + (9) (32x32) + (29) (16x48) + >> /type load get /version exch def + + << + (7) (square) + (9) (square) + (29) (rectangle) + >> /type load get /format exch def + + % Validate the input + barcode length 45 lt { + /bwipp.mailmarkBadLength (Royal Mail Mailmark must contain at least 45 characters of Mailmark formatted data, including any required space padding) //raiseerror exec + } if + barcode 0 4 getinterval (JGB ) ne { + /bwipp.mailmarkBadIndicator (Royal Mail Mailmark must begin with JGB<space> identifier) //raiseerror exec + } if + + % Get the result of encoding with datamatrix + options (dontdraw) true put + options (version) version put + options (format) format put + options (mailmark) true put + /args barcode options //datamatrix exec def + + args (opt) options put + args + + dontdraw not //renmatrix if + + end + +} +[/barcode] {null def} forall +bind def +/mailmark dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER mailmark-- + % --BEGIN ENCODER qrcode-- -% --REQUIRES preamble raiseerror renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- % --DESC: QR Code % --EXAM: http://goo.gl/0bis % --EXOP: eclevel=M % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp qrcode 0.0 2017040400 322089 326433 -%%BeginData: 1028 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp qrcode 0.0 2022082100 320507 354887 +%%BeginData: 1369 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /qrcode { @@ -16178,10 +20071,11 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - /format (full) def % full or micro or any - /version (unset) def % 1-40 or M1-M4 - /eclevel (unset) def % L, M, Q or H + /format (unset) def % full or micro. rMQR symbols are specified using version + /version (unset) def % 1-40 or M1-M4 or R7x43, etc + /eclevel (unset) def % full: L, M, Q, H; micro: L, M, Q; rmqr: M, H /parse false def /parsefnc false def /mask -1 def @@ -16199,51 +20093,32 @@ begin /mask mask cvi def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if + /qrcode //loadctx exec - /barlen barcode length def + % If version is supplied and format is not given then set format to correspond + version (unset) ne { + format (unset) eq { + (full) + version 0 1 getinterval (M) eq { pop (micro) } if + version 0 1 getinterval (R) eq { pop (rmqr) } if + /format exch def + } if + } { + format (unset) eq { /format (full) def } if % Default to full + } ifelse - % Convert input into bytes accounting for FNC characters + % Default error correction level + eclevel (unset) eq {/eclevel format (micro) ne {(M)} {(L)} ifelse def} if + + % Parse the input /fn1 -1 def /fncvals << + /parse parse + /parsefnc parsefnc + /eci true (FNC1) fn1 >> def - /msg barlen array def - /i 0 def /j 0 def { - i barlen eq {exit} if - /char barcode i get def - parsefnc char 94 eq and i barlen 4 sub lt and { - barcode i 1 add get 94 ne { - /char fncvals barcode i 1 add 4 getinterval get def - /i i 4 add def - } { - /i i 1 add def - } ifelse - } if - msg j char put - /i i 1 add def - /j j 1 add def - } loop - /msg msg 0 j getinterval def + /msg barcode fncvals //parseinput exec def /msglen msg length def % If FNC1 in first position then escape % as %% @@ -16256,18 +20131,32 @@ begin } if } if - % Default error correction level - eclevel (unset) eq {/eclevel format (full) eq {(M)} {(L)} ifelse def} if +{ % context + + % Enumerate vergrps + [ + /v1to9 /v10to26 /v27to40 + /vM1 /vM2 /vM3 /vM4 + /vR7x43 /vR7x59 /vR7x77 /vR7x99 /vR7x139 + /vR9x43 /vR9x59 /vR9x77 /vR9x99 /vR9x139 + /vR11x27 /vR11x43 /vR11x59 /vR11x77 /vR11x99 /vR11x139 + /vR13x27 /vR13x43 /vR13x59 /vR13x77 /vR13x99 /vR13x139 + /vR15x43 /vR15x59 /vR15x77 /vR15x99 /vR15x139 + /vR17x43 /vR17x59 /vR17x77 /vR17x99 /vR17x139 + ] 0 exch {1 index def 1 add} forall pop % Convert from input into message bitstream - /N 0 def /A 1 def /B 2 def /K 3 def - + % + % Modes: (N)umeric, (A)lphanumeric, (B)yte, (K)anji, (E)CI + % + /N 0 def /A 1 def /B 2 def /K 3 def /E 4 def + /Nexcl << [ 16#30 1 16#39 {} for ] {-1} forall >> def - + /Aexcl << [ 16#20 16#24 16#25 16#2A 16#2B 16#2D 16#2E 16#2F 16#3A @@ -16275,61 +20164,104 @@ begin fn1 ] {-1} forall >> def - - /Bexcl << - [ - 16#00 1 16#1F {} for - 16#21 16#22 16#23 16#26 16#27 16#28 16#29 16#2C - 16#3B 1 16#40 {} for - 16#5B 1 16#7F {} for - 16#A0 1 16#DF {} for - ] {-1} forall - >> def - + + % Binary exclusives calculated from "not others" + /Kexcl << [ 16#81 1 16#9F {} for 16#E0 1 16#EB {} for ] {-1} forall >> def - - /mids [ % N A B K - [ (0001) (0010) (0100) (1000) ] % 1-9 - [ (0001) (0010) (0100) (1000) ] % 10-26 - [ (0001) (0010) (0100) (1000) ] % 27-40 - [ () -1 -1 -1 ] % M1 - [ (0) (1) -1 -1 ] % M2 - [ (00) (01) (10) (11) ] % M3 - [ (000) (001) (010) (011) ] % M4 + + /mids [ + % N A B K E + [ (0001) (0010) (0100) (1000) (0111) ] % v1to9 + [ (0001) (0010) (0100) (1000) (0111) ] % v10to26 + [ (0001) (0010) (0100) (1000) (0111) ] % v27to40 + [ () -1 -1 -1 -1 ] % vM1 + [ (0) (1) -1 -1 -1 ] % vM2 + [ (00) (01) (10) (11) -1 ] % vM3 + [ (000) (001) (010) (011) -1 ] % vM4 + 32 { + [ (001) (010) (011) (100) (111) ] % rMQR + } repeat ] def - + /cclens [ % N A B K - [ 10 9 8 8 ] % 1-9 - [ 12 11 16 10 ] % 10-26 - [ 14 13 16 12 ] % 27-40 - [ 3 -1 -1 -1 ] % M1 - [ 4 3 -1 -1 ] % M2 - [ 5 4 4 3 ] % M3 - [ 6 5 5 4 ] % M4 + [ 10 9 8 8 ] % v1to9 + [ 12 11 16 10 ] % v10to26 + [ 14 13 16 12 ] % v27to40 + [ 3 -1 -1 -1 ] % vM1 + [ 4 3 -1 -1 ] % vM2 + [ 5 4 4 3 ] % vM3 + [ 6 5 5 4 ] % vM4 + [ 4 3 3 2 ] % vR7x43 + [ 5 5 4 3 ] % vR7x59 + [ 6 5 5 4 ] % vR7x77 + [ 7 6 5 5 ] % vR7x99 + [ 7 6 6 5 ] % vR7x139 + [ 5 5 4 3 ] % vR9x43 + [ 6 5 5 4 ] % vR9x59 + [ 7 6 5 5 ] % vR9x77 + [ 7 6 6 5 ] % vR9x99 + [ 8 7 6 6 ] % vR9x139 + [ 4 4 3 2 ] % vR11x27 + [ 6 5 5 4 ] % vR11x43 + [ 7 6 5 5 ] % vR11x59 + [ 7 6 6 5 ] % vR11x77 + [ 8 7 6 6 ] % vR11x99 + [ 8 7 7 6 ] % vR11x139 + [ 5 5 4 3 ] % vR13x27 + [ 6 6 5 5 ] % vR13x43 + [ 7 6 6 5 ] % vR13x59 + [ 7 7 6 6 ] % vR13x77 + [ 8 7 7 6 ] % vR13x99 + [ 8 8 7 7 ] % vR13x139 + [ 7 6 6 5 ] % vR15x43 + [ 7 7 6 5 ] % vR15x59 + [ 8 7 7 6 ] % vR15x77 + [ 8 7 7 6 ] % vR15x99 + [ 9 8 7 7 ] % vR15x139 + [ 7 6 6 5 ] % vR17x43 + [ 8 7 6 6 ] % vR17x59 + [ 8 7 7 6 ] % vR17x77 + [ 8 8 7 6 ] % vR17x99 + [ 9 8 8 7 ] % vR17x139 ] def - - /termlens [ 4 4 4 3 5 7 9 ] def - - % Encoding functions - /tobin { - string dup length 1 sub 0 exch 1 exch {1 index exch 48 put} for - dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval - } bind def + + /termlens [ + 3 { + 4 % Full + } repeat + 3 % vM1 + 5 % vM2 + 7 % vM3 + 9 % vM4 + 32 { + 3 % rMQR + } repeat + ] def + + /padstrs [ (11101100) (00010001) ] def % Alphanumeric character to value map /charmap (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:) def /charvals 44 dict def 0 1 44 {dup charmap exch get exch charvals 3 1 roll put} for +} ctxdef + + % Encoding functions + /tobin { + string dup length 1 sub 0 exch 1 exch {1 index exch 48 put} for + dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval + } def + /encA { /in exch def fnc1first { % FNC1 as % - /in [ in { dup -1 eq {pop 37} if } forall ] def + /in [ in { dup fn1 eq {pop 37} if } forall ] def } if /out in length 11 mul 2 idiv 1 add string def /k 0 def /m 0 def { @@ -16345,8 +20277,8 @@ begin length m add /m exch def } loop out 0 m getinterval - } bind def - + } def + /encN { /in exch def /out in length 10 mul 3 idiv 1 add string def @@ -16368,12 +20300,12 @@ begin length m add /m exch def } loop out 0 m getinterval - } bind def - + } def + /encB { /in exch def fnc1first { % FNC1 as GS - /in [ in { dup -1 eq {pop 29} if } forall ] def + /in [ in { dup fn1 eq {pop 29} if } forall ] def } if /out in length 8 mul string def 0 1 in length 1 sub { @@ -16382,8 +20314,8 @@ begin out k 8 mul 3 -1 roll putinterval } for out - } bind def - + } def + /encK { /in exch def /out in length 2 idiv 13 mul string def @@ -16397,73 +20329,175 @@ begin /k k 2 add def } loop out - } bind def - - /encfuncs [ /encN /encA /encB /encK ] def - + } def + + /encE { + 0 get neg 1000000 sub + dup 000127 le { % ECI 000000 - 000127 + 8 tobin + } { dup 016383 le { % ECI 000128 - 016383 + 2#1000000000000000 add 16 tobin + } { % ECI 016384 - 999999 + 2#110000000000000000000000 add 24 tobin + } ifelse } ifelse + } def + + /encfuncs [ /encN /encA /encB /encK /encE ] def + /addtobits { dup bits j 3 -1 roll putinterval length j add /j exch def - } bind def - + } def + /numNs [ msglen {0} repeat 0 ] def /numAs [ msglen {0} repeat 0 ] def + /numAorNs [ msglen {0} repeat 0 ] def /numBs [ msglen {0} repeat 0 ] def - /numKs [ msglen {0} repeat -1 ] def + /numKs [ msglen {0} repeat 0 ] def /nextNs [ msglen {0} repeat 9999 ] def /nextBs [ msglen {0} repeat 9999 ] def /nextAs [ msglen {0} repeat 9999 ] def /nextKs [ msglen {0} repeat 9999 ] def + /isECI msglen array def msglen 1 sub -1 0 { /i exch def /barchar msg i get def Kexcl barchar known { - nextKs i 0 put - numKs i numKs i 1 add get 1 add put + /sjis i 1 add msglen lt { barchar 256 mul msg i 1 add get add } {0} ifelse def % Zero if last char + sjis 16#8140 ge sjis 16#9FFC le and sjis 16#E040 ge sjis 16#EBBF le and or { + nextKs i 0 put + numKs i numKs i 2 add get 1 add put + } { + nextKs i nextKs i 1 add get 1 add put + } ifelse } { nextKs i nextKs i 1 add get 1 add put } ifelse Nexcl barchar known { nextNs i 0 put numNs i numNs i 1 add get 1 add put + numAorNs i numAorNs i 1 add get 1 add put } { nextNs i nextNs i 1 add get 1 add put } ifelse - Bexcl barchar known { - nextBs i 0 put - numBs i numBs i 1 add get 1 add put - } { - nextBs i nextBs i 1 add get 1 add put - } ifelse Aexcl barchar known { nextAs i 0 put numAs i numAs i 1 add get 1 add put + numAorNs i numAorNs i 1 add get 1 add put } { nextAs i nextAs i 1 add get 1 add put } ifelse + isECI i barchar -1000000 le put } for - /numKs [ numKs {1 add 2 idiv} forall ] def - - /KbeforeB {numK exch ver get ge nextBs numK 2 mul i add get 0 eq and} bind def - /KbeforeA {numK exch ver get ge nextAs numK 2 mul i add get 0 eq and} bind def - /KbeforeN {numK exch ver get ge nextNs numK 2 mul i add get 0 eq and} bind def - /KbeforeE {numK exch ver get ge numK 2 mul i add msglen eq and} bind def - /AbeforeK {numA exch ver get ge nextKs numA i add get 0 eq and} bind def - /AbeforeB {numA exch ver get ge nextBs numA i add get 0 eq and} bind def - /AbeforeN {numA exch ver get ge nextNs numA i add get 0 eq and} bind def - /AbeforeE {numA exch ver get ge numA i add msglen eq and} bind def - /NbeforeK {numN exch ver get ge nextKs numN i add get 0 eq and} bind def - /NbeforeB {numN exch ver get ge nextBs numN i add get 0 eq and} bind def - /NbeforeA {numN exch ver get ge nextAs numN i add get 0 eq and} bind def - /NbeforeE {numN exch ver get ge numN i add msglen eq and} bind def - - % Encode unterminated bitsream for each version group separately - /msgbits [-1 -1 -1 -1 -1 -1 -1] def - /v1to9 0 def /v10to26 1 def /v27to40 2 def /vM1 3 def /vM2 4 def /vM3 5 def /vM4 6 def + 0 1 msglen 1 sub { % Scan forward to set any "2nd byte 1st byte" Kanji matches to zero + /i exch def + numKs i get 0 gt { + numKs i 1 add 0 put + nextKs i 1 add nextKs i 1 add get 1 add put + } if + } for + msglen 1 sub -1 0 { % Finally scan backwards again to set numBs/nextBs from "not others" + /i exch def + numNs i get numAs i get numKs i get add add 0 eq isECI i get not and { + nextBs i 0 put + numBs i numBs i 1 add get 1 add put + } { + nextBs i nextBs i 1 add get 1 add put + } ifelse + } for + + /KbeforeB {numK exch ver get ge nextBs numK 2 mul i add get 0 eq and} def + /KbeforeA {numK exch ver get ge nextAs numK 2 mul i add get 0 eq and} def + /KbeforeN {numK exch ver get ge nextNs numK 2 mul i add get 0 eq and} def + /KbeforeE {numK exch ver get ge numK 2 mul i add msglen eq and} def + /AbeforeK {numA exch ver get ge nextKs numA i add get 0 eq and} def + /AbeforeB {numA exch ver get ge nextBs numA i add get 0 eq and} def + /AbeforeN {numA exch ver get ge nextNs numA i add get 0 eq and} def + /AbeforeE {numA exch ver get ge numA i add msglen eq and} def + /NbeforeK {numN exch ver get ge nextKs numN i add get 0 eq and} def + /NbeforeB {numN exch ver get ge nextBs numN i add get 0 eq and} def + /NbeforeA {numN exch ver get ge nextAs numN i add get 0 eq and} def + /NbeforeE {numN exch ver get ge numN i add msglen eq and} def + /AorNbeforeB {numAorN exch ver get ge nextBs numAorN i add get 0 eq and} def + /AorNbeforeE {numAorN exch ver get ge numAorN i add msglen eq and} def + + /nextNslt { nextNs i get msglen ge { pop true } { numNs nextNs i get i add get exch ver get lt } ifelse } def + + % Elements of the encoded message have differing lengths based on the + % resulting symbol size. The symbol sizes with different element lengths + % are batched into vergrps. To pick the smallest symbol that holds our + % content we encode the message according to each available vergrp, based + % on the format of symbol. + + % Determine which groups we need to encode +{ + /versetmap << + % Full + 0 1 9 { 10 2 string cvrs v1to9 } for + 10 1 26 { 10 2 string cvrs v10to26 } for + 27 1 40 { 10 2 string cvrs v27to40 } for + + % Micro + (M1) vM1 (M2) vM2 (M3) vM3 (M4) vM4 + + % rMQR + (R7x43) vR7x43 (R7x59) vR7x59 (R7x77) vR7x77 (R7x99) vR7x99 (R7x139) vR7x139 + (R9x43) vR9x43 (R9x59) vR9x59 (R9x77) vR9x77 (R9x99) vR9x99 (R9x139) vR9x139 + (R11x27) vR11x27 (R11x43) vR11x43 (R11x59) vR11x59 (R11x77) vR11x77 (R11x99) vR11x99 (R11x139) vR11x139 + (R13x27) vR13x27 (R13x43) vR13x43 (R13x59) vR13x59 (R13x77) vR13x77 (R13x99) vR13x99 (R13x139) vR13x139 + (R15x43) vR15x43 (R15x59) vR15x59 (R15x77) vR15x77 (R15x99) vR15x99 (R15x139) vR15x139 + (R17x43) vR17x43 (R17x59) vR17x59 (R17x77) vR17x77 (R17x99) vR17x99 (R17x139) vR17x139 + >> def + /versetfull [v1to9 v10to26 v27to40] def + /versetmicro [vM1 vM2 vM3 vM4] def +} ctxdef + version (unset) ne { + % A specific version of symbol is given so encode in just the corresponding vergrp + /verset versetmap version get [ exch ] def + } { + % Just the format is specified so encode in each vergrp for the type of symbol + format (full) eq { /verset versetfull def } if + format (micro) eq { /verset versetmicro def } if + % rMQR symbols are accessed with an explicit version + } ifelse + + % Encode unterminated bitstream for each compatible vergrp separately + /msgbits [ 39 {-1} repeat ] def /e 10000 def - [v1to9 v10to26 v27to40 vM1 vM2 vM3 vM4] { + + % Number of before characters per vergrp, depending on current mode, for optimising modes + % Generated by contrib/development/build-qr-mode-optim-arrs.php + % Full Micro R7 R9 R11 R13 R15 R17 +{ + /mode0forceKB [ 1 1 1 e e 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] def + /mode0forceA [ 1 1 1 e 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] def + /mode0forceN [ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] def + + /mode0NbeforeB [ 4 4 5 e e 2 3 2 2 3 3 3 2 3 3 3 3 2 3 3 3 3 3 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3] def + + /modeBKbeforeB [ 9 12 13 e e 4 6 4 5 6 6 6 5 6 6 6 7 4 6 6 6 7 7 5 6 6 7 7 7 6 6 7 7 7 6 7 7 7 8] def + /modeBKbeforeA [ 8 10 11 e e 4 5 4 5 5 6 6 5 5 6 6 6 4 5 6 6 6 6 5 6 6 6 6 7 6 6 6 6 7 6 6 6 7 7] def + /modeBKbeforeN [ 8 9 11 e e 3 5 3 4 5 5 5 4 5 5 5 6 3 5 5 5 6 6 4 5 5 6 6 6 5 5 6 6 7 5 6 6 6 7] def + /modeBKbeforeE [ 5 5 6 e e 2 3 2 3 3 3 3 3 3 3 3 4 2 3 3 3 4 4 3 3 3 4 4 4 3 3 4 4 4 3 4 4 4 4] def + + /modeBAbeforeK [11 12 14 e e 5 7 5 6 7 8 8 6 7 8 8 8 6 7 8 8 8 8 6 8 8 8 8 9 8 8 8 8 9 8 8 8 9 9] def + /modeBAbeforeB [11 15 16 e e 6 7 6 7 7 8 8 7 7 8 8 8 6 7 8 8 8 9 7 8 8 8 9 9 8 8 9 9 9 8 8 9 9 10] def + /modeBAbeforeN [12 13 15 e e 6 8 6 7 8 8 8 7 8 8 8 9 6 8 8 8 9 9 7 8 8 9 9 10 8 9 9 9 10 8 9 9 10 10] def + /modeBAbeforeE [ 6 7 8 e e 3 4 3 4 4 4 4 4 4 4 4 5 4 4 4 4 5 5 4 4 4 5 5 5 4 5 5 5 5 4 5 5 5 5] def + + /modeBNbeforeK [ 6 7 8 e e 3 4 3 4 4 5 5 4 4 5 5 5 3 4 5 5 5 5 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5] def + /modeBNbeforeB [ 6 8 9 e e 3 4 3 4 4 5 5 4 4 5 5 5 3 4 5 5 5 5 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 6] def + /modeBNbeforeA [ 6 7 8 e e 3 4 3 4 4 5 5 4 4 5 5 5 4 4 5 5 5 5 4 5 5 5 5 5 5 5 5 5 6 5 5 5 5 6] def + /modeBNbeforeE [ 3 4 4 e e 2 3 2 2 3 3 3 2 3 3 3 3 2 3 3 3 3 3 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3] def + + /modeANbeforeA [13 15 17 e 5 7 9 7 8 9 9 9 8 9 9 9 11 7 9 9 9 11 11 8 9 9 10 11 11 9 10 11 11 11 9 11 11 11 11] def + /modeANbeforeB [13 17 18 e e 7 9 7 8 9 9 9 8 9 9 9 10 7 9 9 9 10 11 8 9 9 9 11 11 9 9 11 11 11 9 10 11 11 11] def + /modeANbeforeE [ 7 8 9 e 3 4 5 4 5 5 5 5 5 5 5 5 6 4 5 5 5 6 6 5 5 5 5 6 6 5 5 6 6 6 5 6 6 6 6] def +} ctxdef + + verset { /ver exch def - + % Derive optimal sequence /mode -1 def /seq [] def /i 0 def { i msglen ge {exit} if @@ -16471,51 +20505,60 @@ begin /numB numBs i get def /numA numAs i get def /numN numNs i get def + /numAorN numAorNs i get def + /eci isECI i get def ver vM1 eq numA 1 ge and {/seq -1 def exit} if ver vM1 eq numB 1 ge and {/seq -1 def exit} if ver vM1 eq numK 1 ge and {/seq -1 def exit} if + ver vM1 eq eci and {/seq -1 def exit} if ver vM2 eq numB 1 ge and {/seq -1 def exit} if ver vM2 eq numK 1 ge and {/seq -1 def exit} if + ver vM2 eq eci and {/seq -1 def exit} if + ver vM3 eq eci and {/seq -1 def exit} if + ver vM4 eq eci and {/seq -1 def exit} if { % common exit - mode -1 eq { % Set initial mode - [ 1 1 1 e e 1 1] KbeforeA {K exit} if - [ 1 1 1 e e 1 1] KbeforeN {K exit} if - [ 5 5 6 e e 2 3] KbeforeB {K exit} if - [ 1 1 1 e e 1 1] KbeforeE {K exit} if + eci { + E exit + } if + mode -1 eq { % Set initial mode (or mode after ECI) + mode0forceKB KbeforeA {K exit} if + mode0forceKB KbeforeN {K exit} if + modeBKbeforeE KbeforeB {K exit} if % Re-using modeB KbeforeE array + mode0forceKB KbeforeE {K exit} if numK 1 ge {B exit} if - [ 6 7 8 e e 3 4] AbeforeB {A exit} if - [ 1 1 1 e 1 1 1] AbeforeE {A exit} if - numA 1 ge { - ver vM2 ne {B} {A} ifelse exit - } if - [ 4 4 5 e e 2 3] NbeforeB {N exit} if - [ 1 1 1 e e 1 1] NbeforeB {B exit} if - [ 7 8 9 e 3 4 5] NbeforeA {N exit} if - [ 1 1 1 e 1 1 1] NbeforeA {A exit} if - numN 1 ge {N exit} if + mode0NbeforeB NbeforeB {N exit} if + mode0forceKB NbeforeB {B exit} if + modeANbeforeE NbeforeA {N exit} if % Re-using modeA NbeforeE array + mode0forceN NbeforeE {N exit} if + modeBAbeforeE AbeforeK {A exit} if % Re-using modeB AbeforeE array + modeBAbeforeE AorNbeforeB {A exit} if % Re-using modeB AbeforeE array + mode0forceA AorNbeforeE {A exit} if B exit } if mode B eq { - [ 9 12 13 e e 4 5] KbeforeB {K exit} if - [ 9 10 12 e e 4 5] KbeforeA {K exit} if - [ 9 10 11 e e 5 6] KbeforeN {K exit} if - [ 4 5 6 e e 2 3] KbeforeE {K exit} if - [11 12 14 e e 5 7] AbeforeK {A exit} if - [11 15 16 e e 6 7] AbeforeB {A exit} if - [12 13 15 e e 6 8] AbeforeN {A exit} if - [ 6 7 8 e e 3 4] AbeforeE {A exit} if - [ 6 7 8 e e 3 4] NbeforeK {N exit} if - [ 6 8 9 e e 3 4] NbeforeB {N exit} if - [ 6 7 8 e e 3 4] NbeforeA {N exit} if - [ 3 4 5 e e 2 3] NbeforeE {N exit} if + modeBKbeforeB KbeforeB {K exit} if + modeBKbeforeA KbeforeA {K exit} if + modeBKbeforeN KbeforeN {K exit} if + modeBKbeforeE KbeforeE {K exit} if + modeBAbeforeK AbeforeK {A exit} if + modeBAbeforeB AbeforeB {A exit} if + modeBAbeforeN AbeforeN {A exit} if + modeBAbeforeE AbeforeE {A exit} if + modeBNbeforeK NbeforeK {N exit} if + modeBNbeforeB NbeforeB {N exit} if + modeBNbeforeA NbeforeA {N exit} if + modeBNbeforeE NbeforeE {N exit} if + modeBAbeforeE AorNbeforeE numAorN modeBAbeforeN ver get le and { % If A/N sequence at end and short + modeBNbeforeA nextNslt {A exit} if % And next N sequence shorter than NbeforeA + } if B exit } if mode A eq { numK 1 ge {K exit} if numB 1 ge {B exit} if - [13 15 17 e 5 7 9] NbeforeA {N exit} if - [13 17 18 e e 7 9] NbeforeB {N exit} if - [ 7 8 9 e 3 4 5] NbeforeE {N exit} if + modeANbeforeA NbeforeA {N exit} if + modeANbeforeB NbeforeB {N exit} if + modeANbeforeE NbeforeE {N exit} if numA 1 ge numN 1 ge or {A exit} if B exit } if @@ -16548,6 +20591,7 @@ begin mode B eq {B msg i numB getinterval} if mode A eq {A msg i numA getinterval} if mode N eq {N msg i numN getinterval} if + mode E eq {E msg i 1 getinterval /mode -1 def} if /dat exch def /sw exch def /seq [ seq aload pop sw dat ] def } ifelse @@ -16559,18 +20603,23 @@ begin seq -1 eq {exit} if % Sequence not available /bits 23648 string def /j 0 def - fnc1first {(0101) addtobits} if + fnc1first { + ver vR7x43 lt { (0101) } { (101) } ifelse addtobits + } if /abort false def 0 2 seq length 1 sub { /i exch def /mode seq i get def mids ver get mode get addtobits - /cclen cclens ver get mode get def /chars seq i 1 add get def - chars length 2 cclen exp cvi ge { % Too many characters for cc indicator - /abort true def exit + /charslen chars length mode K eq {2 idiv} if def + mode E ne { + /cclen cclens ver get mode get def + charslen 2 cclen exp cvi ge { % Too many characters for cc indicator + /abort true def exit + } if + charslen cclen tobin addtobits } if - chars length mode K eq {2 idiv} if cclen tobin addtobits chars encfuncs mode get load exec addtobits } for abort {exit} if @@ -16581,81 +20630,118 @@ begin } forall % Lookup the most appropriate symbol specification +{ /metrics [ - % format vers vergrp size align modules error codewords error correction blocks - % L M Q H L1 L2 M1 M2 Q1 Q2 H1 H2 - [ (micro) (M1) vM1 11 98 99 36 [ 2 99 99 99 ] [ 1 0 -1 -1 -1 -1 -1 -1 ] ] - [ (micro) (M2) vM2 13 98 99 80 [ 5 6 99 99 ] [ 1 0 1 0 -1 -1 -1 -1 ] ] - [ (micro) (M3) vM3 15 98 99 132 [ 6 8 99 99 ] [ 1 0 1 0 -1 -1 -1 -1 ] ] - [ (micro) (M4) vM4 17 98 99 192 [ 8 10 14 99 ] [ 1 0 1 0 1 0 -1 -1 ] ] - [ (full) (1) v1to9 21 98 99 208 [ 7 10 13 17 ] [ 1 0 1 0 1 0 1 0 ] ] - [ (full) (2) v1to9 25 18 99 359 [ 10 16 22 28 ] [ 1 0 1 0 1 0 1 0 ] ] - [ (full) (3) v1to9 29 22 99 567 [ 15 26 36 44 ] [ 1 0 1 0 2 0 2 0 ] ] - [ (full) (4) v1to9 33 26 99 807 [ 20 36 52 64 ] [ 1 0 2 0 2 0 4 0 ] ] - [ (full) (5) v1to9 37 30 99 1079 [ 26 48 72 88 ] [ 1 0 2 0 2 2 2 2 ] ] - [ (full) (6) v1to9 41 34 99 1383 [ 36 64 96 112 ] [ 2 0 4 0 4 0 4 0 ] ] - [ (full) (7) v1to9 45 22 38 1568 [ 40 72 108 130 ] [ 2 0 4 0 2 4 4 1 ] ] - [ (full) (8) v1to9 49 24 42 1936 [ 48 88 132 156 ] [ 2 0 2 2 4 2 4 2 ] ] - [ (full) (9) v1to9 53 26 46 2336 [ 60 110 160 192 ] [ 2 0 3 2 4 4 4 4 ] ] - [ (full) (10) v10to26 57 28 50 2768 [ 72 130 192 224 ] [ 2 2 4 1 6 2 6 2 ] ] - [ (full) (11) v10to26 61 30 54 3232 [ 80 150 224 264 ] [ 4 0 1 4 4 4 3 8 ] ] - [ (full) (12) v10to26 65 32 58 3728 [ 96 176 260 308 ] [ 2 2 6 2 4 6 7 4 ] ] - [ (full) (13) v10to26 69 34 62 4256 [ 104 198 288 352 ] [ 4 0 8 1 8 4 12 4 ] ] - [ (full) (14) v10to26 73 26 46 4651 [ 120 216 320 384 ] [ 3 1 4 5 11 5 11 5 ] ] - [ (full) (15) v10to26 77 26 48 5243 [ 132 240 360 432 ] [ 5 1 5 5 5 7 11 7 ] ] - [ (full) (16) v10to26 81 26 50 5867 [ 144 280 408 480 ] [ 5 1 7 3 15 2 3 13 ] ] - [ (full) (17) v10to26 85 30 54 6523 [ 168 308 448 532 ] [ 1 5 10 1 1 15 2 17 ] ] - [ (full) (18) v10to26 89 30 56 7211 [ 180 338 504 588 ] [ 5 1 9 4 17 1 2 19 ] ] - [ (full) (19) v10to26 93 30 58 7931 [ 196 364 546 650 ] [ 3 4 3 11 17 4 9 16 ] ] - [ (full) (20) v10to26 97 34 62 8683 [ 224 416 600 700 ] [ 3 5 3 13 15 5 15 10 ] ] - [ (full) (21) v10to26 101 28 50 9252 [ 224 442 644 750 ] [ 4 4 17 0 17 6 19 6 ] ] - [ (full) (22) v10to26 105 26 50 10068 [ 252 476 690 816 ] [ 2 7 17 0 7 16 34 0 ] ] - [ (full) (23) v10to26 109 30 54 10916 [ 270 504 750 900 ] [ 4 5 4 14 11 14 16 14 ] ] - [ (full) (24) v10to26 113 28 54 11796 [ 300 560 810 960 ] [ 6 4 6 14 11 16 30 2 ] ] - [ (full) (25) v10to26 117 32 58 12708 [ 312 588 870 1050 ] [ 8 4 8 13 7 22 22 13 ] ] - [ (full) (26) v10to26 121 30 58 13652 [ 336 644 952 1110 ] [ 10 2 19 4 28 6 33 4 ] ] - [ (full) (27) v27to40 125 34 62 14628 [ 360 700 1020 1200 ] [ 8 4 22 3 8 26 12 28 ] ] - [ (full) (28) v27to40 129 26 50 15371 [ 390 728 1050 1260 ] [ 3 10 3 23 4 31 11 31 ] ] - [ (full) (29) v27to40 133 30 54 16411 [ 420 784 1140 1350 ] [ 7 7 21 7 1 37 19 26 ] ] - [ (full) (30) v27to40 137 26 52 17483 [ 450 812 1200 1440 ] [ 5 10 19 10 15 25 23 25 ] ] - [ (full) (31) v27to40 141 30 56 18587 [ 480 868 1290 1530 ] [ 13 3 2 29 42 1 23 28 ] ] - [ (full) (32) v27to40 145 34 60 19723 [ 510 924 1350 1620 ] [ 17 0 10 23 10 35 19 35 ] ] - [ (full) (33) v27to40 149 30 58 20891 [ 540 980 1440 1710 ] [ 17 1 14 21 29 19 11 46 ] ] - [ (full) (34) v27to40 153 34 62 22091 [ 570 1036 1530 1800 ] [ 13 6 14 23 44 7 59 1 ] ] - [ (full) (35) v27to40 157 30 54 23008 [ 570 1064 1590 1890 ] [ 12 7 12 26 39 14 22 41 ] ] - [ (full) (36) v27to40 161 24 50 24272 [ 600 1120 1680 1980 ] [ 6 14 6 34 46 10 2 64 ] ] - [ (full) (37) v27to40 165 28 54 25568 [ 630 1204 1770 2100 ] [ 17 4 29 14 49 10 24 46 ] ] - [ (full) (38) v27to40 169 32 58 26896 [ 660 1260 1860 2220 ] [ 4 18 13 32 48 14 42 32 ] ] - [ (full) (39) v27to40 173 26 54 28256 [ 720 1316 1950 2310 ] [ 20 4 40 7 43 22 10 67 ] ] - [ (full) (40) v27to40 177 30 58 29648 [ 750 1372 2040 2430 ] [ 19 6 18 31 34 34 20 61 ] ] + % format vers vergrp rows cols align modules error codewords error correction blocks + % L M Q H L1 L2 M1 M2 Q1 Q2 H1 H2 + [ (micro) (M1) vM1 11 11 98 99 36 [ 2 99 99 99 ] [ 1 0 -1 -1 -1 -1 -1 -1 ] ] + [ (micro) (M2) vM2 13 13 98 99 80 [ 5 6 99 99 ] [ 1 0 1 0 -1 -1 -1 -1 ] ] + [ (micro) (M3) vM3 15 15 98 99 132 [ 6 8 99 99 ] [ 1 0 1 0 -1 -1 -1 -1 ] ] + [ (micro) (M4) vM4 17 17 98 99 192 [ 8 10 14 99 ] [ 1 0 1 0 1 0 -1 -1 ] ] + [ (full) (1) v1to9 21 21 98 99 208 [ 7 10 13 17 ] [ 1 0 1 0 1 0 1 0 ] ] + [ (full) (2) v1to9 25 25 18 99 359 [ 10 16 22 28 ] [ 1 0 1 0 1 0 1 0 ] ] + [ (full) (3) v1to9 29 29 22 99 567 [ 15 26 36 44 ] [ 1 0 1 0 2 0 2 0 ] ] + [ (full) (4) v1to9 33 33 26 99 807 [ 20 36 52 64 ] [ 1 0 2 0 2 0 4 0 ] ] + [ (full) (5) v1to9 37 37 30 99 1079 [ 26 48 72 88 ] [ 1 0 2 0 2 2 2 2 ] ] + [ (full) (6) v1to9 41 41 34 99 1383 [ 36 64 96 112 ] [ 2 0 4 0 4 0 4 0 ] ] + [ (full) (7) v1to9 45 45 22 38 1568 [ 40 72 108 130 ] [ 2 0 4 0 2 4 4 1 ] ] + [ (full) (8) v1to9 49 49 24 42 1936 [ 48 88 132 156 ] [ 2 0 2 2 4 2 4 2 ] ] + [ (full) (9) v1to9 53 53 26 46 2336 [ 60 110 160 192 ] [ 2 0 3 2 4 4 4 4 ] ] + [ (full) (10) v10to26 57 57 28 50 2768 [ 72 130 192 224 ] [ 2 2 4 1 6 2 6 2 ] ] + [ (full) (11) v10to26 61 61 30 54 3232 [ 80 150 224 264 ] [ 4 0 1 4 4 4 3 8 ] ] + [ (full) (12) v10to26 65 65 32 58 3728 [ 96 176 260 308 ] [ 2 2 6 2 4 6 7 4 ] ] + [ (full) (13) v10to26 69 69 34 62 4256 [ 104 198 288 352 ] [ 4 0 8 1 8 4 12 4 ] ] + [ (full) (14) v10to26 73 73 26 46 4651 [ 120 216 320 384 ] [ 3 1 4 5 11 5 11 5 ] ] + [ (full) (15) v10to26 77 77 26 48 5243 [ 132 240 360 432 ] [ 5 1 5 5 5 7 11 7 ] ] + [ (full) (16) v10to26 81 81 26 50 5867 [ 144 280 408 480 ] [ 5 1 7 3 15 2 3 13 ] ] + [ (full) (17) v10to26 85 85 30 54 6523 [ 168 308 448 532 ] [ 1 5 10 1 1 15 2 17 ] ] + [ (full) (18) v10to26 89 89 30 56 7211 [ 180 338 504 588 ] [ 5 1 9 4 17 1 2 19 ] ] + [ (full) (19) v10to26 93 93 30 58 7931 [ 196 364 546 650 ] [ 3 4 3 11 17 4 9 16 ] ] + [ (full) (20) v10to26 97 97 34 62 8683 [ 224 416 600 700 ] [ 3 5 3 13 15 5 15 10 ] ] + [ (full) (21) v10to26 101 101 28 50 9252 [ 224 442 644 750 ] [ 4 4 17 0 17 6 19 6 ] ] + [ (full) (22) v10to26 105 105 26 50 10068 [ 252 476 690 816 ] [ 2 7 17 0 7 16 34 0 ] ] + [ (full) (23) v10to26 109 109 30 54 10916 [ 270 504 750 900 ] [ 4 5 4 14 11 14 16 14 ] ] + [ (full) (24) v10to26 113 113 28 54 11796 [ 300 560 810 960 ] [ 6 4 6 14 11 16 30 2 ] ] + [ (full) (25) v10to26 117 117 32 58 12708 [ 312 588 870 1050 ] [ 8 4 8 13 7 22 22 13 ] ] + [ (full) (26) v10to26 121 121 30 58 13652 [ 336 644 952 1110 ] [ 10 2 19 4 28 6 33 4 ] ] + [ (full) (27) v27to40 125 125 34 62 14628 [ 360 700 1020 1200 ] [ 8 4 22 3 8 26 12 28 ] ] + [ (full) (28) v27to40 129 129 26 50 15371 [ 390 728 1050 1260 ] [ 3 10 3 23 4 31 11 31 ] ] + [ (full) (29) v27to40 133 133 30 54 16411 [ 420 784 1140 1350 ] [ 7 7 21 7 1 37 19 26 ] ] + [ (full) (30) v27to40 137 137 26 52 17483 [ 450 812 1200 1440 ] [ 5 10 19 10 15 25 23 25 ] ] + [ (full) (31) v27to40 141 141 30 56 18587 [ 480 868 1290 1530 ] [ 13 3 2 29 42 1 23 28 ] ] + [ (full) (32) v27to40 145 145 34 60 19723 [ 510 924 1350 1620 ] [ 17 0 10 23 10 35 19 35 ] ] + [ (full) (33) v27to40 149 149 30 58 20891 [ 540 980 1440 1710 ] [ 17 1 14 21 29 19 11 46 ] ] + [ (full) (34) v27to40 153 153 34 62 22091 [ 570 1036 1530 1800 ] [ 13 6 14 23 44 7 59 1 ] ] + [ (full) (35) v27to40 157 157 30 54 23008 [ 570 1064 1590 1890 ] [ 12 7 12 26 39 14 22 41 ] ] + [ (full) (36) v27to40 161 161 24 50 24272 [ 600 1120 1680 1980 ] [ 6 14 6 34 46 10 2 64 ] ] + [ (full) (37) v27to40 165 165 28 54 25568 [ 630 1204 1770 2100 ] [ 17 4 29 14 49 10 24 46 ] ] + [ (full) (38) v27to40 169 169 32 58 26896 [ 660 1260 1860 2220 ] [ 4 18 13 32 48 14 42 32 ] ] + [ (full) (39) v27to40 173 173 26 54 28256 [ 720 1316 1950 2310 ] [ 20 4 40 7 43 22 10 67 ] ] + [ (full) (40) v27to40 177 177 30 58 29648 [ 750 1372 2040 2430 ] [ 19 6 18 31 34 34 20 61 ] ] + [ (rmqr) (R7x43) vR7x43 7 43 22 99 104 [ 99 7 99 10 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R7x59) vR7x59 7 59 20 40 171 [ 99 9 99 14 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R7x77) vR7x77 7 77 26 52 261 [ 99 12 99 22 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R7x99) vR7x99 7 99 24 50 358 [ 99 16 99 30 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R7x139) vR7x139 7 139 28 56 545 [ 99 24 99 44 ] [ -1 -1 1 0 -1 -1 2 0 ] ] + [ (rmqr) (R9x43) vR9x43 9 43 22 99 170 [ 99 9 99 14 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R9x59) vR9x59 9 59 20 40 267 [ 99 12 99 22 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R9x77) vR9x77 9 77 26 52 393 [ 99 18 99 32 ] [ -1 -1 1 0 -1 -1 1 1 ] ] + [ (rmqr) (R9x99) vR9x99 9 99 24 50 532 [ 99 24 99 44 ] [ -1 -1 1 0 -1 -1 2 0 ] ] + [ (rmqr) (R9x139) vR9x139 9 139 28 56 797 [ 99 36 99 66 ] [ -1 -1 1 1 -1 -1 3 0 ] ] + [ (rmqr) (R11x27) vR11x27 11 27 98 99 122 [ 99 8 99 10 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R11x43) vR11x43 11 43 22 99 249 [ 99 12 99 20 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R11x59) vR11x59 11 59 20 40 376 [ 99 16 99 32 ] [ -1 -1 1 0 -1 -1 1 1 ] ] + [ (rmqr) (R11x77) vR11x77 11 77 26 52 538 [ 99 24 99 44 ] [ -1 -1 1 0 -1 -1 1 1 ] ] + [ (rmqr) (R11x99) vR11x99 11 99 24 50 719 [ 99 32 99 60 ] [ -1 -1 1 1 -1 -1 1 1 ] ] + [ (rmqr) (R11x139) vR11x139 11 139 28 56 1062 [ 99 48 99 90 ] [ -1 -1 2 0 -1 -1 3 0 ] ] + [ (rmqr) (R13x27) vR13x27 13 27 98 99 172 [ 99 9 99 14 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R13x43) vR13x43 13 43 22 99 329 [ 99 14 99 28 ] [ -1 -1 1 0 -1 -1 1 0 ] ] + [ (rmqr) (R13x59) vR13x59 13 59 20 40 486 [ 99 22 99 40 ] [ -1 -1 1 0 -1 -1 2 0 ] ] + [ (rmqr) (R13x77) vR13x77 13 77 26 52 684 [ 99 32 99 56 ] [ -1 -1 1 1 -1 -1 1 1 ] ] + [ (rmqr) (R13x99) vR13x99 13 99 24 50 907 [ 99 40 99 78 ] [ -1 -1 1 1 -1 -1 1 2 ] ] + [ (rmqr) (R13x139) vR13x139 13 139 28 56 1328 [ 99 60 99 112 ] [ -1 -1 2 1 -1 -1 2 2 ] ] + [ (rmqr) (R15x43) vR15x43 15 43 22 99 409 [ 99 18 99 36 ] [ -1 -1 1 0 -1 -1 1 1 ] ] + [ (rmqr) (R15x59) vR15x59 15 59 20 40 596 [ 99 26 99 48 ] [ -1 -1 1 0 -1 -1 2 0 ] ] + [ (rmqr) (R15x77) vR15x77 15 77 26 52 830 [ 99 36 99 72 ] [ -1 -1 1 1 -1 -1 2 1 ] ] + [ (rmqr) (R15x99) vR15x99 15 99 24 50 1095 [ 99 48 99 88 ] [ -1 -1 2 0 -1 -1 4 0 ] ] + [ (rmqr) (R15x139) vR15x139 15 139 28 56 1594 [ 99 72 99 130 ] [ -1 -1 2 1 -1 -1 1 4 ] ] + [ (rmqr) (R17x43) vR17x43 17 43 22 99 489 [ 99 22 99 40 ] [ -1 -1 1 0 -1 -1 1 1 ] ] + [ (rmqr) (R17x59) vR17x59 17 59 20 40 706 [ 99 32 99 60 ] [ -1 -1 2 0 -1 -1 2 0 ] ] + [ (rmqr) (R17x77) vR17x77 17 77 26 52 976 [ 99 44 99 84 ] [ -1 -1 2 0 -1 -1 1 2 ] ] + [ (rmqr) (R17x99) vR17x99 17 99 24 50 1283 [ 99 60 99 104 ] [ -1 -1 2 1 -1 -1 4 0 ] ] + [ (rmqr) (R17x139) vR17x139 17 139 28 56 1860 [ 99 80 99 156 ] [ -1 -1 4 0 -1 -1 2 4 ] ] ] def +} ctxdef + /eclval (LMQH) eclevel search pop length exch pop exch pop def - 0 1 43 { + 0 1 metrics length 1 sub { /i exch def /m metrics i get def /frmt m 0 get def % Format of the symbol /vers m 1 get def % Version of symbol /vergrp m 2 get def % Version group - /size m 3 get def % Length of side - /asp2 m 4 get def % Position of second alignment symbol - /asp3 m 5 get def % Position of third alignment symbol - /nmod m 6 get def % Number of modules + /verind i 44 sub def % Version indicator for rMQR format info + /rows m 3 get def % Length of side + /cols m 4 get def % Length of side + /asp2 m 5 get def % Position of second alignment symbol + /asp3 m 6 get def % Position of third alignment symbol + /nmod m 7 get def % Number of modules /ncws nmod 8 idiv def % Total number of codewords /rbit nmod 8 mod def % Number of remainder bits /lc4b false def % Last data codeword is 4 bits long - size 11 eq size 15 eq or { % Adjustments for M1 and M3 symbols + vers (M1) eq vers (M3) eq or { % Adjustments for M1 and M3 symbols /ncws ncws 1 add def /rbit 0 def /lc4b true def } if - /ecws m 7 get eclval get def % Number of error correction codewords + /ecws m 8 get eclval get def % Number of error correction codewords /dcws ncws ecws sub def % Number of data codewords /dmod dcws 8 mul lc4b {4} {0} ifelse sub def % Number of data modules - /ecb1 m 8 get eclval 2 mul get def % First error correction blocks - /ecb2 m 8 get eclval 2 mul 1 add get def % Second error correction blocks + /ecb1 m 9 get eclval 2 mul get def % First error correction blocks + /ecb2 m 9 get eclval 2 mul 1 add get def % Second error correction blocks /okay true def - format (any) ne format frmt ne and {/okay false def} if % The format must match that supplied - frmt (micro) eq fnc1first and {/okay false def} if + format frmt ne {/okay false def} if % The format must match that supplied + frmt (micro) eq fnc1first and {/okay false def} if % FNC1 mode is only available in full and rmqr version (unset) ne version vers ne and {/okay false def} if % The version must match that supplied ecb1 -1 eq ecb2 -1 eq or {/okay false def} if % Error correction level must be valid /verbits msgbits vergrp get def @@ -16669,7 +20755,7 @@ begin } for okay not { - /bwipp.qrcodeNoValidSymbol (No valid symbol available) //raiseerror exec + /bwipp.qrcodeNoValidSymbol (Maximum length exceeded or invalid content) //raiseerror exec } if /format frmt def @@ -16678,7 +20764,7 @@ begin /dcpb dcws ecb1 ecb2 add idiv def % Base data codewords per block /ecpb ncws ecb1 ecb2 add idiv dcpb sub def % Error correction codewords per block - % Complete the message bits by adding the terminator, truncated if neccessary + % Complete the message bits by adding the terminator, truncated if necessary /term term 0 dmod msgbits length sub term length 2 copy gt {exch} if pop getinterval def msgbits length term length add string dup 0 msgbits putinterval @@ -16689,15 +20775,14 @@ begin /pad dmod string def 0 1 pad length 1 sub {pad exch 48 put} for pad 0 msgbits putinterval - /padstrs [ (11101100) (00010001) ] def /padnum 0 def msgbits length 8 div ceiling 8 mul cvi 8 dmod lc4b {5} {1} ifelse sub { - pad exch padstrs padnum get putinterval + pad exch padstrs padnum get putinterval /padnum padnum 1 add 2 mod def } for % Evaluate the padded message into codewords - /cws dcws array def + /cws dcws array def 0 1 cws length 1 sub { /c exch def /bpcw 8 def @@ -16707,36 +20792,40 @@ begin 0 1 bpcw 1 sub { /i exch def /cw cw 2 bpcw i sub 1 sub exp cvi cwb i get 48 sub mul add def - } for + } for cws c cw put - } for + } for % Short final data byte in M1 and M3 symbols has high-order value lc4b {cws cws length 1 sub 2 copy get 4 bitshift put} if + options /debugcws known { /bwipp.debugcws cws //raiseerror exec } if + % Calculate the log and anti-log tables +{ /rsalog [ 1 255 { dup 2 mul dup 256 ge {285 xor} if } repeat ] def /rslog 256 array def 1 1 255 {dup rsalog exch get exch rslog 3 1 roll put} for +} ctxdef % Function to calculate the product in the field /rsprod { - 2 copy 0 ne exch 0 ne and { + 2 copy 0 ne exch 0 ne and { rslog exch get exch rslog exch get add 255 mod rsalog exch get } { pop pop 0 } ifelse - } bind def + } def % Generate the coefficients for the Reed-Solomon algorithm /coeffs [ 1 ecpb {0} repeat ] def 0 1 ecpb 1 sub { - /i exch def + /i exch def coeffs i 1 add coeffs i get put i -1 1 { /j exch def coeffs j coeffs j 1 sub get coeffs j get rsalog i get rsprod xor put - } for + } for coeffs 0 coeffs 0 get rsalog i get rsprod put } for /coeffs coeffs 0 coeffs length 1 sub getinterval def @@ -16755,7 +20844,7 @@ begin } for } for rscws rsnd ecpb getinterval - } bind def + } def % Divide codewords into two groups of blocks and calculate the error correction codewords /dcwsb ecb1 ecb2 add array def @@ -16770,7 +20859,7 @@ begin dcwsb ecb1 i add cws ecb1 dcpb mul i dcpb 1 add mul add dcpb 1 add getinterval put ecwsb ecb1 i add dcwsb ecb1 i add get rscodes put } for - + % Reassemble the codewords /cws ncws array def /cw 0 def @@ -16792,7 +20881,7 @@ begin /cw cw 1 add def } for } for - + % Extend codewords by one if there are remainder bits rbit 0 gt { /pad cws length 1 add array def @@ -16800,10 +20889,10 @@ begin pad pad length 1 sub 0 put /cws pad def } if - + % Fixups for the short final data byte in M1 and M3 symbols lc4b { - cws dcws 1 sub 2 copy get -4 bitshift put + cws dcws 1 sub 2 copy get -4 bitshift put dcws 1 sub 1 ncws 2 sub { /i exch def cws i cws i get 15 and 4 bitshift put @@ -16812,11 +20901,49 @@ begin cws ncws 1 sub cws ncws 1 sub get 15 and 4 bitshift put } if + options /debugecc known { /bwipp.debugecc cws //raiseerror exec } if + % Create the bitmap - /pixs [ size size mul {-1} repeat ] def - /qmv {size mul add} bind def - + /pixs [ rows cols mul {-1} repeat ] def + /qmv {cols mul add} def + + % Timing patterns + format (full) eq { + 8 1 cols 9 sub { + /i exch def + pixs i 6 qmv i 1 add 2 mod put + pixs 6 i qmv i 1 add 2 mod put + } for + } if + format (micro) eq { + 8 1 cols 1 sub { + /i exch def + pixs i 0 qmv i 1 add 2 mod put + pixs 0 i qmv i 1 add 2 mod put + } for + } if + format (rmqr) eq { + 3 1 cols 4 sub { % Along top and bottom + /i exch def + pixs i 0 qmv i 1 add 2 mod put + pixs i rows 1 sub qmv i 1 add 2 mod put + } for + 3 1 rows 4 sub { % Along left and right + /i exch def + pixs 0 i qmv i 1 add 2 mod put + pixs cols 1 sub i qmv i 1 add 2 mod put + } for + asp2 1 sub asp3 asp2 sub cols 13 sub { % Down interior + /i exch def + 3 1 rows 4 sub { + /j exch def + pixs i j qmv j 1 add 2 mod put + } for + } for + } if + % Finder patterns +{ /fpat [ [ 1 1 1 1 1 1 1 0 ] [ 1 0 0 0 0 0 1 0 ] @@ -16827,27 +20954,77 @@ begin [ 1 1 1 1 1 1 1 0 ] [ 0 0 0 0 0 0 0 0 ] ] def - 0 1 fpat length 1 sub { + /fsubpat [ + [ 1 1 1 1 1 9 9 9 ] + [ 1 0 0 0 1 9 9 9 ] + [ 1 0 1 0 1 9 9 9 ] + [ 1 0 0 0 1 9 9 9 ] + [ 1 1 1 1 1 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + ] def + /fcorpat [ + [ 1 1 1 9 9 9 9 9 ] + [ 1 0 9 9 9 9 9 9 ] + [ 1 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + ] def + /fnullpat [ + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + [ 9 9 9 9 9 9 9 9 ] + ] def + /fpatmap << + % TL TR BL BR + (full) [ fpat fpat fpat fnullpat ] + (micro) [ fpat fnullpat fnullpat fnullpat ] + (rmqr) [ fpat fcorpat fcorpat fsubpat ] + >> def +} ctxdef + /fpats fpatmap format get def + 0 1 7 { /y exch def - 0 1 fpat 0 get length 1 sub { + 0 1 7 { /x exch def - /fpb fpat y get x get def - pixs x y qmv fpb put - format (full) eq { - pixs size x sub 1 sub y qmv fpb put - pixs x size y sub 1 sub qmv fpb put - } if + /fpb0 fpats 0 get y get x get def + /fpb1 fpats 1 get y get x get def + /fpb2 fpats 2 get y get x get def + /fpb3 fpats 3 get y get x get def + fpb0 9 ne y rows lt and {pixs x y qmv fpb0 put} if + fpb1 9 ne {pixs cols x sub 1 sub y qmv fpb1 put} if + fpb2 9 ne {pixs x rows y sub 1 sub qmv fpb2 put} if + fpb3 9 ne {pixs cols x sub 1 sub rows y sub 1 sub qmv fpb3 put} if } for } for - + % Alignment patterns - /algnpat [ +{ + /algnpatfull [ [ 1 1 1 1 1 ] [ 1 0 0 0 1 ] [ 1 0 1 0 1 ] [ 1 0 0 0 1 ] [ 1 1 1 1 1 ] ] def + /algnpatrmqr [ + [ 1 1 1 9 9 ] + [ 1 0 1 9 9 ] + [ 1 1 1 9 9 ] + [ 9 9 9 9 9 ] + [ 9 9 9 9 9 ] + ] def +} ctxdef + /putalgnpat { /py exch def /px exch def @@ -16855,70 +21032,79 @@ begin /pb exch def 0 1 4 { /pa exch def - pixs px pa add py pb add qmv algnpat pb get pa get put + /algnb algnpat pb get pa get def + algnb 9 ne { + pixs px pa add py pb add qmv algnb put + } if } for } for - } bind def - asp2 2 sub asp3 asp2 sub size 13 sub { - /i exch def - i 4 putalgnpat - 4 i putalgnpat - } for - asp2 2 sub asp3 asp2 sub size 9 sub { - /x exch def - asp2 2 sub asp3 asp2 sub size 9 sub { - /y exch def - x y putalgnpat - } for - } for - - % Timing patterns + } def format (full) eq { - 8 1 size 9 sub { + /algnpat algnpatfull def + asp2 2 sub asp3 asp2 sub cols 13 sub { /i exch def - pixs i 6 qmv i 1 add 2 mod put - pixs 6 i qmv i 1 add 2 mod put + i 4 putalgnpat + 4 i putalgnpat } for - } { - 8 1 size 1 sub { + asp2 2 sub asp3 asp2 sub cols 9 sub { + /x exch def + asp2 2 sub asp3 asp2 sub rows 9 sub { + /y exch def + x y putalgnpat + } for + } for + } if + format (rmqr) eq { + /algnpat algnpatrmqr def + asp2 2 sub asp3 asp2 sub cols 13 sub { /i exch def - pixs i 0 qmv i 1 add 2 mod put - pixs 0 i qmv i 1 add 2 mod put + i 0 putalgnpat + i rows 3 sub putalgnpat } for - } ifelse - + } if + % Format information modules - format (full) eq { - /formatmap [ - [ [ 0 8 ] [ 8 size 1 sub ] ] [ [ 1 8 ] [ 8 size 2 sub ] ] [ [ 2 8 ] [ 8 size 3 sub ] ] - [ [ 3 8 ] [ 8 size 4 sub ] ] [ [ 4 8 ] [ 8 size 5 sub ] ] [ [ 5 8 ] [ 8 size 6 sub ] ] - [ [ 7 8 ] [ 8 size 7 sub ] ] [ [ 8 8 ] [ size 8 sub 8 ] ] [ [ 8 7 ] [ size 7 sub 8 ] ] - [ [ 8 5 ] [ size 6 sub 8 ] ] [ [ 8 4 ] [ size 5 sub 8 ] ] [ [ 8 3 ] [ size 4 sub 8 ] ] - [ [ 8 2 ] [ size 3 sub 8 ] ] [ [ 8 1 ] [ size 2 sub 8 ] ] [ [ 8 0 ] [ size 1 sub 8 ] ] - ] def - } { - /formatmap [ +{ + /formatmapmicro [ [ [ 1 8 ] ] [ [ 2 8 ] ] [ [ 3 8 ] ] [ [ 4 8 ] ] [ [ 5 8 ] ] [ [ 6 8 ] ] [ [ 7 8 ] ] [ [ 8 8 ] ] [ [ 8 7 ] ] [ [ 8 6 ] ] [ [ 8 5 ] ] [ [ 8 4 ] ] [ [ 8 3 ] ] [ [ 8 2 ] ] [ [ 8 1 ] ] - ] def - } ifelse + ] def +} ctxdef + /formatmap << + (full) [ + [ [ 0 8 ] [ 8 cols 1 sub ] ] [ [ 1 8 ] [ 8 cols 2 sub ] ] [ [ 2 8 ] [ 8 cols 3 sub ] ] + [ [ 3 8 ] [ 8 cols 4 sub ] ] [ [ 4 8 ] [ 8 cols 5 sub ] ] [ [ 5 8 ] [ 8 cols 6 sub ] ] + [ [ 7 8 ] [ 8 cols 7 sub ] ] [ [ 8 8 ] [ cols 8 sub 8 ] ] [ [ 8 7 ] [ cols 7 sub 8 ] ] + [ [ 8 5 ] [ cols 6 sub 8 ] ] [ [ 8 4 ] [ cols 5 sub 8 ] ] [ [ 8 3 ] [ cols 4 sub 8 ] ] + [ [ 8 2 ] [ cols 3 sub 8 ] ] [ [ 8 1 ] [ cols 2 sub 8 ] ] [ [ 8 0 ] [ cols 1 sub 8 ] ] + ] + (micro) formatmapmicro + (rmqr) [ + [ [ 11 3 ] [ cols 3 sub rows 6 sub ] ] [ [ 11 2 ] [ cols 4 sub rows 6 sub ] ] [ [ 11 1 ] [ cols 5 sub rows 6 sub ] ] + [ [ 10 5 ] [ cols 6 sub rows 2 sub ] ] [ [ 10 4 ] [ cols 6 sub rows 3 sub ] ] [ [ 10 3 ] [ cols 6 sub rows 4 sub ] ] + [ [ 10 2 ] [ cols 6 sub rows 5 sub ] ] [ [ 10 1 ] [ cols 6 sub rows 6 sub ] ] [ [ 9 5 ] [ cols 7 sub rows 2 sub ] ] + [ [ 9 4 ] [ cols 7 sub rows 3 sub ] ] [ [ 9 3 ] [ cols 7 sub rows 4 sub ] ] [ [ 9 2 ] [ cols 7 sub rows 5 sub ] ] + [ [ 9 1 ] [ cols 7 sub rows 6 sub ] ] [ [ 8 5 ] [ cols 8 sub rows 2 sub ] ] [ [ 8 4 ] [ cols 8 sub rows 3 sub ] ] + [ [ 8 3 ] [ cols 8 sub rows 4 sub ] ] [ [ 8 2 ] [ cols 8 sub rows 5 sub ] ] [ [ 8 1 ] [ cols 8 sub rows 6 sub ] ] + ] + >> format get def formatmap { - { {} forall qmv pixs exch 0 put } forall + { {} forall qmv pixs exch 1 put } forall } forall - + % Version information modules - size 45 ge { + format (full) eq cols 45 ge and { /versionmap [ - [ [ size 9 sub 5 ] [ 5 size 9 sub ] ] [ [ size 10 sub 5 ] [ 5 size 10 sub ] ] - [ [ size 11 sub 5 ] [ 5 size 11 sub ] ] [ [ size 9 sub 4 ] [ 4 size 9 sub ] ] - [ [ size 10 sub 4 ] [ 4 size 10 sub ] ] [ [ size 11 sub 4 ] [ 4 size 11 sub ] ] - [ [ size 9 sub 3 ] [ 3 size 9 sub ] ] [ [ size 10 sub 3 ] [ 3 size 10 sub ] ] - [ [ size 11 sub 3 ] [ 3 size 11 sub ] ] [ [ size 9 sub 2 ] [ 2 size 9 sub ] ] - [ [ size 10 sub 2 ] [ 2 size 10 sub ] ] [ [ size 11 sub 2 ] [ 2 size 11 sub ] ] - [ [ size 9 sub 1 ] [ 1 size 9 sub ] ] [ [ size 10 sub 1 ] [ 1 size 10 sub ] ] - [ [ size 11 sub 1 ] [ 1 size 11 sub ] ] [ [ size 9 sub 0 ] [ 0 size 9 sub ] ] - [ [ size 10 sub 0 ] [ 0 size 10 sub ] ] [ [ size 11 sub 0 ] [ 0 size 11 sub ] ] + [ [ cols 9 sub 5 ] [ 5 cols 9 sub ] ] [ [ cols 10 sub 5 ] [ 5 cols 10 sub ] ] + [ [ cols 11 sub 5 ] [ 5 cols 11 sub ] ] [ [ cols 9 sub 4 ] [ 4 cols 9 sub ] ] + [ [ cols 10 sub 4 ] [ 4 cols 10 sub ] ] [ [ cols 11 sub 4 ] [ 4 cols 11 sub ] ] + [ [ cols 9 sub 3 ] [ 3 cols 9 sub ] ] [ [ cols 10 sub 3 ] [ 3 cols 10 sub ] ] + [ [ cols 11 sub 3 ] [ 3 cols 11 sub ] ] [ [ cols 9 sub 2 ] [ 2 cols 9 sub ] ] + [ [ cols 10 sub 2 ] [ 2 cols 10 sub ] ] [ [ cols 11 sub 2 ] [ 2 cols 11 sub ] ] + [ [ cols 9 sub 1 ] [ 1 cols 9 sub ] ] [ [ cols 10 sub 1 ] [ 1 cols 10 sub ] ] + [ [ cols 11 sub 1 ] [ 1 cols 11 sub ] ] [ [ cols 9 sub 0 ] [ 0 cols 9 sub ] ] + [ [ cols 10 sub 0 ] [ 0 cols 10 sub ] ] [ [ cols 11 sub 0 ] [ 0 cols 11 sub ] ] ] def } { /versionmap [] def @@ -16929,29 +21115,31 @@ begin % Reserve the solitary dark module in full symbols format (full) eq { - pixs 8 size 8 sub qmv 0 put + pixs 8 rows 8 sub qmv 0 put } if % Calculate the mask patterns - format (full) eq { - /maskfuncs [ - {add 2 mod} bind - {exch pop 2 mod} bind - {pop 3 mod} bind - {add 3 mod} bind - {2 idiv exch 3 idiv add 2 mod} bind - {mul dup 2 mod exch 3 mod add} bind - {mul dup 2 mod exch 3 mod add 2 mod} bind - {2 copy mul 3 mod 3 1 roll add 2 mod add 2 mod} bind - ] def - } { - /maskfuncs [ - {exch pop 2 mod} bind - {2 idiv exch 3 idiv add 2 mod} bind - {mul dup 2 mod exch 3 mod add 2 mod} bind - {2 copy mul 3 mod 3 1 roll add 2 mod add 2 mod} bind - ] def - } ifelse + /maskfuncs << + (full) [ + {add 2 mod} + {exch pop 2 mod} + {pop 3 mod} + {add 3 mod} + {2 idiv exch 3 idiv add 2 mod} + {mul dup 2 mod exch 3 mod add} + {mul dup 2 mod exch 3 mod add 2 mod} + {2 copy mul 3 mod 3 1 roll add 2 mod add 2 mod} + ] + (micro) [ + {exch pop 2 mod} + {2 idiv exch 3 idiv add 2 mod} + {mul dup 2 mod exch 3 mod add 2 mod} + {2 copy mul 3 mod 3 1 roll add 2 mod add 2 mod} + ] + (rmqr) [ + {2 idiv exch 3 idiv add 2 mod} + ] + >> format get def mask -1 ne { % User specifies a mask /maskfuncs [maskfuncs mask 1 sub get] def /bestmaskval mask 1 sub def @@ -16959,22 +21147,22 @@ begin /masks maskfuncs length array def 0 1 masks length 1 sub { /m exch def - /mask size size mul array def - 0 1 size 1 sub { + /mask rows cols mul array def + 0 1 rows 1 sub { /j exch def - 0 1 size 1 sub { + 0 1 cols 1 sub { /i exch def - i j maskfuncs m get exec 0 eq + i j maskfuncs m get exec 0 eq pixs i j qmv get -1 eq and {1} {0} ifelse mask i j qmv 3 -1 roll put } for } for masks m mask put } for - + % Walk the symbol placing the bitstream - /posx size 1 sub def - /posy size 1 sub def + /posx cols format (rmqr) ne {1} {2} ifelse sub def + /posy rows 1 sub def /dir -1 def % -1 is upwards, 1 is downwards /col 1 def % 0 is left bit, 1 is right bit /num 0 def @@ -16990,9 +21178,9 @@ begin /posx posx 1 sub def } { /col 1 def - /posx posx 1 add def + /posx posx 1 add def /posy posy dir add def - posy 0 lt posy size ge or { % Turn around at top and bottom + posy 0 lt posy rows ge or { % Turn around at top and bottom /dir dir -1 mul def /posy posy dir add def /posx posx 2 sub def @@ -17025,23 +21213,23 @@ begin } if } for scr1 scr3 - } bind def - + } def + % Evaluation algorithm for full symbols /evalfull { /sym exch def /n1 0 def /n2 0 def /n3 0 def - /rle size 1 add array def - /lastpairs size array def - /thispairs size array def - /sizeadd1 size 1 add def - 0 1 size 1 sub { + /rle cols 1 add array def + /lastpairs cols array def + /thispairs cols array def + /colsadd1 cols 1 add def + 0 1 cols 1 sub { /i exch def % Runlength encode (light, dark, light, ...) and evaluate each column mark 0 0 - i size dup dup mul 1 sub { + i cols dup dup mul 1 sub { sym exch get exch 1 index eq {exch 1 add exch} {1 exch} ifelse } for pop @@ -17050,11 +21238,11 @@ begin pop % Runlength encode (light, dark, light, ...) and evaluate each row - /symrow sym i size mul size getinterval def - mark 0 0 - symrow { + /symrow sym i cols mul cols getinterval def + mark 0 0 + symrow { exch 1 index eq {exch 1 add exch} {1 exch} ifelse - } forall + } forall pop rle 0 counttomark 2 sub getinterval astore evalfulln1n3 n3 add /n3 exch def n1 add /n1 exch def @@ -17069,52 +21257,52 @@ begin i 0 gt { mark lastpairs aload pop thispairs aload pop - n2 size { exch sizeadd1 index add 3 and 0 eq {3 add} if } repeat + n2 cols { exch colsadd1 index add 3 and 0 eq {3 add} if } repeat /n2 exch def cleartomark } if } for - - % Score dark/light imbalance + + % Score dark/light imbalance /dark 0 sym {add} forall def - /n4 dark 100 mul size dup mul div 50 sub abs 5 div cvi 10 mul def + /n4 dark 100 mul cols dup mul div 50 sub abs 5 div cvi 10 mul def n1 n2 add n3 add n4 add - } bind def - + } def + % Evaluation algorithm for micro symbols /evalmicro { /sym exch def /dkrhs 0 def /dkbot 0 def - 1 1 size 1 sub { + 1 1 cols 1 sub { /i exch def - /dkrhs dkrhs sym size 1 sub i qmv get add def - /dkbot dkbot sym i size 1 sub qmv get add def + /dkrhs dkrhs sym cols 1 sub i qmv get add def + /dkbot dkbot sym i cols 1 sub qmv get add def } for dkrhs dkbot le { dkrhs 16 mul dkbot add neg } { dkbot 16 mul dkrhs add neg } ifelse - } bind def - + } def + % Evaluate the masked symbols to find the most suitable /bestscore 999999999 def 0 1 masks length 1 sub { /m exch def - /masksym size size mul array def - 0 1 size size mul 1 sub { + /masksym rows cols mul array def + 0 1 rows cols mul 1 sub { /i exch def masksym i pixs i get masks m get i get xor put } for - masks length 1 ne { + masks length 1 ne { % Not rMQR nor user-specified mask format (full) eq { masksym evalfull /score exch def } { masksym evalmicro /score exch def } ifelse - score bestscore lt { + score bestscore lt { /bestsym masksym def /bestmaskval m def /bestscore score def @@ -17127,46 +21315,85 @@ begin % Set the solitary dark module in full symbols format (full) eq { - pixs 8 size 8 sub qmv 1 put + pixs 8 cols 8 sub qmv 1 put } if % Add the format information +{ + /fmtvalsfull [ + 16#5412 16#5125 16#5e7c 16#5b4b 16#45f9 16#40ce 16#4f97 16#4aa0 + 16#77c4 16#72f3 16#7daa 16#789d 16#662f 16#6318 16#6c41 16#6976 + 16#1689 16#13be 16#1ce7 16#19d0 16#0762 16#0255 16#0d0c 16#083b + 16#355f 16#3068 16#3f31 16#3a06 16#24b4 16#2183 16#2eda 16#2bed + ] def + /fmtvalsmicro [ + 16#4445 16#4172 16#4e2b 16#4b1c 16#55ae 16#5099 16#5fc0 16#5af7 + 16#6793 16#62a4 16#6dfd 16#68ca 16#7678 16#734f 16#7c16 16#7921 + 16#06de 16#03e9 16#0cb0 16#0987 16#1735 16#1202 16#1d5b 16#186c + 16#2508 16#203f 16#2f66 16#2a51 16#34e3 16#31d4 16#3e8d 16#3bba + ] def + /fmtvalsrmqr1 [ + 16#1fab2 16#1e597 16#1dbdd 16#1c4f8 16#1b86c 16#1a749 16#19903 16#18626 + 16#17f0e 16#1602b 16#15e61 16#14144 16#13dd0 16#122f5 16#11cbf 16#1039a + 16#0f1ca 16#0eeef 16#0d0a5 16#0cf80 16#0b314 16#0ac31 16#0927b 16#08d5e + 16#07476 16#06b53 16#05519 16#04a3c 16#036a8 16#0298d 16#017c7 16#008e2 + 16#3f367 16#3ec42 16#3d208 16#3cd2d 16#3b1b9 16#3ae9c 16#390d6 16#38ff3 + 16#376db 16#369fe 16#357b4 16#34891 16#33405 16#32b20 16#3156a 16#30a4f + 16#2f81f 16#2e73a 16#2d970 16#2c655 16#2bac1 16#2a5e4 16#29bae 16#2848b + 16#27da3 16#26286 16#25ccc 16#243e9 16#23f7d 16#22058 16#21e12 16#20137 + ] def + /fmtvalsrmqr2 [ + 16#20a7b 16#2155e 16#22b14 16#23431 16#248a5 16#25780 16#269ca 16#276ef + 16#28fc7 16#290e2 16#2aea8 16#2b18d 16#2cd19 16#2d23c 16#2ec76 16#2f353 + 16#30103 16#31e26 16#3206c 16#33f49 16#343dd 16#35cf8 16#362b2 16#37d97 + 16#384bf 16#39b9a 16#3a5d0 16#3baf5 16#3c661 16#3d944 16#3e70e 16#3f82b + 16#003ae 16#01c8b 16#022c1 16#03de4 16#04170 16#05e55 16#0601f 16#07f3a + 16#08612 16#09937 16#0a77d 16#0b858 16#0c4cc 16#0dbe9 16#0e5a3 16#0fa86 + 16#108d6 16#117f3 16#129b9 16#1369c 16#14a08 16#1552d 16#16b67 16#17442 + 16#18d6a 16#1924f 16#1ac05 16#1b320 16#1cfb4 16#1d091 16#1eedb 16#1f1fe + ] def +} ctxdef format (full) eq { - /fmtvals [ - 16#5412 16#5125 16#5e7c 16#5b4b 16#45f9 16#40ce 16#4f97 16#4aa0 - 16#77c4 16#72f3 16#7daa 16#789d 16#662f 16#6318 16#6c41 16#6976 - 16#1689 16#13be 16#1ce7 16#19d0 16#0762 16#0255 16#0d0c 16#083b - 16#355f 16#3068 16#3f31 16#3a06 16#24b4 16#2183 16#2eda 16#2bed - ] def /ecid (MLHQ) eclevel search pop length exch pop exch pop def - /fmtval fmtvals ecid 3 bitshift bestmaskval add get def - } { - /fmtvals [ - 16#4445 16#4172 16#4e2b 16#4b1c 16#55ae 16#5099 16#5fc0 16#5af7 - 16#6793 16#62a4 16#6dfd 16#68ca 16#7678 16#734f 16#7c16 16#7921 - 16#06de 16#03e9 16#0cb0 16#0987 16#1735 16#1202 16#1d5b 16#186c - 16#2508 16#203f 16#2f66 16#2a51 16#34e3 16#31d4 16#3e8d 16#3bba - ] def - /symid [ [0] [1 2] [3 4] [5 6 7] ] size 11 sub 2 idiv get eclval get def - /fmtval fmtvals symid 2 bitshift bestmaskval add get def - } ifelse - 0 1 formatmap length 1 sub { - /i exch def - formatmap i get { - pixs exch {} forall qmv fmtval 14 i sub neg bitshift 1 and put - } forall - } for - + /fmtval fmtvalsfull ecid 3 bitshift bestmaskval add get def + 0 1 formatmap length 1 sub { + /i exch def + formatmap i get { + pixs exch aload pop qmv fmtval 14 i sub neg bitshift 1 and put + } forall + } for + } if + format (micro) eq { + /symid [ [0] [1 2] [3 4] [5 6 7] ] cols 11 sub 2 idiv get eclval get def + /fmtval fmtvalsmicro symid 2 bitshift bestmaskval add get def + 0 1 formatmap length 1 sub { + /i exch def + pixs formatmap i get 0 get aload pop qmv fmtval 14 i sub neg bitshift 1 and put + } for + } if + format (rmqr) eq { + /fmtvalu (MH) eclevel search pop length exch pop exch pop 5 bitshift verind add def + /fmtval1 fmtvalsrmqr1 fmtvalu get def + /fmtval2 fmtvalsrmqr2 fmtvalu get def + 0 1 formatmap length 1 sub { + /i exch def + pixs formatmap i get 0 get aload pop qmv fmtval1 17 i sub neg bitshift 1 and put + pixs formatmap i get 1 get aload pop qmv fmtval2 17 i sub neg bitshift 1 and put + } for + } if + % Add the version information - size 45 ge { - /vervals [ - 16#07c94 16#085bc 16#09a99 16#0a4d3 16#0bbf6 16#0c762 16#0d847 - 16#0e60d 16#0f928 16#10b78 16#1145d 16#12a17 16#13532 16#149a6 - 16#15683 16#168c9 16#177ec 16#18ec4 16#191e1 16#1afab 16#1b08e - 16#1cc1a 16#1d33f 16#1ed75 16#1f250 16#209d5 16#216fd 16#228ba - 16#2379f 16#24b0b 16#2542e 16#26a64 16#27541 16#28c69 - ] def - /verval vervals size 17 sub 4 idiv 7 sub get def +{ + /vervals [ + 16#07c94 16#085bc 16#09a99 16#0a4d3 16#0bbf6 16#0c762 16#0d847 + 16#0e60d 16#0f928 16#10b78 16#1145d 16#12a17 16#13532 16#149a6 + 16#15683 16#168c9 16#177ec 16#18ec4 16#191e1 16#1afab 16#1b08e + 16#1cc1a 16#1d33f 16#1ed75 16#1f250 16#209d5 16#216fd 16#228ba + 16#2379f 16#24b0b 16#2542e 16#26a64 16#27541 16#28c69 + ] def +} ctxdef + format (full) eq cols 45 ge and { + /verval vervals cols 17 sub 4 idiv 7 sub get def 0 1 versionmap length 1 sub { /i exch def versionmap i get { @@ -17179,18 +21406,22 @@ begin << /ren //renmatrix /pixs pixs - /pixx size - /pixy size - /height size 2 mul 72 div - /width size 2 mul 72 div + /pixx cols + /pixy rows + /height rows 2 mul 72 div + /width cols 2 mul 72 div /opt options >> dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /qrcode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -17198,16 +21429,156 @@ end %%EndResource % --END ENCODER qrcode-- +% --BEGIN ENCODER swissqrcode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix qrcode-- +% --DESC: Swiss QR Code +% --EXAM: +% --EXOP: +% --RNDR: renmatrix +%%BeginResource: uk.co.terryburton.bwipp swissqrcode 0.0 2022082100 68213 68020 +%%BeginData: 128 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +dup /qrcode dup /uk.co.terryburton.bwipp findresource put +begin +/swissqrcode { + + 20 dict begin % Confine variables to local scope + + /options exch def % We are given an option string + /barcode exch def % We are given a barcode string + + /ctx null def + /dontdraw false def + + /parse false def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + % Parse ordinals of the form ^NNN to ASCII + /fncvals << + /parse parse + /parseonly true + /parsefnc false + >> def + /barcode barcode fncvals //parseinput exec def + /barlen barcode length def + options (parse) undef + + % Validate the input length + barcode length 997 gt { + /bwipp.swissqrcodeBadLength (Swiss QR Code input must not exceed 997 digits) //raiseerror exec + } if + + % Get the result of encoding with qrcode + options (dontdraw) true put + /args barcode options //qrcode exec def + + args (opt) options put + args + + % The 7mm-wide Swiss Cross is defined by the specification as being an + % overlaid image, i.e. not made out of "modules", so very likely a + % different pitch. It cannot therefore be represented by our standard image + % dictionary and would be a nightmare to gridfit. The application assumes a + % sufficient high-resolution print process that such issues do not matter. + % + % So for now we simply do as we're told and paint over the top of the + % barcode image that has been scaled to 46mm, user be damned! + % + dontdraw not { + + gsave + currentpoint translate + 72 25.4 div dup scale % pt to mm + + % Clipping path with 7mm hole for the Swiss Cross + gsave + newpath + 0 0 moveto + 46 0 lineto + 46 46 lineto + 0 46 lineto + closepath + 19.5 19.5 moveto + 19.5 26.5 lineto + 26.5 26.5 lineto + 26.5 19.5 lineto + closepath + clip + + % Scale the QR Code to fit within 46mm + gsave + 0 0 moveto + 46 args (pixx) get div 2 div dup scale + //renmatrix exec + grestore + + grestore % Clipping + + % Draw Swiss Cross + 19.5 dup translate + 7 83 div dup scale + + newpath + 6 6 moveto + 6 77 lineto + 77 77 lineto + 77 6 lineto + closepath + 49 18 moveto + 49 34 lineto + 65 34 lineto + 65 49 lineto + 49 49 lineto + 49 65 lineto + 34 65 lineto + 34 49 lineto + 18 49 lineto + 18 34 lineto + 34 34 lineto + 34 18 lineto + closepath + 0 0 0 setrgbcolor fill + + grestore + + } if + + end + +} +[/barcode] {null def} forall +bind def +/swissqrcode dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER swissqrcode-- + % --BEGIN ENCODER microqrcode-- -% --REQUIRES preamble raiseerror renmatrix qrcode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix qrcode-- % --DESC: Micro QR Code % --EXAM: 1234 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp microqrcode 0.0 2017040400 59531 59384 -%%BeginData: 43 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp microqrcode 0.0 2022082100 62905 62760 +%%BeginData: 46 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /qrcode dup /uk.co.terryburton.bwipp findresource put @@ -17219,6 +21590,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def % Parse the input options @@ -17240,12 +21612,14 @@ begin args (opt) options put args - + dontdraw not //renmatrix if end -} bind def +} +[/barcode] {null def} forall +bind def /microqrcode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -17253,17 +21627,78 @@ end %%EndResource % --END ENCODER microqrcode-- +% --BEGIN ENCODER rectangularmicroqrcode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix qrcode-- +% --DESC: Rectangular Micro QR Code +% --EXAM: 1234 +% --EXOP: version=R17x139 +% --RNDR: renmatrix +%%BeginResource: uk.co.terryburton.bwipp rectangularmicroqrcode 0.0 2022082100 62948 62792 +%%BeginData: 46 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +dup /qrcode dup /uk.co.terryburton.bwipp findresource put +begin +/rectangularmicroqrcode { + + 20 dict begin % Confine variables to local scope + + /options exch def % We are given an option string + /barcode exch def % We are given a barcode string + + /ctx null def + /dontdraw false def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + % Get the result of encoding with qrcode with format=micro + options (dontdraw) true put + options (format) (rmqr) put + + /args barcode options //qrcode exec def + + args (opt) options put + args + + dontdraw not //renmatrix if + + end + +} +[/barcode] {null def} forall +bind def +/rectangularmicroqrcode dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER rectangularmicroqrcode-- + % --BEGIN ENCODER maxicode-- -% --REQUIRES preamble raiseerror renmaximatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmaximatrix-- % --DESC: MaxiCode % --EXAM: [)>^03001^02996152382802^029840^029001^0291Z00004951^029UPSN^02906X610^029159^0291234567^0291/1^029^029Y^029634 ALPHA DR^029PITTSBURGH^029PA^029^004 % --EXOP: mode=2 parse % --RNDR: renmaximatrix -%%BeginResource: uk.co.terryburton.bwipp maxicode 0.0 2017040400 141526 147393 -%%BeginData: 564 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp maxicode 0.0 2022082100 132737 135002 +%%BeginData: 607 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmaximatrix dup /uk.co.terryburton.bwipp findresource put begin /maxicode { @@ -17273,10 +21708,12 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /mode -1 def /sam -1 def /parse false def + /parsefnc false def % Parse the input options options type /stringtype eq { @@ -17292,64 +21729,66 @@ begin /mode mode cvi def /sam sam cvi def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if - - /msg barcode def + /maxicode //loadctx exec + + % Parse the input + /fncvals << + /parse parse + /parsefnc parsefnc + /eci true + % ECIs only + >> def + /msg barcode fncvals //parseinput exec def /msglen msg length def % Special message handling for modes 2 and 3 mode 2 eq mode 3 eq or { - % Normalise messages that begin with a field identifier [)>RS01GSyy - msg 0 7 getinterval <5b293e1e30311d> eq { - /fid msg 0 9 getinterval def - /msg msg 9 msglen 9 sub getinterval def + % Convert to a string for extracting the structured data + /barcode msglen string def + 0 1 msglen 1 sub { + /i exch def + msg i get 0 gt { + barcode i msg i get put + } if + } for + /barlen barcode length def + + % Normalise messages that begin with a field identifier [)>{RS}01{GS}yy + barcode 0 7 getinterval <5b293e1e30311d> eq { + /fid barcode 0 9 getinterval def + /barcode barcode 9 barlen 9 sub getinterval def } { /fid () def } ifelse - % Read the postcode, country code and service code fields seperated by GS - msg <1d> search pop /pcode exch def + % Read the postcode, country code and service code fields separated by GS + barcode <1d> search pop /pcode exch def pop <1d> search pop /ccode exch def pop <1d> search pop /scode exch def - pop /msg exch def + pop /barcode exch def % Prepend the field identifier - msg length fid length add string dup - 0 fid putinterval dup - fid length msg putinterval - /msg exch def + barcode length fid length add string dup + 0 fid putinterval dup + fid length barcode putinterval + /barcode exch def + /barlen barcode length def + + /msg [ barcode {} forall ] def /msglen msg length def } if +{ % Special function characters /eci -1 def /pad -2 def /ns -3 def /la -4 def /lb -5 def /sa -6 def /sb -7 def /sc -8 def /sd -9 def /se -10 def - /sa2 -11 def /sa3 -12 def + /sa2 -11 def /sa3 -12 def /lkc -13 def /lkd -14 def /lke -15 def - /pd2 -16 def /pd3 -17 def - + /pd2 -16 def /pd3 -17 def + % Character maps for each state /charmaps [ % A B C D E @@ -17362,7 +21801,7 @@ begin [ (F) (f) 198 230 6 ] % 6 [ (G) (g) 199 231 7 ] % 7 [ (H) (h) 200 232 8 ] % 8 - [ (I) (i) 201 233 9 ] % 9 + [ (I) (i) 201 233 9 ] % 9 [ (J) (j) 202 234 10 ] % 10 [ (K) (k) 203 235 11 ] % 11 [ (L) (l) 204 236 12 ] % 12 @@ -17417,8 +21856,8 @@ begin [ sd sd sd lkd sd ] % 61 [ se se se se lke ] % 62 [ lb la lb lb lb ] % 63 - ] def - + ] def + % Invert charmaps to give character to value maps for each state /charvals [ 64 dict 64 dict 64 dict 64 dict 64 dict ] def 0 1 charmaps length 1 sub { @@ -17427,7 +21866,7 @@ begin 0 1 4 { /j exch def encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required - charvals j get exch i put + charvals j get exch i put } for } for /seta charvals 0 get def @@ -17435,6 +21874,7 @@ begin /setc charvals 2 get def /setd charvals 3 get def /sete charvals 4 get def +} ctxdef % Compute numeric runlengths /nseq [ msglen 1 add {0} repeat ] def @@ -17448,19 +21888,19 @@ begin } for /nseq nseq 0 msglen getinterval def - % Encode the message from ASCII to codewords + % Encode the message from ASCII to codewords /prefixinset { 0 { - 2 copy exch length ge {exit} if + 2 copy exch length ge {exit} if 2 copy get 3 index exch known {1 add} {exit} ifelse } loop exch pop exch pop - } bind def - + } def + /enc { exch get out exch j exch put /j j 1 add def - } bind def + } def /out 144 array def /i 0 def /j 0 def /cset (seta) def @@ -17474,29 +21914,58 @@ begin exit } if { % not a loop but common exit point - + % Immediately encode an ECI + msg i get -1000000 le { + eci cset load enc + msg i get neg 1000000 sub + dup 000031 le { % ECI 000000 - 000031 + 63 and + 1 array astore + } { dup 001023 le { % ECI 000032 - 001023 + dup -6 bitshift 31 and 32 or exch + 63 and + 2 array astore + } { dup 032767 le { % ECI 001024 - 032767 + dup -12 bitshift 47 and 48 or exch + dup -6 bitshift 63 and exch + 63 and + 3 array astore + } { % ECI 032768 - 999999 + dup -18 bitshift 55 and 56 or exch + dup -12 bitshift 63 and exch + dup -6 bitshift 63 and exch + 63 and + 4 array astore + } ifelse } ifelse } ifelse + dup out exch j exch putinterval + length j add /j exch def + /i i 1 add def + exit + } if + % If 9 numerals available then use NS nseq i get 9 ge { - msg i 9 getinterval cvi 4 { dup 63 and exch -6 bitshift } repeat cset load ns get + msg i 9 getinterval 0 exch {48 sub add 10 mul} forall 10 idiv + 4 { dup 63 and exch -6 bitshift } repeat cset load ns get 0 2 10 {index} for 6 array astore 7 1 roll 6 {pop} repeat out exch j exch putinterval /i i 9 add def /j j 6 add def exit } if - + % Read next three characters /char1 msg i get def /char2 i 1 add msglen lt {msg i 1 add get} {-99} ifelse def /char3 i 2 add msglen lt {msg i 2 add get} {-99} ifelse def - + % If current mode is sufficient then directly encode - cset load char1 known { + cset load char1 known { char1 cset load enc /i i 1 add def exit } if - + % For switching from A to B cset (seta) eq setb char1 known and { setb char2 known { @@ -17509,7 +21978,7 @@ begin } ifelse exit } if - + % For switching from B to A encode according to length of prefix cset (setb) eq seta char1 known and { /p seta msg i 4 msglen i sub 2 copy gt {exch} if pop getinterval prefixinset def @@ -17522,14 +21991,14 @@ begin sa2 setb enc char1 seta enc char2 seta enc - /i i 2 add def + /i i 2 add def } if p 3 eq { sa3 setb enc char1 seta enc char2 seta enc char3 seta enc - /i i 3 add def + /i i 3 add def } if p 4 ge { la setb enc @@ -17537,24 +22006,24 @@ begin } if exit } if - + % If character is in A or B then directly latch seta char1 known { la cset load enc /cset (seta) def exit - } if + } if setb char1 known { lb cset load enc /cset (setb) def exit - } if - + } if + % Determine which one of sets C, D or E the character is in setc char1 known {/setx (setc) def /sx sc def /lkx lkc def} if setd char1 known {/setx (setd) def /sx sd def /lkx lkd def} if sete char1 known {/setx (sete) def /sx se def /lkx lke def} if - + % Encode according to the length of the prefix /p setx load msg i 4 msglen i sub 2 copy gt {exch} if pop getinterval prefixinset def p 1 eq { @@ -17581,20 +22050,20 @@ begin p 4 ge { sx cset load enc lkx setx load enc - /cset setx def + /cset setx def } if - + exit } loop % out } loop /encmsg out 0 j getinterval def - /padval cset load pad get def + /padval cset load pad get def % Prefix the encoded message with the structured append insert /sami [] def sam -1 ne { /sami 2 array def - sami 0 seta pad get put + sami 0 seta pad get put sami 1 sam 10 idiv 1 sub 8 mul sam 10 mod 1 sub add put } if /encmsg [ sami aload pop encmsg aload pop ] def @@ -17613,8 +22082,8 @@ begin pcb pcode cvi 2 30 string cvrs dup length 36 exch sub exch putinterval } { % mode=3 % For alphanumeric postcode, trim or pad with spaces to 6 chars and encode to binary - /pccw [ - ( ) 6 string copy dup 0 pcode length 6 gt {pcode 0 6 getinterval} {pcode} ifelse putinterval + /pccw [ + ( ) 6 string copy dup 0 pcode length 6 gt {pcode 0 6 getinterval} {pcode} ifelse putinterval {seta exch get} forall ] def 0 1 5 { @@ -17641,7 +22110,7 @@ begin % Evaluate the structured carrier message as codewords /pri [ 0 0 0 0 0 0 0 0 0 0 ] def - 0 1 59 { + 0 1 59 { /i exch def /ps i 6 idiv def /ep 2 5 i 6 mod sub exp cvi scm i get 48 sub mul def @@ -17685,7 +22154,7 @@ begin } { pop pop 0 } ifelse - } bind def + } def % Generate error correction codewords /rscodes { @@ -17720,7 +22189,7 @@ begin ecb - } bind def + } def % Split secondary codeword into odd and even elements /seco [ 0 2 sec length 1 sub { sec exch get } for ] def @@ -17734,11 +22203,11 @@ begin % Recompose the secondary parity codewords /secchk [ 0 1 scodes 1 sub { dup secochk exch get exch secechk exch get } for ] def - % Concatinate the data into final codewords + % Concatenate the data into final codewords /codewords [ - pri aload pop + pri aload pop pri 10 rscodes aload pop - sec aload pop + sec aload pop secchk aload pop ] def @@ -17751,52 +22220,54 @@ begin } for % Maps modules to pixels in the grid +{ /modmap [ - 469 529 286 316 347 346 673 672 703 702 647 676 283 282 313 312 370 610 618 379 - 378 409 408 439 705 704 559 589 588 619 458 518 640 701 675 674 285 284 315 314 - 310 340 531 289 288 319 349 348 456 486 517 516 471 470 369 368 399 398 429 428 - 549 548 579 578 609 608 649 648 679 678 709 708 639 638 669 668 699 698 279 278 - 309 308 339 338 381 380 411 410 441 440 561 560 591 590 621 620 547 546 577 576 - 607 606 367 366 397 396 427 426 291 290 321 320 351 350 651 650 681 680 711 710 - 1 0 31 30 61 60 3 2 33 32 63 62 5 4 35 34 65 64 7 6 - 37 36 67 66 9 8 39 38 69 68 11 10 41 40 71 70 13 12 43 42 - 73 72 15 14 45 44 75 74 17 16 47 46 77 76 19 18 49 48 79 78 - 21 20 51 50 81 80 23 22 53 52 83 82 25 24 55 54 85 84 27 26 - 57 56 87 86 117 116 147 146 177 176 115 114 145 144 175 174 113 112 143 142 - 173 172 111 110 141 140 171 170 109 108 139 138 169 168 107 106 137 136 167 166 - 105 104 135 134 165 164 103 102 133 132 163 162 101 100 131 130 161 160 99 98 - 129 128 159 158 97 96 127 126 157 156 95 94 125 124 155 154 93 92 123 122 - 153 152 91 90 121 120 151 150 181 180 211 210 241 240 183 182 213 212 243 242 - 185 184 215 214 245 244 187 186 217 216 247 246 189 188 219 218 249 248 191 190 - 221 220 251 250 193 192 223 222 253 252 195 194 225 224 255 254 197 196 227 226 - 257 256 199 198 229 228 259 258 201 200 231 230 261 260 203 202 233 232 263 262 - 205 204 235 234 265 264 207 206 237 236 267 266 297 296 327 326 357 356 295 294 - 325 324 355 354 293 292 323 322 353 352 277 276 307 306 337 336 275 274 305 304 - 335 334 273 272 303 302 333 332 271 270 301 300 331 330 361 360 391 390 421 420 - 363 362 393 392 423 422 365 364 395 394 425 424 383 382 413 412 443 442 385 384 - 415 414 445 444 387 386 417 416 447 446 477 476 507 506 537 536 475 474 505 504 - 535 534 473 472 503 502 533 532 455 454 485 484 515 514 453 452 483 482 513 512 - 451 450 481 480 511 510 541 540 571 570 601 600 543 542 573 572 603 602 545 544 - 575 574 605 604 563 562 593 592 623 622 565 564 595 594 625 624 567 566 597 596 - 627 626 657 656 687 686 717 716 655 654 685 684 715 714 653 652 683 682 713 712 - 637 636 667 666 697 696 635 634 665 664 695 694 633 632 663 662 693 692 631 630 - 661 660 691 690 721 720 751 750 781 780 723 722 753 752 783 782 725 724 755 754 - 785 784 727 726 757 756 787 786 729 728 759 758 789 788 731 730 761 760 791 790 - 733 732 763 762 793 792 735 734 765 764 795 794 737 736 767 766 797 796 739 738 - 769 768 799 798 741 740 771 770 801 800 743 742 773 772 803 802 745 744 775 774 - 805 804 747 746 777 776 807 806 837 836 867 866 897 896 835 834 865 864 895 894 - 833 832 863 862 893 892 831 830 861 860 891 890 829 828 859 858 889 888 827 826 - 857 856 887 886 825 824 855 854 885 884 823 822 853 852 883 882 821 820 851 850 - 881 880 819 818 849 848 879 878 817 816 847 846 877 876 815 814 845 844 875 874 - 813 812 843 842 873 872 811 810 841 840 871 870 901 900 931 930 961 960 903 902 - 933 932 963 962 905 904 935 934 965 964 907 906 937 936 967 966 909 908 939 938 - 969 968 911 910 941 940 971 970 913 912 943 942 973 972 915 914 945 944 975 974 - 917 916 947 946 977 976 919 918 949 948 979 978 921 920 951 950 981 980 923 922 - 953 952 983 982 925 924 955 954 985 984 927 926 957 956 987 986 58 89 88 118 - 149 148 178 209 208 238 269 268 298 329 328 358 389 388 418 449 448 478 509 508 - 538 569 568 598 629 628 658 689 688 718 749 748 778 809 808 838 869 868 898 929 + 469 529 286 316 347 346 673 672 703 702 647 676 283 282 313 312 370 610 618 379 + 378 409 408 439 705 704 559 589 588 619 458 518 640 701 675 674 285 284 315 314 + 310 340 531 289 288 319 349 348 456 486 517 516 471 470 369 368 399 398 429 428 + 549 548 579 578 609 608 649 648 679 678 709 708 639 638 669 668 699 698 279 278 + 309 308 339 338 381 380 411 410 441 440 561 560 591 590 621 620 547 546 577 576 + 607 606 367 366 397 396 427 426 291 290 321 320 351 350 651 650 681 680 711 710 + 1 0 31 30 61 60 3 2 33 32 63 62 5 4 35 34 65 64 7 6 + 37 36 67 66 9 8 39 38 69 68 11 10 41 40 71 70 13 12 43 42 + 73 72 15 14 45 44 75 74 17 16 47 46 77 76 19 18 49 48 79 78 + 21 20 51 50 81 80 23 22 53 52 83 82 25 24 55 54 85 84 27 26 + 57 56 87 86 117 116 147 146 177 176 115 114 145 144 175 174 113 112 143 142 + 173 172 111 110 141 140 171 170 109 108 139 138 169 168 107 106 137 136 167 166 + 105 104 135 134 165 164 103 102 133 132 163 162 101 100 131 130 161 160 99 98 + 129 128 159 158 97 96 127 126 157 156 95 94 125 124 155 154 93 92 123 122 + 153 152 91 90 121 120 151 150 181 180 211 210 241 240 183 182 213 212 243 242 + 185 184 215 214 245 244 187 186 217 216 247 246 189 188 219 218 249 248 191 190 + 221 220 251 250 193 192 223 222 253 252 195 194 225 224 255 254 197 196 227 226 + 257 256 199 198 229 228 259 258 201 200 231 230 261 260 203 202 233 232 263 262 + 205 204 235 234 265 264 207 206 237 236 267 266 297 296 327 326 357 356 295 294 + 325 324 355 354 293 292 323 322 353 352 277 276 307 306 337 336 275 274 305 304 + 335 334 273 272 303 302 333 332 271 270 301 300 331 330 361 360 391 390 421 420 + 363 362 393 392 423 422 365 364 395 394 425 424 383 382 413 412 443 442 385 384 + 415 414 445 444 387 386 417 416 447 446 477 476 507 506 537 536 475 474 505 504 + 535 534 473 472 503 502 533 532 455 454 485 484 515 514 453 452 483 482 513 512 + 451 450 481 480 511 510 541 540 571 570 601 600 543 542 573 572 603 602 545 544 + 575 574 605 604 563 562 593 592 623 622 565 564 595 594 625 624 567 566 597 596 + 627 626 657 656 687 686 717 716 655 654 685 684 715 714 653 652 683 682 713 712 + 637 636 667 666 697 696 635 634 665 664 695 694 633 632 663 662 693 692 631 630 + 661 660 691 690 721 720 751 750 781 780 723 722 753 752 783 782 725 724 755 754 + 785 784 727 726 757 756 787 786 729 728 759 758 789 788 731 730 761 760 791 790 + 733 732 763 762 793 792 735 734 765 764 795 794 737 736 767 766 797 796 739 738 + 769 768 799 798 741 740 771 770 801 800 743 742 773 772 803 802 745 744 775 774 + 805 804 747 746 777 776 807 806 837 836 867 866 897 896 835 834 865 864 895 894 + 833 832 863 862 893 892 831 830 861 860 891 890 829 828 859 858 889 888 827 826 + 857 856 887 886 825 824 855 854 885 884 823 822 853 852 883 882 821 820 851 850 + 881 880 819 818 849 848 879 878 817 816 847 846 877 876 815 814 845 844 875 874 + 813 812 843 842 873 872 811 810 841 840 871 870 901 900 931 930 961 960 903 902 + 933 932 963 962 905 904 935 934 965 964 907 906 937 936 967 966 909 908 939 938 + 969 968 911 910 941 940 971 970 913 912 943 942 973 972 915 914 945 944 975 974 + 917 916 947 946 977 976 919 918 949 948 979 978 921 920 951 950 981 980 923 922 + 953 952 983 982 925 924 955 954 985 984 927 926 957 956 987 986 58 89 88 118 + 149 148 178 209 208 238 269 268 298 329 328 358 389 388 418 449 448 478 509 508 + 538 569 568 598 629 628 658 689 688 718 749 748 778 809 808 838 869 868 898 929 928 958 989 988 ] def +} ctxdef % Lookup pixels for enabled modules from modmap /pixs 864 array def @@ -17819,9 +22290,13 @@ begin dontdraw not //renmaximatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /maxicode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -17830,16 +22305,19 @@ end % --END ENCODER maxicode-- % --BEGIN ENCODER azteccode-- -% --REQUIRES preamble raiseerror renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- % --DESC: Aztec Code % --EXAM: This is Aztec Code % --EXOP: format=full % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp azteccode 0.0 2017040400 209943 222599 -%%BeginData: 679 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp azteccode 0.0 2022082100 189159 191319 +%%BeginData: 794 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /azteccode { @@ -17849,6 +22327,7 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def /format (unset) def % full, compact or rune /readerinit false def @@ -17857,6 +22336,7 @@ begin /ecaddchars 3 def /raw false def /parse false def + /parsefnc false def % Parse the input options options type /stringtype eq { @@ -17868,149 +22348,170 @@ begin currentdict end /options exch def } if options {def} forall - + /layers layers cvi def /eclevel eclevel cvr def /ecaddchars ecaddchars cvi def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop + /azteccode //loadctx exec + + format (rune) eq { + barcode length 0 eq { + /bwipp.aztecRuneNotNumeric (Aztec runes must be numeric) //raiseerror exec + } if + barcode { + dup 48 lt exch 57 gt or { + /bwipp.aztecRuneNotNumeric (Aztec runes must be numeric) //raiseerror exec + } if + } forall + barcode cvi dup 0 lt exch 255 gt or { + /bwipp.aztecRuneInvalid (Aztec runes must be 0 to 255) //raiseerror exec + } if } if - % Convert from input into message bitstream - /msgbits () def - format (rune) ne raw and {/msgbits barcode def} if - format (rune) ne raw not and { + % Parse the input + /fn1 -1 def + /fncvals << + /parse parse + /parsefnc parsefnc + /eci true + (FNC1) fn1 + >> def + /msg barcode fncvals //parseinput exec def + /msglen msg length def - % State key: "U"pper, "L"ower, "M"ixed, "P"unctuation, "D"igit, "B"inary - /U 0 def /L 1 def /M 2 def /P 3 def /D 4 def /B 5 def - - % Special function characters - /lu -1 def /ll -2 def /lm -3 def - /lp -4 def /ld -5 def /su -6 def - /sp -7 def /sb -8 def /fl -9 def - /p2 -10 def /p3 -11 def /p4 -12 def /p5 -13 def - - % Character maps for each state - /charmaps [ - % U L M P D - [ sp sp sp fl sp ] % 0 - [ 32 32 32 13 32 ] % 1 - [ (A) (a) 1 p2 (0) ] % 2 p2 = CR LF - [ (B) (b) 2 p3 (1) ] % 3 p3 = ". " - [ (C) (c) 3 p4 (2) ] % 4 p4 = ", " - [ (D) (d) 4 p5 (3) ] % 5 p5 = ": " - [ (E) (e) 5 (!) (4) ] % 6 - [ (F) (f) 6 (") (5) ] % 7 - [ (G) (g) 7 (#) (6) ] % 8 - [ (H) (h) 8 ($) (7) ] % 9 - [ (I) (i) 9 (%) (8) ] % 10 - [ (J) (j) 10 (&) (9) ] % 11 - [ (K) (k) 11 (') (,) ] % 12 - [ (L) (l) 12 40 (.) ] % 13 - [ (M) (m) 13 41 lu ] % 14 - [ (N) (n) 27 (*) su ] % 15 - [ (O) (o) 28 (+) -99 ] % 16 - [ (P) (p) 29 (,) -99 ] % 17 - [ (Q) (q) 30 (-) -99 ] % 18 - [ (R) (r) 31 (.) -99 ] % 19 - [ (S) (s) (@) (/) -99 ] % 20 - [ (T) (t) 92 (:) -99 ] % 21 - [ (U) (u) (^) (;) -99 ] % 22 - [ (V) (v) (_) (<) -99 ] % 23 - [ (W) (w) (`) (=) -99 ] % 24 - [ (X) (x) (|) (>) -99 ] % 25 - [ (Y) (y) (~) (?) -99 ] % 26 - [ (Z) (z) 127 ([) -99 ] % 27 - [ ll su ll (]) -99 ] % 28 - [ lm lm lu ({) -99 ] % 29 - [ ld ld lp (}) -99 ] % 30 - [ sb sb sb lu -99 ] % 31 - ] def - - % Invert charmaps to give character to value maps for each state - /charvals [ 32 dict 32 dict 32 dict 32 dict 16 dict ] def - 0 1 charmaps length 1 sub { - /i exch def - /encs charmaps i get def - 0 1 4 { - /j exch def - encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required - charvals j get exch i put - } for +{ + % State key: "U"pper, "L"ower, "M"ixed, "P"unctuation, "D"igit, "B"inary + /U 0 def /L 1 def /M 2 def /P 3 def /D 4 def /B 5 def + + % Special function characters + /lu -2 def /ll -3 def /lm -4 def + /lp -5 def /ld -6 def /su -7 def + /sp -8 def /sb -9 def /fl -10 def + /p2 -11 def /p3 -12 def /p4 -13 def /p5 -14 def + + % Character maps for each state + /charmaps [ + % U L M P D + [ sp sp sp fl sp ] % 0 + [ 32 32 32 13 32 ] % 1 + [ (A) (a) 1 p2 (0) ] % 2 p2 = CR LF + [ (B) (b) 2 p3 (1) ] % 3 p3 = ". " + [ (C) (c) 3 p4 (2) ] % 4 p4 = ", " + [ (D) (d) 4 p5 (3) ] % 5 p5 = ": " + [ (E) (e) 5 (!) (4) ] % 6 + [ (F) (f) 6 (") (5) ] % 7 + [ (G) (g) 7 (#) (6) ] % 8 + [ (H) (h) 8 ($) (7) ] % 9 + [ (I) (i) 9 (%) (8) ] % 10 + [ (J) (j) 10 (&) (9) ] % 11 + [ (K) (k) 11 (') (,) ] % 12 + [ (L) (l) 12 40 (.) ] % 13 + [ (M) (m) 13 41 lu ] % 14 + [ (N) (n) 27 (*) su ] % 15 + [ (O) (o) 28 (+) -99 ] % 16 + [ (P) (p) 29 (,) -99 ] % 17 + [ (Q) (q) 30 (-) -99 ] % 18 + [ (R) (r) 31 (.) -99 ] % 19 + [ (S) (s) (@) (/) -99 ] % 20 + [ (T) (t) 92 (:) -99 ] % 21 + [ (U) (u) (^) (;) -99 ] % 22 + [ (V) (v) (_) (<) -99 ] % 23 + [ (W) (w) (`) (=) -99 ] % 24 + [ (X) (x) (|) (>) -99 ] % 25 + [ (Y) (y) (~) (?) -99 ] % 26 + [ (Z) (z) 127 ([) -99 ] % 27 + [ ll su ll (]) -99 ] % 28 + [ lm lm lu ({) -99 ] % 29 + [ ld ld lp (}) -99 ] % 30 + [ sb sb sb lu -99 ] % 31 + ] def + + % Invert charmaps to give character to value maps for each state + /charvals [ 32 dict 32 dict 32 dict 32 dict 16 dict ] def + 0 1 charmaps length 1 sub { + /i exch def + /encs charmaps i get def + 0 1 4 { + /j exch def + encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required + charvals j get exch i put } for - - % Punctuation compression - /pcomp << - <0d0a> p2 % CR LF - (. ) p3 - (, ) p4 - (: ) p5 - >> def - - /e 10000 def % "Empty" - - /latlen [ % Bit length of latch between states - % To: U L M P D B From - [ 0 5 5 10 5 10 ] % U - [ 9 0 5 10 5 10 ] % L - [ 5 5 0 5 10 10 ] % M - [ 5 10 10 0 10 15 ] % P - [ 4 9 9 14 0 14 ] % D - [ 0 0 0 0 0 0 ] % B - ] def + } for - /latseq [ % Latch sequences between states - % To: U L M P D B From - [ [] [ll] [lm] [lm lp] [ld] [sb] ] % U - [ [ld lu] [] [lm] [lm lp] [ld] [sb] ] % L - [ [lu] [ll] [] [lp] [lu ld] [sb] ] % M - [ [lu] [lu ll] [lu lm] [] [lu ld] [lu sb] ] % P - [ [lu] [lu ll] [lu lm] [lu lm lp] [] [lu sb] ] % D - [ [lu] [ll] [lm] [] [] [] ] % B - ] def + % Punctuation compression + /pcomp << + <0d0a> p2 % CR LF + (. ) p3 + (, ) p4 + (: ) p5 + >> def + + /e 10000 def % "Empty" + + /latlen [ % Bit length of latch between states + % To: U L M P D B From + [ 0 5 5 10 5 10 ] % U + [ 9 0 5 10 5 10 ] % L + [ 5 5 0 5 10 10 ] % M + [ 5 10 10 0 10 15 ] % P + [ 4 9 9 14 0 14 ] % D + [ 0 0 0 0 0 0 ] % B + ] def + + /latseq [ % Latch sequences between states + % To: U L M P D B From + [ [] [ll] [lm] [lm lp] [ld] [sb] ] % U + [ [ld lu] [] [lm] [lm lp] [ld] [sb] ] % L + [ [lu] [ll] [] [lp] [lu ld] [sb] ] % M + [ [lu] [lu ll] [lu lm] [] [lu ld] [lu sb] ] % P + [ [lu] [lu ll] [lu lm] [lu lm lp] [] [lu sb] ] % D + [ [lu] [ll] [lm] [] [] [] ] % B + ] def + + /shftlen [ % Bit length of shift to state + % To: U L M P D From + [ e e e 5 e ] % U + [ 5 e e 5 e ] % L + [ e e e 5 e ] % M + [ e e e e e ] % P + [ 4 e e 4 e ] % D + ] def + +} ctxdef + + % Convert from input into message bitstream + /msgbits () def + format (rune) ne raw and {/msgbits barcode def} if + format (rune) ne raw not and { + + /charsize { + dup 0 ge { + % U L M P D B + pop [ 5 5 5 5 4 8 ] exch get + } { % FNC or ECI in P + exch pop + dup fn1 eq { % FNC1: PS{Flg(0)} + 3 + pop 8 + } { % ECI: PS{Flg(n)} + 3 + 4n + neg 1000000 sub dup 0 eq {pop 1} if + ln 10 ln div cvi 1 add 4 mul 8 add + } ifelse + } ifelse + } def - /shftlen [ % Bit length of shift to state - % To: U L M P D From - [ e e e 5 e ] % U - [ 5 e e 5 e ] % L - [ e e e 5 e ] % M - [ e e e e e ] % P - [ 4 e e 4 e ] % D - ] def - - % U L M P D B - /charsize [ 5 5 5 5 4 8 ] def - % U L M P D B /curlen [ 0 e e e e e ] def /curseq [ [] [] [] [] [] [] ] def - + /backto U def % U /lastchar () def - + % Derive the optimal sequences ending in each state - barcode { - + msg { + /char exch def - + % Check for optimisations in the current sequences by latching from x to y { % loop /imp false def @@ -18037,31 +22538,35 @@ begin imp not {exit} if % Repeat unless no improvement } loop - % Determine optimal next sequences for each valid encoding - /nxtlen [ e e e e e e ] def + % Determine optimal next sequences for each valid encoding + /nxtlen [ e e e e e e ] def /nxtseq 6 array def - + [ U L M P D B ] { /x exch def - + { % loop for common exit - + % Skip states that cannot encode character - x B ne {charvals x get char known not {exit} if} if - + char 0 ge { + x B ne {charvals x get char known not {exit} if} if + } { + x P ne {exit} if % Only P can encode FNC1 and ECI + } ifelse + % Extend directly - /cost curlen x get charsize x get add def + /cost curlen x get x char charsize add def cost nxtlen x get lt { nxtlen x cost put nxtseq x [ curseq x get aload pop char ] put } if - - % Optimise for direct shifts from y to x + + % Optimise for direct shifts from y to x x B eq {exit} if % B is treated as a latch [ U L M P D ] { /y exch def x y ne { - /cost curlen y get shftlen y get x get add charsize x get add def + /cost curlen y get shftlen y get x get add x char charsize add def cost nxtlen y get lt { nxtlen y cost put nxtseq y [ @@ -18072,36 +22577,88 @@ begin } if } if } forall - + exit } loop - + } forall - + % Optimise using P compression - lastchar () ne { + lastchar () ne char 0 ge and { /pchars 2 string dup 0 lastchar put dup 1 char put def pcomp pchars known { - curlen P get nxtlen P get lt { - nxtlen P curlen P get put - nxtseq P [ curseq P get aload pop pop pcomp pchars get ] put - } if + [ U L M P D ] { + /i exch def + /inP true def % U and L can't encode CR, comma, dot or colon + i M eq { % M can encode CR + lastchar 13 eq { /inP false def } if + } { + i D eq { % D can encode comma and dot + lastchar 44 eq lastchar 46 eq or { /inP false def } if + } if + } ifelse + inP curlen i get nxtlen i get lt and { + /curseqi curseq i get def + /lastld false def + /lastsp false def + /lastidx -1 def + curseqi length 1 sub -1 0 { % Search backwards for lastchar + /idx exch def + /ch curseqi idx get def + lastidx -1 eq { + ch lastchar eq { + /lastidx idx def + idx 0 gt { + curseqi idx 1 sub get sp eq { /lastsp true def } if % Preceded by P/S + } if + } if + } { % Found lastchar, check latch + ch 0 lt ch ld ge and { % If have latch + i P eq { + ch ld eq { /lastld true def } if % Set flag if D/L for adjustment below + } { + ch lp ne { /inP lastsp def } if % If not P/L only in P if have P/S + } ifelse + exit + } if + } ifelse + } for + inP lastidx 0 ge and { + nxtlen i curlen i get put + lastidx curseqi length 1 sub lt { % If lastchar not at end of sequence + i P eq { + lastld { nxtlen i nxtlen i get 1 add put } if % Adjust count if D/L + % Move lastchar to end and replace + nxtseq i [ curseqi aload pop curseqi length lastidx sub -1 roll pop pcomp pchars get ] put + } { + % Replace lastchar in situ + nxtseq i [ curseqi aload pop ] put + nxtseq i get lastidx pcomp pchars get put + } ifelse + } { + nxtseq i [ curseqi aload pop pop pcomp pchars get ] put + } ifelse + } if + } if + } forall } if - } if - + } if + % Account for binary extension for 32 or more bytes - /numbytes 0 def - nxtseq B get { - sb eq {0} {numbytes 1 add} ifelse /numbytes exch def - } forall - numbytes 32 eq {nxtlen B nxtlen B get 11 add put} if - + nxtseq B get null ne { + /numbytes 0 def + nxtseq B get { + sb eq {0} {numbytes 1 add} ifelse /numbytes exch def + } forall + numbytes 32 eq {nxtlen B nxtlen B get 11 add put} if + } if + /curlen nxtlen def /curseq nxtseq def - /lastchar char def - + /lastchar char 0 ge {char} {()} ifelse def + } forall - + % Select the optimal sequence /minseq e def [ U L M P D B ] { @@ -18111,44 +22668,67 @@ begin /seq curseq i get def } if } forall - + % Encoding functions /tobin { string dup length 1 sub 0 exch 1 exch {1 index exch 48 put} for - dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval - } bind def - /encu {charvals U get exch get 5 tobin} bind def - /encl {charvals L get exch get 5 tobin} bind def - /encm {charvals M get exch get 5 tobin} bind def - /encp {charvals P get exch get 5 tobin} bind def - /encd {charvals D get exch get 4 tobin} bind def + dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval + } def + + /encu {charvals U get exch get 5 tobin} def + /encl {charvals L get exch get 5 tobin} def + /encm {charvals M get exch get 5 tobin} def + /encd {charvals D get exch get 4 tobin} def + + /encp { + dup fn1 eq { % FNC1: Flg(0) + pop (00000000) + } { + dup -1000000 le { % ECI: Flg(n) + n-Digits + neg 1000000 sub dup dup 0 eq {pop 1} if + ln 10 ln div cvi + dup 1 add 4 mul 8 add string + dup 0 (00000) putinterval % Flg(n) + dup 2 index 1 add 3 tobin 5 exch putinterval % len + 3 1 roll -1 0 { % ECI digits in "Digit" encoding + 4 mul 8 add exch + dup 10 idiv 3 index 4 2 roll + 10 mod 2 add 4 tobin putinterval + } for + pop + } { + charvals P get exch get 5 tobin + } ifelse } ifelse + } def + /encfuncs [ /encu /encl /encm /encp /encd ] def + /addtomsgbits { /v exch def msgbits j v putinterval /j j v length add def - } bind def - + } def + % Encode the sequence /state U def /msgbits minseq string def /i 0 def /j 0 def { i seq length ge {exit} if - + state B ne { - + /char seq i get def - + % Encode character char encfuncs state get load exec addtomsgbits /i i 1 add def - + % Encode shifted next character char su eq char sp eq or { seq i get char su eq {encu} {encp} ifelse addtomsgbits /i i 1 add def } if - + % Latches to new state char lu eq {/state U def} if char ll eq {/state L def} if @@ -18156,16 +22736,16 @@ begin char lp eq {/state P def} if char ld eq {/state D def} if char sb eq {/state B def} if - + } { % Binary - + % Find number of bytes before latch or end /numbytes 0 def { i numbytes add seq length ge {exit} if - seq i numbytes add get 0 lt {exit} if + seq i numbytes add get 0 lt {exit} if /numbytes numbytes 1 add def } loop - + % Encode length numbytes 31 le { numbytes 5 tobin addtomsgbits @@ -18173,13 +22753,13 @@ begin 0 5 tobin addtomsgbits numbytes 31 sub 11 tobin addtomsgbits } ifelse - + % Encode bytes numbytes { - seq i get 8 tobin addtomsgbits + seq i get 8 tobin addtomsgbits /i i 1 add def } repeat - + % Return to previous state as indicated i seq length lt { /char seq i get def @@ -18188,14 +22768,15 @@ begin char ll eq {/state L def} if char lm eq {/state M def} if } if - + } ifelse - + } loop } if - % Lookup the most appropriate symbol specification + % Lookup the most appropriate symbol specification +{ /metrics [ [ (rune) 0 0 0 6 ] % Special metric for rune symbols [ (compact) 1 1 17 6 ] [ (full) 1 1 21 6 ] [ (compact) 2 0 40 6 ] @@ -18211,6 +22792,7 @@ begin [ (full) 27 0 1224 12 ] [ (full) 28 0 1306 12 ] [ (full) 29 0 1392 12 ] [ (full) 30 0 1480 12 ] [ (full) 31 0 1570 12 ] [ (full) 32 0 1664 12 ] ] def +} ctxdef /i 0 def { % loop @@ -18221,12 +22803,12 @@ begin /ncws m 3 get def % Total of codewords /bpcw m 4 get def % Bits per codeword /numecw ncws eclevel mul 100 div ecaddchars add ceiling cvi def - msgbits length 0 eq {/numecw 0 def} if % Error correction codewords + msgbits length 0 eq {/numecw 0 def} if % Error correction codewords /numdcw ncws numecw sub def % Data codewords /okay true def format (unset) ne format frmt ne and {/okay false def} if readerinit icap 1 ne and {/okay false def} if - layers -1 ne layers mlyr ne and {/okay false def} if + layers -1 ne layers mlyr ne and {/okay false def} if msgbits length bpcw div ceiling cvi numdcw gt {/okay false def} if okay {exit} if /i i 1 add def @@ -18235,8 +22817,8 @@ begin /format frmt def % Expand message bits into codewords avoiding codewords with all zeros or all ones - /allzero {dup length (000000000000) 0 3 -1 roll getinterval eq} bind def - /allones {dup length (111111111111) 0 3 -1 roll getinterval eq} bind def + /allzero {dup length (000000000000) 0 3 -1 roll getinterval eq} def + /allones {dup length (111111111111) 0 3 -1 roll getinterval eq} def /cws ncws array def /m 0 def /c 0 def { @@ -18246,8 +22828,8 @@ begin /cwf msgbits m bpcw add 1 sub 1 getinterval def % Last bit cwb allzero {/cwf (1) def /m m 1 sub def} if % Flip last bit to avoid zeros cwb allones {/cwf (0) def /m m 1 sub def} if % Flip last bit to avoid ones - % Concatinate the bits - 12 string dup 0 cwb putinterval + % Concatenate the bits + 12 string dup 0 cwb putinterval dup bpcw 1 sub cwf putinterval 0 bpcw getinterval /cwb exch def @@ -18263,11 +22845,13 @@ begin /cw cw 2 bpcw i sub 1 sub exp cvi cwb i get 48 sub mul add def } for cws c cw put - /m m bpcw add def + /m m bpcw add def /c c 1 add def - } loop + } loop /cws cws 0 c getinterval def + options /debugcws known { /bwipp.debugcws cws //raiseerror exec } if + % Reed-Solomon algorithm /rscodes { @@ -18288,17 +22872,17 @@ begin } { pop pop 0 } ifelse - } bind def + } def % Generate the coefficients /coeffs [ 1 rsnc {0} repeat ] def 1 1 rsnc { - /i exch def + /i exch def coeffs i coeffs i 1 sub get put i 1 sub -1 1 { /j exch def coeffs j coeffs j 1 sub get coeffs j get rsalog i get rsprod xor put - } for + } for coeffs 0 coeffs 0 get rsalog i get rsprod put } for @@ -18306,17 +22890,17 @@ begin /nd rscws length def /rscws [ rscws {} forall rsnc {0} repeat 0 ] def 0 1 nd 1 sub { - /k exch rscws exch get rscws nd get xor def + /k exch rscws exch get rscws nd get xor def 0 1 rsnc 1 sub { - /j exch def + /j exch def rscws nd j add rscws nd j add 1 add get k coeffs rsnc j sub 1 sub get rsprod xor put - } for + } for } for % Return all but the last codeword rscws 0 rscws length 1 sub getinterval - } bind def + } def % Create the codewords and bit string for the mode format (full) eq { @@ -18328,11 +22912,11 @@ begin mode 2#0000000011110000 and -4 bitshift mode 2#0000000000001111 and ] def - /mode mode 6 16 19 rscodes def + /mode mode 6 16 19 rscodes def } if format (compact) eq { /mode layers 1 sub 6 bitshift cws length 1 sub add def - readerinit {/mode mode 2#00100000 or def} if + readerinit {/mode mode 2#00100000 or def} if /mode [ mode 2#11110000 and -4 bitshift mode 2#00001111 and @@ -18352,36 +22936,38 @@ begin 0 1 modebits length 1 sub {modebits exch (0) putinterval} for 0 1 mode length 1 sub { /i exch def - modebits mode i get 2 4 string cvrs dup length 4 exch sub 4 i mul add exch putinterval + modebits mode i get 2 4 string cvrs dup length 4 exch sub 4 i mul add exch putinterval } for % Extend the data codewords with error correction codewords to create the bit string for the data +{ /rsparams [ - [] [] [] [] [] [] - [ 64 67 ] % 6-bit codewords + [] [] [] [] [] [] + [ 64 67 ] % 6-bit codewords [] [ 256 301 ] % 8-bit codewords - [] + [] [ 1024 1033 ] % 10-bit codewords [] [ 4096 4201 ] % 12-bit codewords ] def +} ctxdef /cws cws ncws cws length sub rsparams bpcw get {} forall rscodes def format (full) eq { - /databits layers layers mul 16 mul layers 112 mul add string def + /databits layers layers mul 16 mul layers 112 mul add string def } { - /databits layers layers mul 16 mul layers 88 mul add string def + /databits layers layers mul 16 mul layers 88 mul add string def } ifelse 0 1 databits length 1 sub {databits exch (0) putinterval} for - 0 1 ncws 1 sub { + 0 1 ncws 1 sub { /i exch def - databits cws i get 2 bpcw string cvrs - dup length bpcw exch sub bpcw i mul add databits length ncws bpcw mul sub add - exch putinterval + databits cws i get 2 bpcw string cvrs + dup length bpcw exch sub bpcw i mul add databits length ncws bpcw mul sub add + exch putinterval } for % Move to a point in the cartesian plane centered on the bullseye - /cmv {size mul sub mid add} bind def + /cmv {size mul sub mid add} def % Move to a bit position within a layer /lmv { @@ -18390,7 +22976,7 @@ begin /lwid fw llyr 4 mul add def /ldir lbit 2 idiv lwid idiv def ldir 0 eq { % Top - lwid 1 sub 2 idiv neg 1 add lbit 2 idiv lwid mod add + lwid 1 sub 2 idiv neg 1 add lbit 2 idiv lwid mod add fw 1 sub 2 idiv llyr 2 mul add lbit 2 mod add cmv } if @@ -18409,12 +22995,12 @@ begin lwid 2 idiv 1 sub lbit 2 idiv lwid mod sub neg cmv } if - } bind def + } def % Create the pixel map % For full symbols we disregard the reference grid at this stage format (full) eq {/fw 12 def} {/fw 9 def} ifelse - /size fw layers 4 mul add 2 add def + /size fw layers 4 mul add 2 add def /pixs [size size mul {-1} repeat] def /mid size 1 sub 2 idiv size mul size 1 sub 2 idiv add def @@ -18444,7 +23030,7 @@ begin npixs i size 2 idiv neg j add cmv [size 2 idiv j add i add 1 add 2 mod] putinterval npixs i neg size 2 idiv neg j add cmv [size 2 idiv j add i add 1 add 2 mod] putinterval } for - } for + } for /j 0 def 0 1 npixs length 1 sub { /i exch def @@ -18478,21 +23064,21 @@ begin ] {pixs exch {} forall 3 1 roll cmv exch put} forall % Mode ring - format (full) eq { - /modemap [ - [-5 7] [-4 7] [-3 7] [-2 7] [-1 7] [ 1 7] [ 2 7] [ 3 7] [ 4 7] [ 5 7] - [ 7 5] [ 7 4] [ 7 3] [ 7 2] [ 7 1] [ 7 -1] [ 7 -2] [ 7 -3] [ 7 -4] [ 7 -5] - [ 5 -7] [ 4 -7] [ 3 -7] [ 2 -7] [ 1 -7] [-1 -7] [-2 -7] [-3 -7] [-4 -7] [-5 -7] - [-7 -5] [-7 -4] [-7 -3] [-7 -2] [-7 -1] [-7 1] [-7 2] [-7 3] [-7 4] [-7 5] - ] def - } { - /modemap [ - [-3 5] [-2 5] [-1 5] [ 0 5] [ 1 5] [ 2 5] [ 3 5] - [ 5 3] [ 5 2] [ 5 1] [ 5 0] [ 5 -1] [ 5 -2] [ 5 -3] - [ 3 -5] [ 2 -5] [ 1 -5] [ 0 -5] [-1 -5] [-2 -5] [-3 -5] - [-5 -3] [-5 -2] [-5 -1] [-5 0] [-5 1] [-5 2] [-5 3] - ] def - } ifelse +{ + /modemapfull [ + [-5 7] [-4 7] [-3 7] [-2 7] [-1 7] [ 1 7] [ 2 7] [ 3 7] [ 4 7] [ 5 7] + [ 7 5] [ 7 4] [ 7 3] [ 7 2] [ 7 1] [ 7 -1] [ 7 -2] [ 7 -3] [ 7 -4] [ 7 -5] + [ 5 -7] [ 4 -7] [ 3 -7] [ 2 -7] [ 1 -7] [-1 -7] [-2 -7] [-3 -7] [-4 -7] [-5 -7] + [-7 -5] [-7 -4] [-7 -3] [-7 -2] [-7 -1] [-7 1] [-7 2] [-7 3] [-7 4] [-7 5] + ] def + /modemapcompact [ + [-3 5] [-2 5] [-1 5] [ 0 5] [ 1 5] [ 2 5] [ 3 5] + [ 5 3] [ 5 2] [ 5 1] [ 5 0] [ 5 -1] [ 5 -2] [ 5 -3] + [ 3 -5] [ 2 -5] [ 1 -5] [ 0 -5] [-1 -5] [-2 -5] [-3 -5] + [-5 -3] [-5 -2] [-5 -1] [-5 0] [-5 1] [-5 2] [-5 3] + ] def +} ctxdef + /modemap format (full) eq {modemapfull} {modemapcompact} ifelse def 0 1 modemap length 1 sub { /i exch def pixs modemap i get {} forall cmv modebits i get 48 sub put @@ -18510,9 +23096,13 @@ begin dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /azteccode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -18521,15 +23111,15 @@ end % --END ENCODER azteccode-- % --BEGIN ENCODER azteccodecompact-- -% --REQUIRES preamble raiseerror renmatrix azteccode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix azteccode-- % --DESC: Compact Aztec Code % --EXAM: 1234 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp azteccodecompact 0.0 2017040400 59559 59303 -%%BeginData: 43 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp azteccodecompact 0.0 2022082100 62569 62441 +%%BeginData: 46 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /azteccode dup /uk.co.terryburton.bwipp findresource put @@ -18541,6 +23131,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def % Parse the input options @@ -18562,12 +23153,14 @@ begin args (opt) options put args - + dontdraw not //renmatrix if end -} bind def +} +[/barcode] {null def} forall +bind def /azteccodecompact dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -18576,15 +23169,15 @@ end % --END ENCODER azteccodecompact-- % --BEGIN ENCODER aztecrune-- -% --REQUIRES preamble raiseerror renmatrix azteccode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix azteccode-- % --DESC: Aztec Runes % --EXAM: 1 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp aztecrune 0.0 2017040400 59528 59279 -%%BeginData: 43 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp aztecrune 0.0 2022082100 62538 62417 +%%BeginData: 46 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /azteccode dup /uk.co.terryburton.bwipp findresource put @@ -18596,6 +23189,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def % Parse the input options @@ -18617,12 +23211,14 @@ begin args (opt) options put args - + dontdraw not //renmatrix if end -} bind def +} +[/barcode] {null def} forall +bind def /aztecrune dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -18631,16 +23227,19 @@ end % --END ENCODER aztecrune-- % --BEGIN ENCODER codeone-- -% --REQUIRES preamble raiseerror renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- % --DESC: Code One % --EXAM: Code One % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp codeone 0.0 2017040400 241249 250071 -%%BeginData: 856 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp codeone 0.0 2022082100 201282 203168 +%%BeginData: 903 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /codeone { @@ -18650,6 +23249,7 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def /version (unset) def /parse false def @@ -18666,52 +23266,169 @@ begin } if options {def} forall - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if - - /barlen barcode length def + /codeone //loadctx exec /stype version 0 1 getinterval (S) eq def +{ + /stypevals [ + (1) + (1010) + (1100100) + (1111101000) + (10011100010000) + (11000011010100000) + (11110100001001000000) + (100110001001011010000000) + (101111101011110000100000000) + (111011100110101100101000000000) + (1001010100000010111110010000000000) + (1011101001000011101101110100000000000) + (1110100011010100101001010001000000000000) + (10010001100001001110011100101010000000000000) + (10110101111001100010000011110100100000000000000) + (11100011010111111010100100110001101000000000000000) + (100011100001101111001001101111110000010000000000000000) + (101100011010001010111100001011101100010100000000000000000) + ] def + + % Basic metrics for the each symbol + % ver row col dcol dcws rscw rsbl ro ri rl + /stypemetrics [ + [ (S-10) 8 11 10 4 4 1 99 99 99 ] + [ (S-20) 8 21 20 8 8 1 99 99 99 ] + [ (S-30) 8 31 30 12 12 1 99 99 99 ] + ] def + + % Basic metrics for the each symbol + % ver row col dcol dcws rscw rsbl ro ri rl + /nonstypemetrics [ + [ (A) 16 18 16 10 10 1 4 99 6 ] + [ (B) 22 22 20 19 16 1 4 99 8 ] + [ (C) 28 32 28 44 26 1 4 22 11 ] + [ (D) 40 42 36 91 44 1 4 16 16 ] + [ (E) 52 54 48 182 70 1 4 22 22 ] + [ (F) 70 76 68 370 140 2 4 22 31 ] + [ (G) 104 98 88 732 280 4 6 21 47 ] + [ (H) 148 134 120 1480 560 8 6 20 69 ] + [ (T-16) 16 17 16 10 10 1 99 99 99 ] + [ (T-32) 16 33 32 24 16 1 99 99 99 ] + [ (T-48) 16 49 48 38 22 1 99 99 99 ] + ] def + + % Special characters + /fnc1 -1 def /fnc3 -2 def + /lC -5 def /lB -6 def /lX -7 def /lT -8 def /lD -9 def /unl -10 def + /fnc2 -11 def /fnc4 -12 def /sft1 -13 def /sft2 -14 def /sft3 -15 def /eci -16 def /pad -17 def /fnc1lD -18 def + /unlcw 255 def + + /Avals << + 0 1 128 {dup 1 add} for + pad 129 + 0 1 99 { % Double digits + dup 10 2 string cvrs (00) 2 string copy dup 2 3 index length sub 4 -1 roll putinterval + exch 130 add + } for + 229 [ lC lB fnc1 fnc2 fnc3 fnc4 fnc1lD ] {exch 1 add dup} forall pop + lX 238 + lT 239 + % 240-255 lD + 4 bits + >> def + /Avals << + Avals {[exch]} forall + >> def + + /CNvals << + sft1 0 + sft2 1 + sft3 2 + 32 3 + 48 1 57 {dup 44 sub} for % 0-9 + 65 1 90 {dup 51 sub} for % A-Z + >> def + /C1vals << 0 1 31 {dup} for >> def + /C2vals << + 33 1 47 {dup 33 sub} for + 58 1 64 {dup 43 sub} for + 91 1 95 {dup 69 sub} for + fnc1 27 + fnc2 28 + fnc3 29 + fnc4 30 + pad 31 + >> def + /C3vals << 96 1 127 {dup 96 sub} for >> def + /Cvals << + CNvals {[exch]} forall + C1vals {[exch CNvals sft1 get exch]} forall + C2vals {[exch CNvals sft2 get exch]} forall + C3vals {[exch CNvals sft3 get exch]} forall + >> def + + /TNvals << + sft1 0 + sft2 1 + sft3 2 + 32 3 + 48 1 57 {dup 44 sub} for % 0-9 + 97 1 122 {dup 83 sub} for % a-z + >> def + /T1vals << 0 1 31 {dup} for >> def + /T2vals << + 33 1 47 {dup 33 sub} for + 58 1 64 {dup 43 sub} for + 91 1 95 {dup 69 sub} for + fnc1 27 + fnc2 28 + fnc3 29 + fnc4 30 + pad 31 + >> def + /T3vals << + 96 0 + 65 1 90 {dup 64 sub} for + 123 1 127 {dup 96 sub} for + >> def + /Tvals << + TNvals {[exch]} forall + T1vals {[exch TNvals sft1 get exch]} forall + T2vals {[exch TNvals sft2 get exch]} forall + T3vals {[exch TNvals sft3 get exch]} forall + >> def + + % Extended ASCII mappings + 128 1 255 { + /i exch def + Avals i [ Avals fnc4 get aload pop Avals i 128 sub get aload pop ] put + Cvals i [ Cvals fnc4 get aload pop Cvals i 128 sub get aload pop ] put + Tvals i [ Tvals fnc4 get aload pop Tvals i 128 sub get aload pop ] put + } for + + /Xvals << + 13 0 + 42 1 + 62 2 + 32 3 + 48 1 57 {dup 44 sub} for + 65 1 90 {dup 51 sub} for + >> def + /Xvals << + Xvals {[exch]} forall + >> def + + /Bvals << + 0 1 255 {dup} for + >> def + /Bvals << + Bvals {[exch]} forall + >> def + + /encvals [ Avals Cvals Tvals Xvals -1 Bvals ] def + + /A 0 def /C 1 def /T 2 def /X 3 def /D 4 def /B 5 def +} ctxdef + stype { - /vals [ - (1) - (1010) - (1100100) - (1111101000) - (10011100010000) - (11000011010100000) - (11110100001001000000) - (100110001001011010000000) - (101111101011110000100000000) - (111011100110101100101000000000) - (1001010100000010111110010000000000) - (1011101001000011101101110100000000000) - (1110100011010100101001010001000000000000) - (10010001100001001110011100101010000000000000) - (10110101111001100010000011110100100000000000000) - (11100011010111111010100100110001101000000000000000) - (100011100001101111001001101111110000010000000000000000) - (101100011010001010111100001011101100010100000000000000000) - ] def /normalize { /base exch def @@ -18731,7 +23448,7 @@ begin /num [/i true def num {dup 0 eq i and {pop} {/i false def} ifelse} forall] def num length 0 eq {/num [0] def} if num - } bind def + } def /bigadd { 2 copy length exch length @@ -18742,13 +23459,15 @@ begin dup a exch offset add 2 copy get b 5 -1 roll get add put } for a - } bind def + } def + + /barlen barcode length def % Convert value plus one to binary /v [ 1 ] def 0 1 barlen 1 sub { /i exch def - [ vals i get {48 sub barcode barlen i sub 1 sub get 48 sub mul} forall ] + [ stypevals i get {48 sub barcode barlen i sub 1 sub get 48 sub mul} forall ] v bigadd /v exch def } for /v v 2 normalize def @@ -18763,57 +23482,54 @@ begin cws exch i exch put } for - % Basic metrics for the each symbol - % ver row col dcol dcws rscw rsbl ro ri rl - /metrics [ - [ (S-10) 8 11 10 4 4 1 99 99 99 ] - [ (S-20) 8 21 20 8 8 1 99 99 99 ] - [ (S-30) 8 31 30 12 12 1 99 99 99 ] - ] def + /metrics stypemetrics def } { % Standard and type-T % Convert input into bytes accounting for FNC characters - /fnc1 -1 def /fnc3 -2 def /fncvals << + /parse parse + /parsefnc parsefnc + /eci true (FNC1) fnc1 (FNC3) fnc3 >> def - /msg barlen array def - /i 0 def /j 0 def { - i barlen eq {exit} if - /char barcode i get def - parsefnc char 94 eq and i barlen 4 sub lt and { - barcode i 1 add get 94 ne { - /char fncvals barcode i 1 add 4 getinterval get def - /i i 4 add def + /msg barcode fncvals //parseinput exec def + /msglen msg length def + + % Code One stores ECIs in data + /eciesc 16#5c def % We choose \ as a typical default + /numecis 0 msg { -1000000 le {1 add} if } forall def + numecis 0 gt { + /msgtmp msg length 2 mul numecis 6 mul add 2 add array def + msgtmp 0 pad put + msgtmp 1 eciesc put + /j 2 def + 0 1 msg length 1 sub { + msg exch get + dup -1000000 le { + neg 10 7 string cvrs 1 6 getinterval {} forall 6 array astore + msgtmp exch j 1 add exch putinterval + msgtmp j eciesc put + /j j 7 add def } { - /i i 1 add def + dup eciesc ne { + msgtmp exch j exch put + /j j 1 add def + } { + pop + msgtmp j eciesc put + msgtmp j 1 add eciesc put + /j j 2 add def + } ifelse } ifelse - } if - msg j char put - /i i 1 add def - /j j 1 add def - } loop - /msg msg 0 j getinterval def - /msglen msg length def + } for + /msg msgtmp 0 j getinterval def + /msglen msg length def + } if + + /metrics nonstypemetrics def - % Basic metrics for the each symbol - % ver row col dcol dcws rscw rsbl ro ri rl - /metrics [ - [ (A) 16 18 16 10 10 1 4 99 6 ] - [ (B) 22 22 20 19 16 1 4 99 8 ] - [ (C) 28 32 28 44 26 1 4 22 11 ] - [ (D) 40 42 36 91 44 1 4 16 16 ] - [ (E) 52 54 48 182 70 1 4 22 22 ] - [ (F) 70 76 68 370 140 2 4 22 31 ] - [ (G) 104 98 88 732 280 4 6 21 47 ] - [ (H) 148 134 120 1480 560 8 6 20 69 ] - [ (T-16) 16 17 16 10 10 1 99 99 99 ] - [ (T-32) 16 33 32 24 16 1 99 99 99 ] - [ (T-48) 16 49 48 38 22 1 99 99 99 ] - ] def - % Select metrics of an appropriate symbol /fullcws [] def metrics { @@ -18836,115 +23552,7 @@ begin numremcws i numremcws i 1 add get 1 add put } if } for - - % Special characters - /lC -5 def /lB -6 def /lX -7 def /lT -8 def /lD -9 def /unl -10 def - /fnc2 -11 def /fnc4 -12 def /sft1 -13 def /sft2 -14 def /sft3 -15 def /eci -16 def /pad -17 def /fnc1lD -18 def - /unlcw 255 def - - /Avals << - 0 1 128 {dup 1 add} for - pad 129 - 0 1 99 { % Double digits - dup 10 2 string cvrs (00) 2 string copy dup 2 3 index length sub 4 -1 roll putinterval - exch 130 add - } for - 229 [ lC lB fnc1 fnc2 fnc3 fnc4 fnc1lD ] {exch 1 add dup} forall pop - lX 238 - lT 239 - % 240-255 lD + 4 bits - >> def - /Avals << - Avals {[exch]} forall - >> def - - /CNvals << - sft1 0 - sft2 1 - sft3 2 - 32 3 - 48 1 57 {dup 44 sub} for % 0-9 - 65 1 90 {dup 51 sub} for % A-Z - >> def - /C1vals << 0 1 31 {dup} for >> def - /C2vals << - 33 1 47 {dup 33 sub} for - 58 1 64 {dup 43 sub} for - 91 1 95 {dup 69 sub} for - fnc1 27 - fnc2 28 - fnc3 29 - fnc4 30 - pad 31 - >> def - /C3vals << 96 1 127 {dup 96 sub} for >> def - /Cvals << - CNvals {[exch]} forall - C1vals {[exch CNvals sft1 get exch]} forall - C2vals {[exch CNvals sft2 get exch]} forall - C3vals {[exch CNvals sft3 get exch]} forall - >> def - - /TNvals << - sft1 0 - sft2 1 - sft3 2 - 32 3 - 48 1 57 {dup 44 sub} for % 0-9 - 97 1 122 {dup 83 sub} for % a-z - >> def - /T1vals << 0 1 31 {dup} for >> def - /T2vals << - 33 1 47 {dup 33 sub} for - 58 1 64 {dup 43 sub} for - 91 1 95 {dup 69 sub} for - fnc1 27 - fnc2 28 - fnc3 29 - fnc4 30 - pad 31 - >> def - /T3vals << - 96 0 - 65 1 90 {dup 64 sub} for - 123 1 127 {dup 96 sub} for - >> def - /Tvals << - TNvals {[exch]} forall - T1vals {[exch TNvals sft1 get exch]} forall - T2vals {[exch TNvals sft2 get exch]} forall - T3vals {[exch TNvals sft3 get exch]} forall - >> def - - % Extended ASCII mappings - 128 1 255 { - /i exch def - Avals i [ Avals fnc4 get aload pop Avals i 128 sub get aload pop ] put - Cvals i [ Cvals fnc4 get aload pop Cvals i 128 sub get aload pop ] put - Tvals i [ Tvals fnc4 get aload pop Tvals i 128 sub get aload pop ] put - } for - - /Xvals << - 13 0 - 42 1 - 62 2 - 32 3 - 48 1 57 {dup 44 sub} for - 65 1 90 {dup 51 sub} for - >> def - /Xvals << - Xvals {[exch]} forall - >> def - - /Bvals << - 0 1 255 {dup} for - >> def - /Bvals << - Bvals {[exch]} forall - >> def - - /encvals [ Avals Cvals Tvals Xvals -1 Bvals ] def - + /numD [ msglen {0} repeat 0 ] def /nextXterm [ msglen {0} repeat 9999 ] def /nextNonX [ msglen {0} repeat 9999 ] def @@ -18967,17 +23575,15 @@ begin } for /nextXterm [nextXterm {dup 10000 gt {pop 10000} if} forall] def /nextNonX [nextNonX {dup 10000 gt {pop 10000} if} forall] def - - /isD {char 48 ge char 57 le and} bind def - /isC {CNvals char known} bind def - /isT {TNvals char known} bind def - /isX {Xvals char known} bind def - /isEA {char 127 gt} bind def - /isFN {char 0 lt} bind def - /XtermFirst {dup nextXterm exch get exch nextNonX exch get lt} bind def - - /A 0 def /C 1 def /T 2 def /X 3 def /D 4 def /B 5 def - + + /isD {char 48 ge char 57 le and} def + /isC {CNvals char known} def + /isT {TNvals char known} def + /isX {Xvals char known} def + /isEA {char 127 gt} def + /isFN {char 0 lt} def + /XtermFirst {dup nextXterm exch get exch nextNonX exch get lt} def + /lookup { /ac 1 def /cc 2 def /tc 2 def /xc 2 def /bc 3 def mode A eq {/ac 0 def /cc 1 def /tc 1 def /xc 1 def /bc 2 def} if @@ -19000,32 +23606,32 @@ begin /tc tc isT {2 3 div add} {isEA { 8 3 div add } { 4 3 div add } ifelse} ifelse def /xc xc isX {2 3 div add} {isEA {13 3 div add } {10 3 div add } ifelse} ifelse def /bc bc isFN {3 add} {1 add} ifelse def - k 3 ge { + k 3 ge { % Checking after at least 4 characters (cf. Data Matrix), not 3 as in spec Step Q true [ac cc tc xc ] {bc 1 add exch ceiling le and} forall {B exit} if true [ cc tc xc bc] {ac 1 add exch ceiling le and} forall {A exit} if - true [ac cc xc bc] {tc 1 add exch ceiling le and} forall {T exit} if - true [ac tc ] {cc 1 add exch ceiling le and} forall { + true [ac cc xc bc] {tc ceiling 1 add exch ceiling le and} forall {T exit} if + true [ac tc ] {cc ceiling 1 add exch ceiling le and} forall { cc ceiling xc ceiling lt {C exit} if cc xc eq {i k add 1 add XtermFirst {X exit} {C exit} ifelse} if } if - true [ac cc tc bc] {xc 1 add exch lt and} forall {X exit} if + true [ac cc tc bc] {xc ceiling 1 add exch ceiling le and} forall {X exit} if } if /k k 1 add def } loop } repeat - } bind def - + } def + /addtocws { dup cws exch j exch putinterval /j exch length j add def - } bind def - + } def + /tobin { string dup length 1 sub 0 exch 1 exch {1 index exch 48 put} for dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval [ exch {48 sub} forall ] - } bind def - + } def + /encA { 1 { % Common exit numD i get 21 ge { @@ -19069,8 +23675,8 @@ begin /i i 1 add def exit } repeat - } bind def - + } def + /CTXvalstocws { /in exch def mark @@ -19079,33 +23685,52 @@ begin dup 256 idiv exch 256 mod } for counttomark array astore exch pop - } bind def - + } def + /encCTX { /p 0 def /ctxvals 2220 array def - + % Lookup the values for each character { i msglen eq {exit} if - encvals mode get msg i get known not {exit} if p 3 mod 0 eq { numD i get 12 ge { + ctxvals 0 p getinterval CTXvalstocws addtocws [unlcw] addtocws /mode A def exit } if numD i get dup 8 ge exch i add msglen eq and { - [unlcw] addtocws - /mode A def - exit - } if - lookup mode ne { ctxvals 0 p getinterval CTXvalstocws addtocws [unlcw] addtocws /mode A def exit } if + mode X eq { % Steps E1c, E2 + Xvals msg i get known not { + ctxvals 0 p getinterval CTXvalstocws addtocws + % Unlatch to ASCII unless one codeword left and single ASCII to encode + numremcws j get 1 ne msg i get 127 gt or { + [unlcw] addtocws + } if + /mode A def + exit + } if + i 1 add msglen lt { + Xvals msg i 1 add get known not {exit} if + i 2 add msglen lt { + Xvals msg i 2 add get known not {exit} if + } if + } if + } { + lookup mode ne { + ctxvals 0 p getinterval CTXvalstocws addtocws + [unlcw] addtocws + /mode A def + exit + } if + } ifelse msglen i sub 3 le { % Check end of data conditions /remcws numremcws j p 3 idiv 2 mul add get def /remvals [ @@ -19162,7 +23787,7 @@ begin /p exch length p add def /i i 1 add def } loop - + % Backtrack to a boundary and return to ASCII mode A ne { { @@ -19186,11 +23811,11 @@ begin } ifelse } if } if - - } bind def - + + } def + /encD { - + { % loop numD i get 3 lt { @@ -19199,13 +23824,19 @@ begin /remcws numremcws j Dbits length 8 idiv add get def % Final codeword with no data - numremcws j Dbits length 8 idiv add 1 sub get 1 sub 0 eq - i msglen eq and {exit} if - - % Final digit into final codeword as ASCII + numremcws j Dbits length 8 idiv add 1 sub get 1 sub 0 eq Drem 0 eq and % No remaining codewords and no bits + remcws 1 eq Drem 0 ne and or % Or 1 remaining codeword and some bits + i msglen eq and { + Drem 4 eq Drem 6 eq or { /Dbits [ Dbits aload pop 1 1 1 1 ] def } if + Drem 2 eq Drem 6 eq or { /Dbits [ Dbits aload pop 0 1 ] def } if + exit + } if + + % Final digit or double-digit into final codeword as ASCII i msglen 1 sub eq numD i get 1 eq and + i msglen 2 sub eq numD i get 2 eq and or remcws 1 eq and Drem 0 eq and {exit} if - + % Latch to ASCII unless 4 or 6 bits remain in final codeword i msglen 1 sub eq numD i get 1 eq and remcws 1 eq and Drem 4 eq Drem 6 eq or and not { @@ -19229,9 +23860,9 @@ begin } if exit - + } if - + % Three digit value plus one to ten bits /Dbits [ Dbits aload pop @@ -19239,7 +23870,7 @@ begin 1 add 10 tobin aload pop ] def /i i 3 add def - + } loop mark @@ -19249,8 +23880,8 @@ begin counttomark array astore exch pop addtocws /mode A def - } bind def - + } def + /encB { /p 0 def /bvals 1480 array def { i msglen eq {exit} if @@ -19271,7 +23902,7 @@ begin ] def bvals addtocws /mode A def - } bind def + } def % Derive the codewords /cws 1480 array def @@ -19280,7 +23911,7 @@ begin [ /encA /encCTX /encCTX /encCTX /encD /encB ] mode get load exec } loop /cws cws 0 j getinterval def - + } ifelse % Select metrics of an appropriate symbol @@ -19292,7 +23923,7 @@ begin /cols m 2 get def % Columns in symbol /dcol m 3 get def % Data columns in symbol /dcws m 4 get def % Data codewords in symbol - /rscw m 5 get def % Error correction codewords + /rscw m 5 get def % Error correction codewords /rsbl m 6 get def % Error correction blocks /riso m 7 get def % Riser offset /risi m 8 get def % Riser interval @@ -19313,16 +23944,18 @@ begin /cws [ dcws cws length sub {0} repeat cws aload pop ] def } ifelse + options /debugcws known { /bwipp.debugcws cws //raiseerror exec } if + % De-interleave the codewords into blocks /cwbs rsbl array def % Array of data codeword blocks /ecbs rsbl array def % Array of error correction blocks 0 1 rsbl 1 sub { /i exch def - /cwb dcpb array def + /cwb dcpb array def 0 1 dcpb 1 sub { /j exch def cwb j cws j rsbl mul i add get put - } for + } for cwbs i cwb put } for @@ -19334,22 +23967,22 @@ begin /rslog gf array def 1 1 gf-1 {dup rsalog exch get exch rslog 3 1 roll put} for /rsprod { - 2 copy 0 ne exch 0 ne and { + 2 copy 0 ne exch 0 ne and { rslog exch get exch rslog exch get add gf-1 mod rsalog exch get } { pop pop 0 } ifelse - } bind def + } def % Generate the coefficients for the Reed-Solomon algorithm /coeffs [ 1 ecpb {0} repeat ] def 0 1 ecpb 1 sub { - /i exch def + /i exch def coeffs i 1 add coeffs i get put i -1 1 { /j exch def coeffs j coeffs j 1 sub get coeffs j get rsalog i get rsprod xor put - } for + } for coeffs 0 coeffs 0 get rsalog i get rsprod put } for /coeffs coeffs 0 coeffs length 1 sub getinterval def @@ -19403,21 +24036,22 @@ begin } for % Create bitmap and add finder patterns - /mmv {cols mul add} bind def + /mmv {cols mul add} def /pixs [ rows cols mul {-1} repeat ] def % Centre pattern /artifact [ - {cols {0} repeat} bind - {cols {1} repeat} bind - {0 cols 2 sub {1} repeat 0} bind - {0 1 cols 4 sub {0} repeat 1 0} bind - {cols 1 sub 2 idiv {-1} repeat 1 cols 1 sub 2 idiv {-1} repeat} bind - {cols 1 sub 2 idiv {-1} repeat 0 cols 1 sub 2 idiv {-1} repeat} bind - {1 cols 2 sub {0} repeat 1} bind - {1 0 cols 4 sub {1} repeat 0 1} bind + {cols {0} repeat} bind + {cols {1} repeat} bind + {0 cols 2 sub {1} repeat 0} bind + {0 1 cols 4 sub {0} repeat 1 0} bind + {cols 1 sub 2 idiv {-1} repeat 1 cols 1 sub 2 idiv {-1} repeat} bind + {cols 1 sub 2 idiv {-1} repeat 0 cols 1 sub 2 idiv {-1} repeat} bind + {1 cols 2 sub {0} repeat 1} bind + {1 0 cols 4 sub {1} repeat 0 1} bind ] def - /cpat << +{ + /cpatmap << /A (121343) /B (12134343) /C (12121343) @@ -19428,8 +24062,10 @@ begin /H (121212134343) /S (56661278) /T (5666666666127878) - >> vers 0 1 getinterval get def - pixs 0 rows cpat length sub 2 idiv mmv + >> def +} ctxdef + /cpat cpatmap vers 0 1 getinterval get def + pixs 0 rows cpat length sub 2 idiv mmv [ cpat {artifact exch 49 sub get exec} forall ] putinterval % Risers @@ -19441,14 +24077,15 @@ begin pixs j i mmv 3 -1 roll putinterval i risl 1 sub ne { - pixs cols j sub 2 sub rows i sub 1 sub mmv + pixs cols j sub 2 sub rows i sub 1 sub mmv 3 -1 roll putinterval } {pop} ifelse } for } for % Black dots - << +{ + /blackdotmap << /A [ [12 5] ] /B [ [16 7] ] /C [ [26 12] ] @@ -19463,7 +24100,9 @@ begin /T-16 [ [8 10] ] /T-32 [ [16 10] [16 12] ] /T-48 [ [24 10] [24 12] [24 14] ] - >> vers get {pixs exch aload pop mmv 1 put} forall + >> def +} ctxdef + blackdotmap vers get {pixs exch aload pop mmv 1 put} forall % Place the modules onto a pixel map between alignment patterns /j 0 def @@ -19488,9 +24127,13 @@ begin dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /codeone dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -19499,16 +24142,19 @@ end % --END ENCODER codeone-- % --BEGIN ENCODER hanxin-- -% --REQUIRES preamble raiseerror renmatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- % --DESC: Han Xin Code % --EXAM: This is Han Xin % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp hanxin 0.0 2017040400 371193 376561 -%%BeginData: 886 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp hanxin 0.0 2022082100 304477 334267 +%%BeginData: 863 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /hanxin { @@ -19518,6 +24164,7 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def /version (unset) def % 1-84 /eclevel (unset) def % L1, L2, L3 or L4 @@ -19538,50 +24185,15 @@ begin /mask mask cvi def - % Parse ordinals of the form ^NNN to ASCII - parse { - /msg barcode length string def - /j 0 def - barcode - { % loop - (^) search { - dup msg exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi msg exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup msg exch j exch putinterval - length j add /j exch def - /barcode msg 0 j getinterval def - exit - } ifelse - } loop - } if + /hanxin //loadctx exec - /barlen barcode length def - - % Convert input into bytes accounting for FNC characters + % Parse the input /fncvals << + /parse parse + /parsefnc parsefnc % No FNC characters defined >> def - /msg barlen array def - /i 0 def /j 0 def { - i barlen eq {exit} if - /char barcode i get def - parsefnc char 94 eq and i barlen 4 sub lt and { - barcode i 1 add get 94 ne { - /char fncvals barcode i 1 add 4 getinterval get def - /i i 4 add def - } { - /i i 1 add def - } ifelse - } if - msg j char put - /i i 1 add def - /j j 1 add def - } loop - /msg msg 0 j getinterval def + /msg barcode fncvals //parseinput exec def /msglen msg length def % Default error correction level @@ -19591,7 +24203,7 @@ begin string dup length 1 sub 0 exch 1 exch {1 index exch 48 put} for dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval - } bind def + } def % Encode the data using byte mode encoding /bits 4 13 add msglen 8 mul add string def @@ -19603,6 +24215,7 @@ begin } for % Lookup the most appropriate symbol specification +{ /metrics [ % vers size align modules error correction blocks [ (1) 23 -1 0 205 [ 1 21 4 ] [ 0 -1 -1 ] [ 0 -1 -1 ] @@ -19942,6 +24555,7 @@ begin [ 2 26 26 ] [ 62 33 28 ] [ 0 -1 -1 ] [ 79 18 28 ] [ 4 33 30 ] [ 0 -1 -1 ] ] ] def +} ctxdef /eclval eclevel 1 get 49 sub def 0 1 83 { @@ -19964,9 +24578,9 @@ begin bits length dmod gt {/okay false def} if % Bitstream must fit into data modules okay {exit} if } for - + okay not { - /bwipp.hanxinNoValidSymbol (No valid symbol available) //raiseerror exec + /bwipp.hanxinNoValidSymbol (Maximum length exceeded or invalid content) //raiseerror exec } if /version vers def @@ -20012,7 +24626,7 @@ begin } { pop pop 0 } ifelse - } bind def + } def % Generate the coefficients /coeffs [ 1 rsnc {0} repeat ] def @@ -20040,7 +24654,7 @@ begin % Return all but the last codeword rscws 0 rscws length 1 sub getinterval - } bind def + } def % Divide codewords into two groups of blocks and calculate the error correction codewords /dcwsb e1nb e2nb add e3nb add array def @@ -20080,7 +24694,7 @@ begin 13 ncws 1 sub { dup ncws lt {cws exch get} {pop} ifelse } for } for ] def - + % Extend codewords by one if there are remainder bits rbit 0 gt { /pad cws length 1 add array def @@ -20091,15 +24705,15 @@ begin % Create the bitmap /pixs [ size size mul {-1} repeat ] def - /qmv {size mul add} bind def + /qmv {size mul add} def % Alignment patterns alnn 0 ne { - /trmv {size mul size add 1 sub exch sub} bind def + /trmv {size mul size add 1 sub exch sub} def /aplot { 3 1 roll 3 copy exch trmv pixs exch 3 -1 roll put trmv pixs exch 3 -1 roll put - } bind def + } def /i 0 def /stag 0 def { i size ge {exit} if 0 1 size 1 sub { @@ -20153,6 +24767,7 @@ begin } if % Finder patterns +{ /fpat [ [ 1 1 1 1 1 1 1 0 ] [ 1 0 0 0 0 0 0 0 ] @@ -20173,6 +24788,7 @@ begin [ 1 1 1 1 1 1 1 0 ] [ 0 0 0 0 0 0 0 0 ] ] def +} ctxdef 0 1 fpat length 1 sub { /y exch def 0 1 fpat 0 get length 1 sub { @@ -20292,8 +24908,8 @@ begin } if } for scr1 scr3 - } bind def - + } def + % Evaluation algorithm /evalfull { /sym exch def @@ -20330,8 +24946,8 @@ begin } for n1 n3 add - } bind def - + } def + % Evaluate the masked symbols to find the most suitable /bestscore 999999999 def 0 1 masks length 1 sub { @@ -20386,9 +25002,13 @@ begin dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /hanxin dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -20396,34 +25016,2638 @@ end %%EndResource % --END ENCODER hanxin-- +% --BEGIN ENCODER dotcode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- +% --DESC: DotCode +% --EXAM: This is DotCode +% --EXOP: inkspread=0.16 +% --RNDR: renmatrix +%%BeginResource: uk.co.terryburton.bwipp dotcode 0.0 2022082100 238866 247484 +%%BeginData: 1067 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +begin +/dotcode { + + 20 dict begin + + /options exch def + /barcode exch def + + /ctx null def + /dontdraw false def + /rows -1 def + /columns -1 def + /ratio -1 def + /parse false def + /parsefnc false def + /raw false def + /fast false def + /mask -1 def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + /rows rows cvi def + /columns columns cvi def + /ratio ratio cvr def + /mask mask cvi def + + /dotcode //loadctx exec + + % Set the ratio to 3:2 if no size is specified + ratio -1 eq rows -1 eq and columns -1 eq and { + /ratio 3 2 div def + } if + + % Convert input into bytes accounting for FNC characters +{ + /laa -1 def /lab -2 def /lac -3 def /bin -4 def + /sfa -5 def /sfb -6 def /sb2 -7 def /sb3 -8 def + /sb4 -9 def /sb5 -10 def /sb6 -11 def /sfc -12 def + /sc2 -13 def /sc3 -14 def /sc4 -15 def /sc5 -16 def + /sc6 -17 def /sc7 -18 def /bsa -19 def /bsb -20 def + /tma -21 def /tmb -22 def /tmc -23 def /tms -24 def + /fn1 -25 def /fn2 -26 def /fn3 -27 def /crl -28 def + /aim -29 def /m05 -30 def /m06 -31 def /m12 -32 def + /mac -33 def +} ctxdef + + % Parse the input + /fncvals << + /parse parse + /parsefnc parsefnc + /eci true + (FNC1) fn1 + % (FNC2) fn2 % Use ^ECInnnnnn for ECI; Structured append not supported + (FNC3) fn3 + >> def + /msg barcode fncvals //parseinput exec def + /msglen msg length def + + % Special FNC2 semantics: Expand ECI characters into ^FNC2nnnnnn + /numecis 0 msg { -1000000 le {1 add} if } forall def + /msgtmp msg length numecis 6 mul add array def + /j 0 def + 0 1 msg length 1 sub { + msg exch get dup -1000000 le { + neg 10 7 string cvrs 1 6 getinterval {} forall 6 array astore + msgtmp exch j 1 add exch putinterval + msgtmp j fn2 put + /j j 7 add def + } { + msgtmp exch j exch put + /j j 1 add def + } ifelse + } for + /msg msgtmp def + /msglen msg length def + + % Character maps for each state +{ + /charmaps [ + % A B C A B C A B C + [ 32 32 (00) ] [ (!) (!) (01) ] [ (") (") (02) ] % 0-2 + [ (#) (#) (03) ] [ ($) ($) (04) ] [ (%) (%) (05) ] % 3-5 + [ (&) (&) (06) ] [ (') (') (07) ] [ 40 40 (08) ] % 6-8 + [ 41 41 (09) ] [ (*) (*) (10) ] [ (+) (+) (11) ] % 9-11 + [ (,) (,) (12) ] [ (-) (-) (13) ] [ (.) (.) (14) ] % 12-14 + [ (/) (/) (15) ] [ (0) (0) (16) ] [ (1) (1) (17) ] % 15-17 + [ (2) (2) (18) ] [ (3) (3) (19) ] [ (4) (4) (20) ] % 18-20 + [ (5) (5) (21) ] [ (6) (6) (22) ] [ (7) (7) (23) ] % 21-23 + [ (8) (8) (24) ] [ (9) (9) (25) ] [ (:) (:) (26) ] % 24-26 + [ (;) (;) (27) ] [ (<) (<) (28) ] [ (=) (=) (29) ] % 27-29 + [ (>) (>) (30) ] [ (?) (?) (31) ] [ (@) (@) (32) ] % 30-32 + [ (A) (A) (33) ] [ (B) (B) (34) ] [ (C) (C) (35) ] % 33-35 + [ (D) (D) (36) ] [ (E) (E) (37) ] [ (F) (F) (38) ] % 36-38 + [ (G) (G) (39) ] [ (H) (H) (40) ] [ (I) (I) (41) ] % 39-41 + [ (J) (J) (42) ] [ (K) (K) (43) ] [ (L) (L) (44) ] % 42-44 + [ (M) (M) (45) ] [ (N) (N) (46) ] [ (O) (O) (47) ] % 45-47 + [ (P) (P) (48) ] [ (Q) (Q) (49) ] [ (R) (R) (50) ] % 48-50 + [ (S) (S) (51) ] [ (T) (T) (52) ] [ (U) (U) (53) ] % 51-53 + [ (V) (V) (54) ] [ (W) (W) (55) ] [ (X) (X) (56) ] % 54-56 + [ (Y) (Y) (57) ] [ (Z) (Z) (58) ] [ ([) ([) (59) ] % 57-59 + [ 92 92 (60) ] [ (]) (]) (61) ] [ (^) (^) (62) ] % 60-62 + [ (_) (_) (63) ] [ 0 (`) (64) ] [ 1 (a) (65) ] % 63-65 + [ 2 (b) (66) ] [ 3 (c) (67) ] [ 4 (d) (68) ] % 66-68 + [ 5 (e) (69) ] [ 6 (f) (70) ] [ 7 (g) (71) ] % 69-71 + [ 8 (h) (72) ] [ 9 (i) (73) ] [ 10 (j) (74) ] % 72-74 + [ 11 (k) (75) ] [ 12 (l) (76) ] [ 13 (m) (77) ] % 75-77 + [ 14 (n) (78) ] [ 15 (o) (79) ] [ 16 (p) (80) ] % 78-80 + [ 17 (q) (81) ] [ 18 (r) (82) ] [ 19 (s) (83) ] % 81-83 + [ 20 (t) (84) ] [ 21 (u) (85) ] [ 22 (v) (86) ] % 84-86 + [ 23 (w) (87) ] [ 24 (x) (88) ] [ 25 (y) (89) ] % 87-89 + [ 26 (z) (90) ] [ 27 ({) (91) ] [ 28 (|) (92) ] % 90-92 + [ 29 (}) (93) ] [ 30 (~) (94) ] [ 31 127 (95) ] % 93-95 + [ sfb crl (96) ] [ sb2 9 (97) ] [ sb3 28 (98) ] % 96-98 + [ sb4 29 (99) ] [ sb5 30 aim ] [ sb6 sfa laa ] % 99-101 + [ lab laa sfb ] [ sc2 sc2 sb2 ] [ sc3 sc3 sb3 ] % 102-104 + [ sc4 sc4 sb4 ] [ lac lac lab ] [ fn1 fn1 fn1 ] % 105-107 + [ fn2 fn2 fn2 ] [ fn3 fn3 fn3 ] [ bsa bsa bsa ] % 108-110 + [ bsb bsb bsb ] [ bin bin bin ] % 111-112 + ] def + + % Invert charmaps to give character to value maps for each state + /charvals [ 113 dict 117 dict 113 dict ] def + 0 1 charmaps length 1 sub { + /i exch def + /encs charmaps i get def + 0 1 2 { + /j exch def + encs j get dup type /stringtype eq {0 get} if % convert string to ASCII if required + charvals j get exch i put + } for + } for + /Avals charvals 0 get def + /Bvals charvals 1 get def + Bvals m05 97 put + Bvals m06 98 put + Bvals m12 99 put + Bvals mac 100 put + /Cvals charvals 2 get def + /BINvals << + 102 [ sc2 sc3 sc4 sc5 sc6 sc7 tma tmb tmc tms ] {exch 1 add dup} forall pop + >> def + + /A 0 def /B 1 def /C 2 def /BIN 3 def +} ctxdef + + % Pre-compute properties of the input at each point + /nDigits [ msglen 1 add {0} repeat ] def + /SeventeenTen [ msglen 1 add {false} repeat ] def + /ECI [ msglen 1 add {false} repeat ] def + /DatumA [ msglen 1 add {false} repeat ] def + /DatumB [ msglen 1 add {false} repeat ] def + /DatumC [ msglen 1 add {false} repeat ] def + /Binary [ msglen 8 add {false} repeat ] def + /AheadC [ msglen 1 add {0} repeat ] def + /TryC [ msglen 1 add {0} repeat ] def + /AheadA [ msglen 1 add {0} repeat ] def + /AheadB [ msglen 1 add {0} repeat ] def + /UntilEndSeg [ msglen 1 add {0} repeat ] def + msglen 1 sub -1 0 { + /i exch def + /barchar msg i get def + barchar 48 ge barchar 57 le and { + nDigits i nDigits i 1 add get 1 add put + } if + Avals barchar known {DatumA i true put} if + Bvals barchar known {DatumB i true put} if + /CRLF false def + barchar 13 eq i msglen 1 sub lt and { + msg i 1 add get 10 eq {/CRLF true def} if + } if + CRLF {DatumB i true put} if + nDigits i get 2 ge {DatumC i true put} if + barchar 0 lt {DatumC i true put} if % FNCx + barchar 128 ge {Binary i true put} if + nDigits i get 10 ge { % 17xxxxxx10 + mark + msg i 10 getinterval aload pop + 1 { % common exit + 48 ne {false exit} if + 49 ne {false exit} if + pop pop pop pop pop pop + 55 ne {false exit} if + 49 ne {false exit} if + true + } repeat + SeventeenTen i 3 -1 roll put + cleartomark + } if + nDigits i 1 add get 6 ge msg i get fn2 eq and { % ^FNC2xxxxxx + ECI i true put + } if + barchar 0 lt barchar fn3 ne and { % FNCx, except FNC3 + AheadC i AheadC i 1 add get 1 add put + } { + nDigits i get 1 le { + AheadC i 0 put + } { + AheadC i AheadC i 2 add get 1 add put + } ifelse + } ifelse + nDigits i get 0 gt AheadC i get AheadC i 1 add get gt and { + TryC i AheadC i get put + } if + DatumA i get TryC i get 2 lt and barchar fn3 ne and { + AheadA i AheadA i 1 add get 1 add put + } if + DatumB i get TryC i get 2 lt and barchar fn3 ne and { + AheadB i AheadB i 1 add CRLF {1 add} if get 1 add put + } if + barchar fn3 ne { + UntilEndSeg i UntilEndSeg i 1 add get 1 add put + } if + } for + + /addtocws { + dup cws exch j exch putinterval + /j exch length j add def + } def + + % Base 259 to one more in base 103 + /base259to103 { + /in exch def + /inlen in length def + /in [ 5 inlen sub {0} repeat in aload pop ] def + /out 6 array def + /msbs [ in 0 2 getinterval aload pop ] def + /mscs [ + msbs aload pop exch 259 mul add + 2 {dup 103 mod exch 103 idiv} repeat + ] def + /lsbs [ in 2 3 getinterval aload pop ] def + /lscs [ + lsbs aload pop exch 259 mul add exch 67081 mul add + 3 {dup 103 mod exch 103 idiv} repeat + ] def + lscs 0 get mscs 0 get 42 mul add + out 5 2 index 103 mod put + 103 idiv lscs 1 get add mscs 0 get 68 mul add mscs 1 get 42 mul add + out 4 2 index 103 mod put + 103 idiv lscs 2 get add mscs 0 get 92 mul add mscs 1 get 68 mul add mscs 2 get 42 mul add + out 3 2 index 103 mod put + 103 idiv lscs 3 get add mscs 0 get 15 mul add mscs 1 get 92 mul add mscs 2 get 68 mul add + out 2 2 index 103 mod put + 103 idiv mscs 1 get 15 mul add mscs 2 get 92 mul add + out 1 2 index 103 mod put + 103 idiv mscs 2 get 15 mul add + out 0 3 -1 roll 103 mod put + out 6 inlen sub 1 sub inlen 1 add getinterval + } def + + /finaliseBIN { + bpos 0 ne { + bvals 0 bpos getinterval base259to103 aload pop + /bpos 0 def + } if + } def + + /addtobin { + bvals exch bpos exch put + /bpos bpos 1 add def + bpos 5 eq { finaliseBIN } if + } def + + /ECIabc { % ECI encoding for modes A, B and C + msg i 1 add 6 getinterval 0 exch {48 sub add 10 mul} forall 10 idiv + dup 40 ge { + 40 sub + dup 12769 idiv 40 add exch 12769 mod + dup 113 idiv exch 113 mod + } if + } def + + /ECIbin { % ECI encoding for binary mode + [ + msg i 1 add 6 getinterval 0 exch {48 sub add 10 mul} forall 10 idiv + dup 65536 ge { + 258 exch dup 65536 idiv exch 65536 mod dup 256 idiv exch 256 mod + } { + dup 256 ge { + 257 exch dup 256 idiv exch 256 mod + } { + 256 exch + } ifelse + } ifelse + ] { + addtobin + } forall + } def + + /encC { + 1 { % Common exit + i segstart eq { % Structured data macros + 1 { % common exit + i segend 7 sub gt {0 exit} if + msg segstart get 91 ne {0 exit} if % [ + msg segstart 1 add get 41 ne {0 exit} if % ) + msg segstart 2 add get 62 ne {0 exit} if % > + msg segstart 3 add get 30 ne {0 exit} if % {RS} + msg segstart 4 add get dup 48 lt exch 57 gt or {0 exit} if % digit + msg segstart 5 add get dup 48 lt exch 57 gt or {0 exit} if % digit + msg segend 1 sub get 4 ne {0 exit} if % End: {EOT} + msg segstart 4 add get 48 sub 10 mul msg segstart 5 add get 48 sub add + dup dup 05 ne exch dup 06 ne exch 12 ne and and {pop mac exit} if + msg segstart 6 add get 29 ne {pop 0 exit} if % {GS} + msg segend 2 sub get 30 ne {pop 0 exit} if % End: {RS} + dup 05 eq {pop m05 exit} if + 06 eq { m06 exit} if + m12 exit + } repeat + /inmac exch def + inmac 0 ne { + [ Cvals lab get ] addtocws + /mode B def + [ Bvals inmac get ] addtocws + inmac mac eq { + [ Bvals msg segstart 4 add get get ] addtocws + [ Bvals msg segstart 5 add get get ] addtocws + /i i 6 add def + } { + /i i 7 add def + } ifelse + exit + } if + } if + % Special treatment of FNC1 in First for Dotcode + i segstart eq { + % Encode an FNC1 if two digits start a segment + nDigits i get 2 ge { + [ Cvals fn1 get ] addtocws + } if + % Skip an FNC1 if followed by two digits at start of segment + msg i get fn1 eq nDigits i 1 add get 2 ge and { + /i i 1 add def + } if + } if + SeventeenTen i get { + [ % 17xxxxxx10 macro + Cvals aim get + msg i 2 add get 48 sub 10 mul msg i 3 add get 48 sub add + msg i 4 add get 48 sub 10 mul msg i 5 add get 48 sub add + msg i 6 add get 48 sub 10 mul msg i 7 add get 48 sub add + ] addtocws + /i i 10 add def + exit + } if + DatumC i get { + msg i get dup fn1 eq exch dup fn2 eq exch fn3 eq or or { % FNCx + [ Cvals msg i get get ] addtocws + ECI i get { % FNC2 then 6 digits + [ ECIabc ] addtocws + /i i 7 add def + exit + } if + msg i get fn3 eq segstart i ne and { % FNC3 + /i i 1 add def + /inmac 0 def + /segstart i def + /segend i UntilEndSeg i get add def + exit + } if + /i i 1 add def + exit + } if + [ msg i get 48 sub 10 mul msg i 1 add get 48 sub add ] addtocws + /i i 2 add def + exit + } if + Binary i get { % Binary + nDigits i 1 add get 0 gt { + msg i get 160 lt { + [ Cvals bsa get Avals msg i get 128 sub get ] addtocws + } { + [ Cvals bsb get Bvals msg i get 128 sub get ] addtocws + } ifelse + /i i 1 add def + exit + } if + [ Cvals bin get ] addtocws + /mode BIN def + exit + } if + /m AheadA i get def /n AheadB i get def + m n gt { + [ Cvals laa get ] addtocws + /mode A def + exit + } if + i segstart eq { + msg i get dup 9 eq exch dup 28 eq exch dup 29 eq exch 30 eq or or or { + [ Cvals laa get ] addtocws + /mode A def + exit + } if + } if + n 4 gt { + [ Cvals lab get ] addtocws + /mode B def + exit + } if + [ Cvals [ sfb sb2 sb3 sb4 ] n 1 sub get get ] addtocws + n { + msg i get 13 eq { + [ Bvals crl get ] addtocws + /i i 2 add def + } { + [ Bvals msg i get get ] addtocws + /i i 1 add def + } ifelse + } repeat + exit + } repeat + } def % encC + + /encB { + 1 { % Common exit + /n TryC i get def + n 2 ge { + n 4 gt { + [ Bvals lac get ] addtocws + /mode C def + exit + } if + [ Bvals [ sfc sc2 sc3 sc4 ] n 1 sub get get ] addtocws + n { + msg i get 0 lt { + [ Cvals msg i get get ] addtocws + /i i 1 add def + } { + [ msg i get 48 sub 10 mul msg i 1 add get 48 sub add ] addtocws + /i i 2 add def + } ifelse + } repeat + exit + } if + DatumB i get { + msg i get dup fn1 eq exch dup fn2 eq exch fn3 eq or or { % FNCx + [ Bvals msg i get get ] addtocws + ECI i get { % FNC2 then 6 digits + [ ECIabc ] addtocws + /i i 7 add def + exit + } if + msg i get fn3 eq i segstart ne and { % FNC3 + /i i 1 add def + /mode C def + /inmac 0 def + /segstart i def + /segend i UntilEndSeg i get add def + exit + } if + /i i 1 add def + exit + } if + msg i get 13 eq i msglen 1 sub lt and { + msg i 1 add get 10 eq { % CRLF + [ Bvals crl get ] addtocws + /i i 2 add def + exit + } if + } if + [ Bvals msg i get get ] addtocws + /i i 1 add def + exit + } if + Binary i get { % Binary + DatumB i 1 add get { + msg i get 160 lt { + [ Bvals bsa get Avals msg i get 128 sub get ] addtocws + } { + [ Bvals bsb get Bvals msg i get 128 sub get ] addtocws + } ifelse + /i i 1 add def + exit + } if + [ Bvals bin get ] addtocws + /mode BIN def + exit + } if + AheadA i get 1 eq { + [ Bvals sfa get Avals msg i get get ] addtocws + /i i 1 add def + exit + } if + [ Bvals laa get ] addtocws + /mode A def + exit + } repeat + } def + + /encA { + 1 { % Common exit + /n TryC i get def + n 2 ge { + n 4 gt { + [ Avals lac get ] addtocws + /mode C def + exit + } if + [ Avals [ sfc sc2 sc3 sc4 ] n 1 sub get get ] addtocws + n { + msg i get 0 lt { + [ Cvals msg i get get ] addtocws + /i i 1 add def + } { + [ msg i get 48 sub 10 mul msg i 1 add get 48 sub add ] addtocws + /i i 2 add def + } ifelse + } repeat + exit + } if + DatumA i get { + msg i get dup fn1 eq exch dup fn2 eq exch fn3 eq or or { % FNCx + [ Avals msg i get get ] addtocws + ECI i get { % FNC2 then 6 digits + [ ECIabc ] addtocws + /i i 7 add def + exit + } if + msg i get fn3 eq i segstart ne and { % FNC3 + /i i 1 add def + /mode C def + /inmac 0 def + /segstart i def + /segend i UntilEndSeg i get add def + exit + } if + /i i 1 add def + exit + } if + [ Avals msg i get get ] addtocws + /i i 1 add def + exit + } if + Binary i get { % Binary + DatumA i 1 add get { + msg i get 160 lt { + [ Avals bsa get Avals msg i get 128 sub get ] addtocws + } { + [ Avals bsb get Bvals msg i get 128 sub get ] addtocws + } ifelse + /i i 1 add def + exit + } if + [ Avals bin get ] addtocws + /mode BIN def + exit + } if + /n AheadB i get def + n 6 gt { + [ Avals lab get ] addtocws + /mode B def + exit + } if + [ Avals [ sfb sb2 sb3 sb4 sb5 sb6 ] n 1 sub get get ] addtocws + n { + msg i get 13 eq { + [ Bvals crl get ] addtocws + /i i 2 add def + } { + [ Bvals msg i get get ] addtocws + /i i 1 add def + } ifelse + } repeat + exit + } repeat + } def + + /encBIN { + 1 { % Common exit + /n TryC i get def + n 2 ge { + [ finaliseBIN ] addtocws + n 7 gt { % Terminate to C + [ BINvals tmc get ] addtocws + /mode C def + exit + } if + [ BINvals [ sc2 sc3 sc4 sc5 sc6 sc7 ] n 2 sub get get ] addtocws + n { + msg i get 0 lt { + [ Cvals msg i get get ] addtocws + /i i 1 add def + } { + [ msg i get 48 sub 10 mul msg i 1 add get 48 sub add ] addtocws + /i i 2 add def + } ifelse + } repeat + exit + } if + ECI i get Binary i 7 add get and { % ECI then binary + [ ECIbin ] addtocws + /i i 7 add def + i msglen eq { [ finaliseBIN ] addtocws } if + exit + } if + msg i get 0 ge { % Not FNCx + Binary i get Binary i 1 add get or + Binary i 2 add get or Binary i 3 add get or + ECI i 1 add get Binary i 8 add get and or { + [ msg i get addtobin ] addtocws + /i i 1 add def + i msglen eq { [ finaliseBIN ] addtocws } if + exit + } if + } if + [ finaliseBIN ] addtocws + i msglen 1 sub ne { % Not last character + msg i get fn3 eq i segstart ne and { % FNC3 + [ BINvals tms get ] addtocws + /i i 1 add def + /mode C def + /inmac 0 def + /segstart i def + /segend i UntilEndSeg i get add def + exit + } if + AheadA i get AheadB i get gt { + [ BINvals tma get ] addtocws + /mode A def + } { + [ BINvals tmb get ] addtocws + /mode B def + } ifelse + exit + } if + exit + } repeat + } def + + /cws msglen 2 mul 1 add array def + /mode C def + /bvals 5 array def /bpos 0 def + /inmac 0 def /segstart 0 def /segend UntilEndSeg 0 get def + /i 0 def /j 0 def { + i msglen ge {exit} if + inmac 0 ne { % Jump over macro trailers + inmac mac ne i segend 2 sub eq and { % {RS}{EOT} + /i i 2 add def + i msglen ge {exit} if + } if + inmac mac eq i segend 1 sub eq and { % {EOT} + /i i 1 add def + i msglen ge {exit} if + } if + } if + [ /encA /encB /encC /encBIN ] mode get load exec + } loop + /cws cws 0 j getinterval def + + % Determine the symbol size + /nd cws length def + /minarea nd 3 add nd 2 idiv add 9 mul 2 add 2 mul def + ratio -1 ne { % Fixed ratio + /hgt minarea ratio div sqrt def + /wid minarea ratio mul sqrt def + /h hgt cvi def /w wid cvi def + h w add 2 mod 1 eq { + h w mul minarea lt {/h h 1 add def /w w 1 add def} if + } { + hgt w mul wid h mul lt { + /w w 1 add def + h w mul minarea lt { + /w w 1 sub def /h h 1 add def + h w mul minarea lt {/w w 2 add def} if + } if + } { + /h h 1 add def + h w mul minarea lt { + /h h 1 sub def /w w 1 add def + h w mul minarea lt {/h h 2 add def} if + } if + } ifelse + } ifelse + /rows h def /columns w def + } { + columns -1 eq { % Fixed height + /columns minarea rows add 1 sub rows idiv dup rows add 2 mod 0 eq {1 add} if def + } if + rows -1 eq { % Fixed width + /rows minarea columns add 1 sub columns idiv dup columns add 2 mod 0 eq {1 add} if def + } if + } ifelse + + % Extend the codewords with padding + /ndots rows columns mul 2 idiv def + { + nd 1 add dup 2 idiv 3 add add 9 mul 2 add ndots gt {exit} if + /nd nd 1 add def + } loop + /nc nd 2 idiv 3 add def + /nw nd nc add def + /rembits ndots nw 9 mul 2 add sub def + nd cws length gt { + /cws [ + cws aload pop + mode BIN eq {109} {106} ifelse + nd cws length sub 1 sub {106} repeat + ] def + } if + + options /debugcws known { /bwipp.debugcws cws //raiseerror exec } if + + % Create an array containing the character mappings +{ + /encs [ + (101010101) (010101011) (010101101) (010110101) (011010101) + (101010110) (101011010) (101101010) (110101010) (010101110) + (010110110) (010111010) (011010110) (011011010) (011101010) + (100101011) (100101101) (100110101) (101001011) (101001101) + (101010011) (101011001) (101100101) (101101001) (110010101) + (110100101) (110101001) (001010111) (001011011) (001011101) + (001101011) (001101101) (001110101) (010010111) (010011011) + (010011101) (010100111) (010110011) (010111001) (011001011) + (011001101) (011010011) (011011001) (011100101) (011101001) + (100101110) (100110110) (100111010) (101001110) (101011100) + (101100110) (101101100) (101110010) (101110100) (110010110) + (110011010) (110100110) (110101100) (110110010) (110110100) + (111001010) (111010010) (111010100) (001011110) (001101110) + (001110110) (001111010) (010011110) (010111100) (011001110) + (011011100) (011100110) (011101100) (011110010) (011110100) + (100010111) (100011011) (100011101) (100100111) (100110011) + (100111001) (101000111) (101100011) (101110001) (110001011) + (110001101) (110010011) (110011001) (110100011) (110110001) + (111000101) (111001001) (111010001) (000101111) (000110111) + (000111011) (000111101) (001001111) (001100111) (001110011) + (001111001) (010001111) (011000111) (011100011) (011110001) + (100011110) (100111100) (101111000) (110001110) (110011100) + (110111000) (111000110) (111001100) + ] def +} ctxdef + + % Final six dots arranged at edges + rows 2 mod 0 eq { + /sixedges [ + [ columns 1 sub rows 2 sub ] + [ 0 rows 2 sub ] + [ columns 2 sub rows 1 sub ] + [ 1 rows 1 sub ] + [ columns 1 sub 0 ] + [ 0 0 ] + ] def + } { + /sixedges [ + [ columns 2 sub 0 ] + [ columns 2 sub rows 1 sub ] + [ columns 1 sub 1 ] + [ columns 1 sub rows 2 sub ] + [ 0 0 ] + [ 0 rows 1 sub ] + ] def + } ifelse + + /dmv {columns mul add} def + + % Construct the template + /outline rows columns mul array def + 0 1 rows 1 sub { + /y exch def + 0 1 columns 1 sub { + /x exch def + outline x y dmv x y add 2 mod 1 sub put + } for + } for + sixedges { + outline exch aload pop dmv 1 put + } forall + + /clearcol { + /x exch def + true + x 1 and 2 rows 1 sub { + x exch dmv sym exch get 1 eq {pop false exit} if + } for + } def + + /clearrow { + /y exch def + true + y 1 and 2 columns 1 sub { + y dmv sym exch get 1 eq {pop false exit} if + } for + } def + + % Evaluate the symbol + /evalsymbol { + /sym exch def + + % Identify the worst side + /worst 9999999 def + [ [ /x 0 ] [ /x 1 ] [ /y 0 ] [ /y 1 ] ] { % Top Bottom Left Right + aload pop /fl exch def /dir exch def + /sum 0 def /first -1 def /last -1 def + 0 1 dir /x eq {columns} {rows} ifelse 1 sub { + dir exch def + sym + dir load + dir /x eq {rows} {columns} ifelse 1 sub fl mul + dir /y eq {exch} if + dmv get 1 eq { + first -1 eq {/first dir load def} if + /last dir load def + /sum sum 1 add def + } if + } for + sum last add first sub + dir /x eq {rows} {columns} ifelse mul + dup worst lt {/worst exch def} {pop} ifelse + } forall + + /pen 0 def + + % Check for groups of blank columns unless data is encoded vertically + % in a symbol of sufficient height to overcome up to six consecutive 0s + % in two neighbouring 5 of 9 dot patterns + rows 2 mod 1 eq rows 12 le or { + /sum 0 def /p 0 def + 1 1 columns 2 sub { + clearcol { + /sum sum 1 add def + /p sum 1 eq {rows} {p rows mul} ifelse def + } { + /sum 0 def + /pen pen p add def + /p 0 def + } ifelse + } for + /pen pen p add def + } if + + % Check for groups of blank rows unless data is encoded horizontally + % in a symbol of sufficient width to overcome up to six consecutive 0s + % in two neighbouring 5 of 9 dot patterns + rows 2 mod 0 eq columns 12 le or { + /sum 0 def /p 0 def + 1 1 rows 2 sub { + clearrow { + /sum sum 1 add def + /p sum 1 eq {columns} {p columns mul} ifelse def + } { + /sum 0 def + /pen pen p add def + /p 0 def + } ifelse + } for + /pen pen p add def + } if + + % Pad twice on all sides + /symp [ + columns 4 add 2 mul {0} repeat + 0 columns sym length 1 sub { + 0 exch 0 exch + sym exch columns getinterval aload pop + 0 0 + } for + columns 4 add 2 mul {0} repeat + ] def + + % Count voids and isolated dots + /columns columns 4 add def + /rows rows 4 add def + /sum 0 def + 2 1 rows 3 sub { + /y exch def + y 1 and 2 add 2 columns 3 sub { + /x exch def + 1 { % Common exit + symp x 1 sub y 1 sub dmv get 1 eq {exit} if + symp x 1 add y 1 sub dmv get 1 eq {exit} if + symp x 1 sub y 1 add dmv get 1 eq {exit} if + symp x 1 add y 1 add dmv get 1 eq {exit} if + symp x y dmv get 0 eq {/sum sum 1 add def exit} if + symp x 2 sub y dmv get 1 eq {exit} if + symp x y 2 sub dmv get 1 eq {exit} if + symp x 2 add y dmv get 1 eq {exit} if + symp x y 2 add dmv get 1 eq {exit} if + /sum sum 1 add def + } repeat + } for + } for + /columns columns 4 sub def + /rows rows 4 sub def + + worst 0 eq { % Fixed penalty to disqualify a symbol with an unlit edge + -99999 + } { + worst sum sum mul sub pen sub + } ifelse + + } def + + % Reed Solomon antilog table + /rsalog [ 1 112 { dup 3 mul 113 mod } repeat ] def + /step nw 112 idiv 1 add def + /offset {step mul start add} def + + % Evaluate the symbols in the following order: + % fast mode: m3 -> m3' -> m2 -> m2' -> m1 -> m1' -> m0 -> m0' + % dflt mode: (m0 m1 m2 m3) -> (m0' m1' m2' m3') + % -> : Test if we have met the HxW/2 threshold + % m' : Symbols with six edge dots forcibly lit + % () : Best of + /bestscore -99999999 def + /masks mask -1 ne { + [ mask ] + } { + fast { [ 2#11 2#10 2#01 2#00 ] } { [ 2#00 2#01 2#10 2#11 ] } ifelse + } ifelse def + /litmasks 4 array def + masks { % For each mask pattern + + /mask exch def + + % Calculate the error correction codewords for each block + /rscws [ + mask + [ 0 3 7 17 ] mask get 0 cws {1 index add 113 mod exch 2 index add exch 3 1 roll} forall pop pop + nc {0} repeat + ] def + 0 1 step 1 sub { + /start exch def + /ND nd 1 add start sub step add 1 sub step idiv def + /NW nw 1 add start sub step add 1 sub step idiv def + /NC NW ND sub def + /coeffs [ 1 NC {0} repeat ] def + 1 1 NC { + /i exch def + NC -1 1 { + /j exch def + coeffs j coeffs j get 113 add rsalog i get coeffs j 1 sub get mul 113 mod sub 113 mod put + } for + } for + 0 1 ND 1 sub { + /t exch rscws exch offset get rscws ND offset get add 113 mod def + 0 1 NC 2 sub { + /j exch def + rscws ND j add offset rscws ND j add 1 add offset get 113 add t coeffs j 1 add get mul 113 mod sub 113 mod put + } for + rscws ND NC add 1 sub offset 113 t coeffs NC get mul 113 mod sub 113 mod put + } for + ND 1 NW 1 sub { dup rscws exch offset 113 rscws 5 -1 roll offset get sub 113 mod put } for + } for + + % Create the bitstream + /bits ndots string def + bits 0 [ (00) (01) (10) (11) ] mask get putinterval + 1 1 nw { + /i exch def + bits i 1 sub 9 mul 2 add encs rscws i get get putinterval + } for + rembits 0 gt { + bits nw 9 mul 2 add (11111111111111111) 0 rembits getinterval putinterval + } if + + % Walk the symbol placing the bitstream + /pixs outline dup length array copy def + /posx 0 def + /posy rows 2 mod 0 eq {0} {rows 1 sub} ifelse def + bits 0 bits length 6 sub getinterval { + { % Move to next vacant position + pixs posx posy dmv get -1 eq {exit} if + rows 2 mod 0 eq { + /posy posy 1 add def + posy rows eq { + /posy 0 def + /posx posx 1 add def + } if + } { + /posx posx 1 add def + posx columns eq { + /posx 0 def + /posy posy 1 sub def + } if + } ifelse + } loop + pixs posx posy dmv 3 -1 roll 48 sub put + } forall + 0 1 5 { % Last six edge dots + /i exch def + pixs sixedges i get aload pop dmv + bits bits length 6 sub i add get 48 sub put + } for + + % Evaluate the symbol to find the most suitable mask + /score pixs evalsymbol def + score bestscore gt { + /bestsym pixs def + /bestscore score def + fast bestscore rows columns mul 2 idiv gt and {exit} if + } if + + % Make a copy with lit edges for possible later evaluation + /litmask pixs dup length array copy def + 0 1 5 { % Light last six edge dots + /i exch def + litmask sixedges i get aload pop dmv + 1 put + } for + litmasks mask litmask put + + % In fast mode immediately score the lit symbol + fast { + /score litmask evalsymbol def + score bestscore gt { + /bestsym litmask def + /bestscore score def + bestscore rows columns mul 2 idiv gt {exit} if + } if + } if + + } forall + /pixs bestsym def + + % For default mode, if best mask fails threshold then recalculate with lit corners and pick best + fast not bestscore rows columns mul 2 idiv le and { + /bestscore -99999999 def + masks { + litmasks exch get /litmask exch def + /score litmask evalsymbol def + score bestscore gt { + /bestsym litmask def + /bestscore score def + } if + } forall + /pixs bestsym def + } if + + % Return the arguments + << + /ren //renmatrix + /dotty true + /pixs pixs + /pixx columns + /pixy rows + /height rows 2 mul 72 div + /width columns 2 mul 72 div + /opt options + >> + + dontdraw not //renmatrix if + + //unloadctx exec + + end + +} +[/barcode] {null def} forall +bind def +/dotcode dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER dotcode-- + +% --BEGIN ENCODER ultracode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- +% --DESC: Ultracode +% --EXAM: Awesome colours! +% --EXOP: eclevel=EC2 +% --RNDR: renmatrix +%%BeginResource: uk.co.terryburton.bwipp ultracode 0.0 2022082100 96235 99035 +%%BeginData: 361 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +begin +/ultracode { + + 20 dict begin + + /options exch def + /barcode exch def + + /ctx null def + /dontdraw false def + /eclevel (EC2) def % EC0-EC5 + /encoding (auto) def + /parse false def + /parsefnc false def + /start 257 def % 8-bit ISO-8859-1, until we write high-level encoders + /link1 0 def + /raw false def + /rev 1 def % Ultracode specification revision + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + /start start cvi def + /link1 link1 cvi def + /rev rev cvi def + + rev dup 1 ne exch 2 ne and { + /bwipp.ultracodeInvalidRevision (Valid revisions are 1 and 2) //raiseerror exec + } if + + /ultracode //loadctx exec + + raw {/encoding (raw) def} if + + encoding (raw) eq { + /dcws barcode length array def + /i 0 def /j 0 def + { % loop + i barcode length eq {exit} if + /cw barcode i 1 add 3 getinterval cvi def + dcws j cw put + /i i 4 add def + /j j 1 add def + } loop + /dcws dcws 0 j getinterval def + } if + + % Basic high level encoding + encoding (auto) eq { + + % Parse the input + /fn1 -1 def /fn3 -2 def + /fncvals << + /parse parse + /parsefnc parsefnc + (FNC1) fn1 + (FNC3) fn3 + >> def + /msg barcode fncvals //parseinput exec def + /msglen msg length def + + /scr [] def % Empty symbol control region + /scp [] def % Empty start sequence parameters + /dcws [ + scr aload pop + scp aload pop + msg { + dup fn1 eq {pop 268} if + dup fn3 eq {pop 269} if + } forall + ] def + + } if + + options /debugcws known { /bwipp.debugcws dcws //raiseerror exec } if + + /mcc dcws length 3 add def % Message codewords: start mcc acc [dcws ...] + + /eclval eclevel 2 get 48 sub def + eclval 0 ne { + /qcc [0 1 2 4 6 8] eclval get mcc 25 idiv mcc 25 mod 0 ne {1 add} if mul 5 add def + } { + /qcc 3 def + } ifelse + /acc qcc 3 sub 78 link1 mul add def + /tcc mcc qcc add def + + % Lookup the most appropriate symbol specification +{ + /metrics [ + % rows minc maxc mcol + [ 2 7 37 5 ] + [ 3 36 84 13 ] + [ 4 85 161 22 ] + [ 5 142 282 29 ] + ] def +} ctxdef + + 0 1 3 { + /i exch def + /m metrics i get def + /rows m 0 get def + /minc m 1 get def % Minimum permissible codewords + /maxc m 2 get def % Maximum permissible codewords + /mcol m 3 get def % Minimum tile columns + /okay true def + tcc minc lt tcc maxc gt or {/okay false def} if + okay {exit} if + } for + + okay not { + /bwipp.ultracodeNoValidSymbol (Maximum length exceeded or invalid content) //raiseerror exec + } if + + % Determine required number of columns and pads + mcol 1 61 { + /columns exch def + columns + columns 15 ge {1 sub} if + columns 31 ge {1 sub} if + columns 47 ge {1 sub} if + rows mul 3 sub tcc sub dup 0 ge { + /pads exch def + exit + } if + pop + } for + /dcc columns mcol sub def + + % Reed-Solomon error correction + /rsseq [ + start + mcc + acc + dcws aload pop + qcc {0} repeat + 0 % Working space + ] def + + % Calculate the log and anti-log tables + /rsalog [ 1 282 {dup 3 mul 283 mod} repeat ] def + /rslog 283 array def + 1 1 282 {dup rsalog exch get exch rslog 3 1 roll put} for + + % Function to calculate the product in the field + /rsprod { + 2 copy 0 ne exch 0 ne and { + rslog exch get exch rslog exch get add 282 mod rsalog exch get + } { + pop pop 0 + } ifelse + } def + + % Generate the coefficients + /n mcc def /k qcc def + /coeffs [ 1 k {0} repeat ] def + 1 1 k { + /i exch def + coeffs i coeffs i 1 sub get put + i 1 sub -1 1 { + /j exch def + coeffs j coeffs j 1 sub get coeffs j get rsalog i get rsprod add 283 mod put + } for + coeffs 0 coeffs 0 get rsalog i get rsprod put + } for + /coeffs coeffs 0 coeffs length 1 sub getinterval def + coeffs length 1 sub -2 0 {coeffs exch 2 copy get 283 exch sub put} for + + % Derive the error codewords + 0 1 n 1 sub { + /t exch rsseq exch get rsseq n get add 283 mod def + 0 1 k 1 sub { + /j exch def + rsseq n j add rsseq n j add 1 add get 283 t coeffs k j sub 1 sub get mul 283 mod sub add 283 mod put + } for + } for + n 1 n k add { dup rsseq exch 283 rsseq 5 -1 roll get sub 283 mod put } for + /ecws rsseq n k getinterval def + + options /debugecc known { /bwipp.debugecc ecws //raiseerror exec } if + +{ + /tiles [ + 13135 13136 13153 13156 13163 13165 13513 13515 13516 13531 % 0-9 + 13535 13536 13561 13563 13565 13613 13615 13616 13631 13635 % 10-19 + 13636 13651 13653 13656 15135 15136 15153 15163 15165 15313 % 20-29 + 15315 15316 15351 15353 15356 15361 15363 15365 15613 15615 % 30-39 + 15616 15631 15635 15636 15651 15653 15656 16135 16136 16153 % 40-49 + 16156 16165 16313 16315 16316 16351 16353 16356 16361 16363 % 50-59 + 16365 16513 16515 16516 16531 16535 16536 16561 16563 16565 % 60-69 + 31315 31316 31351 31356 31361 31365 31513 31515 31516 31531 % 70-79 + 31535 31536 31561 31563 31565 31613 31615 31631 31635 31636 % 80-89 + 31651 31653 31656 35131 35135 35136 35151 35153 35156 35161 % 90-99 + 35163 35165 35315 35316 35351 35356 35361 35365 35613 35615 % 100-109 + 35616 35631 35635 35636 35651 35653 35656 36131 36135 36136 % 110-119 + 36151 36153 36156 36163 36165 36315 36316 36351 36356 36361 % 120-129 + 36365 36513 36515 36516 36531 36535 36536 36561 36563 36565 % 130-139 + 51313 51315 51316 51351 51353 51356 51361 51363 51365 51513 % 140-149 + 51516 51531 51536 51561 51563 51613 51615 51616 51631 51635 % 150-159 + 51636 51651 51653 51656 53131 53135 53136 53151 53153 53156 % 160-169 + 53161 53163 53165 53513 53516 53531 53536 53561 53563 53613 % 170-179 + 53615 53616 53631 53635 53636 53651 53653 53656 56131 56135 % 180-189 + 56136 56151 56153 56156 56161 56163 56165 56313 56315 56316 % 190-199 + 56351 56353 56356 56361 56363 56365 56513 56516 56531 56536 % 200-209 + 56561 56563 61313 61315 61316 61351 61353 61356 61361 61363 % 210-219 + 61365 61513 61515 61516 61531 61535 61536 61561 61563 61565 % 220-229 + 61615 61631 61635 61651 61653 63131 63135 63136 63151 63153 % 230-239 + 63156 63161 63163 63165 63513 63515 63516 63531 63535 63536 % 240-249 + 63561 63563 63565 63613 63615 63631 63635 63651 63653 65131 % 250-259 + 65135 65136 65151 65153 65156 65161 65163 65165 65313 65315 % 260-269 + 65316 65351 65353 65356 65361 65363 65365 65613 65615 65631 % 270-279 + 65635 65651 65653 56565 51515 % 280-284 + ] def + + /dccurev1 [ + 51363 51563 51653 53153 53163 53513 53563 53613 % 0-7 + 53653 56153 56163 56313 56353 56363 56513 56563 % 8-15 + 51316 51356 51536 51616 53156 53516 53536 53616 % 16-23 + 53636 53656 56136 56156 56316 56356 56516 56536 % 24-31 + ] def + /dcclrev1 [ + 61351 61361 61531 61561 61631 61651 63131 63151 % 0-7 + 63161 63531 63561 63631 65131 65161 65351 65631 % 8-15 + 31351 31361 31531 31561 31631 31651 35131 35151 % 16-23 + 35161 35361 35631 35651 36131 36151 36351 36531 % 24-31 + ] def + /dccurev2 [ + 15316 16316 13516 16516 13616 15616 13136 15136 % 0-7 + 16136 13536 16536 13636 13156 16156 15356 13656 % 8-15 + 15313 16313 13513 16513 13613 15613 13153 15153 % 16-23 + 16153 16353 13653 15653 13163 15163 15363 13563 % 24-31 + ] def + /dcclrev2 [ + 36315 36515 35615 35135 36135 31535 36535 31635 % 0-7 + 35635 35165 36165 31365 35365 36365 31565 36565 % 8-15 + 61315 65315 63515 61615 65135 61535 63535 61635 % 16-23 + 63635 65635 63165 65165 61365 65365 61565 63565 % 24-31 + ] def +} ctxdef + + /dccu rev 1 eq {dccurev1} {dccurev2} ifelse def + /dccl rev 1 eq {dcclrev1} {dcclrev2} ifelse def + + % Create the bitmap + /rows rows 6 mul 1 add def + /columns columns 6 add def + /pixs [ rows columns mul {-1} repeat ] def + /qmv {columns mul add} def + 0 1 columns 1 sub { + /i exch def + 0 6 rows 1 sub { + /j exch def + i 5 ge {pixs i j qmv i 2 mod 9 mul put} if + } for + pixs i 0 qmv 9 put + pixs i rows 1 sub qmv 9 put + } for + 1 1 rows 2 sub { + /i exch def + 3 16 columns 1 sub { + /j exch def + pixs j i qmv 1 i 2 mod sub 9 mul put + } for + pixs 0 i qmv 9 put + pixs 1 i qmv 1 i 2 mod sub 9 mul put + pixs 2 i qmv 0 put + pixs 3 i qmv 9 put + pixs 4 i qmv 0 put + pixs columns 1 sub i qmv 9 put + } for + + % DCCU and DCCL tiles + /i rows 2 idiv 5 sub def + [ + dccu dcc get 10 5 string cvrs {48 sub} forall + 0 + dccl dcc get 10 5 string cvrs {48 sub} forall + ] { + pixs 2 i qmv 3 -1 roll put + /i i 1 add def + } forall + + % Data tiles + /tileseq [ + start + mcc + ecws aload pop + tcc + 283 % SEP + acc + dcws aload pop + pads {284} repeat + qcc + ] def + + /x 5 def /y 1 def + tileseq { + tiles exch get 10 5 string cvrs { + pixs x y qmv 3 -1 roll 48 sub put + /y y 1 add def + } forall + y rows 1 sub ne { + /y y 1 add def % Jump horizontal timing pattern + } { + /x x 1 add def /y 1 def + pixs x y qmv get -1 ne { + /x x 1 add def % Jump vertical timing pattern + } if + } ifelse + } forall + +{ + /colormap << + 0 (FFFFFF) % W + 9 (000000) % K + 1 (00FFFF) % C + 3 (FF00FF) % M + 5 (FFFF00) % Y + 6 (00FF00) % G + >> def +} ctxdef + + % Return the arguments + << + /ren //renmatrix + /pixs pixs + /pixx columns + /pixy rows + /height rows 72 div 2 mul + /width columns 72 div 2 mul + /colormap colormap + /opt options + >> + + dontdraw not //renmatrix if + + //unloadctx exec + + end + +} +[/barcode] {null def} forall +bind def +/ultracode dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER ultracode-- + +% --BEGIN ENCODER jabcode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix-- +% --DESC: JAB Code (Beta) +% --EXAM: This is JAB Code +% --EXOP: eclevel=6 +% --RNDR: renmatrix +%%BeginResource: uk.co.terryburton.bwipp jabcode 0.0 2022082100 244344 255738 +%%BeginData: 1133 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /parseinput dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +begin +/jabcode { + + 20 dict begin + + /options exch def + /barcode exch def + + /ctx null def + /dontdraw false def + /rows -1 def + /columns -1 def + /slave false def + /colors 16 def + /eclevel 6 def % 0-10 + /raw false def + /parse false def + /parsefnc false def + /mask -1 def % 0-7 + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + /rows rows cvi def + /columns columns cvi def + /colors colors cvi def + /eclevel eclevel cvi def + /mask mask cvi def + + /databpm colors ln 2 ln div round cvi def + /metabpm colors dup 8 gt {pop 8} if ln 2 ln div round cvi def + + % Parse the input + /fn1 -1 def + /fncvals << + /parse parse + /parsefnc parsefnc + (FNC1) fn1 + >> def + /msg barcode fncvals //parseinput exec def + /msglen msg length def + + % Wide array support, as needed + {65536 array} stopped { + pop + /arrayw { + dup 65535 idiv 1 add dup array exch 0 exch 1 sub {2 copy 65535 array put 1 add} repeat + 1 index 4 1 roll 3 -1 roll 65535 mod array put + } def + /getw {exch 1 index 65535 idiv get exch 65535 mod get} def + /putw {3 1 roll exch 1 index 65535 idiv get exch 65535 mod 3 -1 roll put} def + /copyw {exch 0 exch {dup length array copy 3 copy put pop 1 add} forall pop} def + } { + pop + /arrayw {array} def + /getw {get} def + /putw {put} def + /copyw {copy} def + } ifelse + + /addtobits { + dup bits j 3 -1 roll putinterval + length j add /j exch def + } def + + /tofixedbits { % Zero padded base 2 string + (0000000000000) 13 string copy dup 4 -1 roll 2 13 string cvrs + dup length 4 index exch sub exch putinterval + 0 3 -1 roll getinterval + } def + + % Encode the data using byte mode encoding and terminate with EOM + /bits 7 msglen 15 le {4} {17} ifelse add msglen 8 mul add 12 add string def + /j 0 def + 31 5 tofixedbits addtobits % MS + (00) addtobits % S/B + msglen 15 le { + msglen 4 tofixedbits addtobits + } { + (0000) addtobits + msglen 16 sub 13 tofixedbits addtobits + } ifelse + 0 1 msglen 1 sub { + msg exch get 8 tofixedbits addtobits + } for + 28 5 tofixedbits addtobits % L/L + 31 5 tofixedbits addtobits % MS + (11) addtobits % EOM + + % TODO Cascade + /diffside 21 def + /sameshape false def + /sameecc false def + /hasslaves false def + + % Determine the metrics for a symbol of a given size + /metrics { + /mc exch def /mr exch def + mc mr mul % All modules + mc 25 sub 16 idiv 2 add mr 25 sub 16 idiv 2 add + mul 4 sub 7 mul % Alignment modules + 64 colors 2 copy gt {exch} if pop 2 mul % Palette modules + slave {7} {17} ifelse 4 mul % Finder modules + + % Metadata bits and modules + slave not { % Master + /metass mr mc eq {0} {1} ifelse def + mr mc 2 copy lt {exch} if pop + 21 sub 16 idiv [ 0 1 2 2 3 3 3 3 ] exch get /metavf exch def + /metavlen metass 0 eq {[2 2 3 4]} {[4 6 8 10]} ifelse metavf get def + /metaelen metavf 2 mul 10 add def + 7 % II: SS VF MSK SF + metavlen add metaelen add % III: V E + hasslaves {4 add} if % III: S + 2 mul % LDPC + metabpm div ceiling cvi + dup metabpm mul 6 add /nummetabits exch def + 6 add % I: Nc into 6 modules + } { % Slave + 3 % I: SS SE SF + sameshape not {5 add} if % II: V + hasslaves {3 add} if % II: S + sameecc not { + mr mc 2 copy lt {exch} if pop + 21 sub 16 idiv [ 10 12 14 14 16 16 16 16 ] exch get + add % III: E + } if + 2 mul % LDPC + metabpm div ceiling cvi + dup metabpm mul /nummetabits exch def + } ifelse + + dup /nummetamodules exch def + add add add sub /numdatamodules exch def + /numdatabits numdatamodules databpm mul def + } def + + % Select a symbol size sufficient to carry the message + /coderate [ 0.67 0.63 0.57 0.55 0.50 0.43 0.34 0.25 0.20 0.17 0.14 ] eclevel get def + /grosslen bits length coderate div ceiling cvi def + /snapsize {ceiling cvi 18 sub dup 0 lt {pop 0} if 4 idiv 4 mul 21 add} def + + rows -1 eq columns -1 eq and { % Square if neither rows or columns fixed + /size grosslen sqrt snapsize def + { + size size metrics + grosslen numdatabits le {exit} if + /size size 4 add def + } loop + /rows size def + /columns size def + } { + columns -1 eq rows -1 ne and { % Fixed height + /columns grosslen rows div snapsize def + { + rows columns metrics + grosslen numdatabits le {exit} if + /columns columns 4 add def + } loop + } if + rows -1 eq columns -1 ne and { % Fixed width + /rows grosslen columns div snapsize def + { + rows columns metrics + grosslen numdatabits le {exit} if + /rows rows 4 add def + } loop + } if + rows -1 ne columns -1 ne and { % Fixed height and width + rows columns metrics + } if + } ifelse + /C numdatabits def + /cols columns def + + % TODO Reject all invalid sizes + rows 145 gt cols 145 gt or { + /bwipp.jabcodeNoValidSymbol (Maximum length exceeded or invalid content) //raiseerror exec + } if + + % Pick ECC params to maximally fill symbol + /min C def + 3 1 8 { + /i exch def + i 1 add 1 9 { + /j exch def + /dist C j idiv j mul C j idiv i mul sub bits length sub def + dist min lt dist 0 ge and { + /datawc i def + /datawr j def + /min dist def + } if + } for + } for + + % Extend the encoded data to fill the required data length + /tmpbits C datawr idiv datawr mul C datawr idiv datawc mul sub string def + tmpbits 0 bits putinterval + bits length 1 tmpbits length 1 sub { + dup 1 sub tmpbits exch get dup 2 mod 0 eq {1 add} {1 sub} ifelse + tmpbits 3 1 roll put + } for + /bits tmpbits def + + % Avoid 15-bit overflow when multiplying the digits by stealing from the second digit + % m = 6364136223846793005 = 0x 5851 f42d 4c95 7f2d + /m0 16#5851 16#1 add def /m1 16#f42d 16#10000 sub def /m2 16#4c95 def /m3 16#7f2d def + + /lcg64_temper { + + % Multiply seed by 6364136223846793005 then add 1 + + /p00 m0 s0 mul def /p01 m0 s1 mul def /p02 m0 s2 mul def /p03 m0 s3 mul def + /p10 m1 s0 mul def /p11 m1 s1 mul def /p12 m1 s2 mul def /p13 m1 s3 mul def + /p20 m2 s0 mul def /p21 m2 s1 mul def /p22 m2 s2 mul def /p23 m2 s3 mul def + /p30 m3 s0 mul def /p31 m3 s1 mul def /p32 m3 s2 mul def /p33 m3 s3 mul def + + /s3 p33 16#10000 mod 1 add def % 1 added here + /s2 p32 16#10000 mod p33 16#10000 idiv add + p23 16#10000 mod add def + /s1 p31 16#10000 mod p32 16#10000 idiv add + p22 16#10000 mod p23 16#10000 idiv add add + p13 16#10000 mod add def + /s0 p30 16#10000 mod p31 16#10000 idiv add + p21 16#10000 mod p22 16#10000 idiv add add + p12 16#10000 mod p13 16#10000 idiv add add + p03 16#10000 mod add def + + % Simplify carry by making each digit positive by borrowing from more significant digit + /s3 s3 16#10000 add def + /s2 s2 16#ffff add def + /s1 s1 16#ffff add def + /s0 s0 16#ffff add def + + % Carry + /s2 s3 16#10000 idiv s2 add def /s3 s3 16#10000 mod def + /s1 s2 16#10000 idiv s1 add def /s2 s2 16#10000 mod def + /s0 s1 16#10000 idiv s0 add def /s1 s1 16#10000 mod def + /s0 s0 16#10000 mod def + + % Temper most significant 32 bits + s0 16#8000 sub 16#10000 mul s1 add 16#80000000 xor + 16#ffffffff and + dup -11 bitshift xor + dup 7 bitshift 16#62d3a980 neg and xor % 0x9D2C5680 - 0x100000000 + dup 15 bitshift 16#103a0000 neg and xor % 0xEFC60000 - 0x100000000 + 16#ffffffff and + dup -18 bitshift xor + + } def + + /createMatrixA { + + /nb_pcb wr 4 lt {Pg_sub_block 2 idiv} {Pg_sub_block wr idiv wc mul} ifelse def + /offset Pg_sub_block 32 div ceiling cvi def + /effwidth offset 32 mul def + /matrixA offset nb_pcb mul arrayw def + 0 1 offset nb_pcb mul 1 sub {matrixA exch 0 putw} for + /permutation Pg_sub_block array def + 0 1 Pg_sub_block 1 sub {permutation exch dup put} for + + 0 1 Pg_sub_block wr idiv 1 sub { + /i exch def + 0 1 wr 1 sub { + /j exch def + matrixA i effwidth wr add mul j add 32 idiv + 2 copy getw 1 31 i effwidth wr add mul j add 32 mod sub bitshift or putw + } for + } for + + % Pseudorandom permutation + /s0 16#0000 def /s1 16#0000 def /s2 16#000B def /s3 16#FC39 def % s=785465 + 1 1 wc 1 sub { + /i exch def + /off_index Pg_sub_block wr idiv i mul def + 0 1 Pg_sub_block 1 sub { + /j exch def + lcg64_temper + dup 0 lt {16#80000000 xor 2147483648.0 add} if + 4294967296.0 div Pg_sub_block j sub mul cvi % (float)UINT32_MAX = 65536.0 * 65536 + /pos exch def + 0 1 Pg_sub_block wr idiv 1 sub { + /k exch def + matrixA off_index k add offset mul j 32 idiv add + 2 copy getw + matrixA permutation pos get 32 idiv k offset mul add getw + 31 permutation pos get 32 mod sub neg bitshift 1 and + 31 j 32 mod sub bitshift + or putw + } for + permutation pos permutation Pg_sub_block 1 sub j sub 2 copy get permutation pos get + exch 4 1 roll % p b p a p[a] p[b] -> p b p[a] p a p[b] + put put + } for + } for + + } def + + /createMetadataMatrixA { + + /nb_pcb Pg_sub_block 2 idiv def + /offset Pg_sub_block 32 div ceiling cvi def + /matrixA offset nb_pcb mul arrayw def + 0 1 offset nb_pcb mul 1 sub {matrixA exch 0 putw} for + /permutation Pg_sub_block array def + 0 1 Pg_sub_block 1 sub {permutation exch dup put} for + + % Pseudorandom permutation + /s0 16#0000 def /s1 16#0000 def /s2 16#0000 def /s3 16#9691 def % s=38545 + /nb_once nb_pcb wc div Pg_sub_block mul 3 add cvi nb_pcb idiv def + 0 1 nb_pcb 1 sub { + /i exch def + 0 1 nb_once 1 sub { + /j exch def + lcg64_temper + dup 0 lt {16#80000000 xor 2147483648.0 add} if + 4294967296.0 div Pg_sub_block j sub mul cvi % (float)UINT32_MAX = 65536.0 * 65536 + /pos exch def + matrixA i offset mul permutation pos get 32 idiv add + 2 copy getw 1 31 permutation pos get 32 mod sub bitshift or putw + permutation pos permutation Pg_sub_block 1 sub j sub 2 copy get permutation pos get + exch 4 1 roll % p b p a p[a] p[b] -> p b p[a] p a p[b] + put put + } for + } for + + } def + + /GaussJordan { + + /nb_pcb wr 4 lt {Pg_sub_block 2 idiv} {Pg_sub_block wr idiv wc mul} ifelse def + /offset Pg_sub_block 32 div ceiling cvi def + /matrixH matrixA dup length array copyw def + /column_arrangement [ Pg_sub_block {0} repeat ] def + /processed_column [ Pg_sub_block {false} repeat ] def + /zero_lines_nb [ nb_pcb {0} repeat ] def + /swap_col [ Pg_sub_block 2 mul {0} repeat ] def + /zero_lines 0 def + + /loop0 0 def + 0 1 nb_pcb 1 sub { + /i exch def + /pivot_column Pg_sub_block 1 add def + 0 1 Pg_sub_block 1 sub { + /j exch def + matrixH offset 32 mul i mul j add 32 idiv getw + 31 offset 32 mul i mul j add 32 mod sub neg bitshift 1 and 1 eq { + /pivot_column j def + exit + } if + } for + pivot_column Pg_sub_block lt { + processed_column pivot_column true put + column_arrangement pivot_column i put + pivot_column nb_pcb ge { + swap_col loop0 2 mul pivot_column put + /loop0 loop0 1 add def + } if + /off_index pivot_column 32 idiv def + /off_index1 pivot_column 32 mod def + 0 1 nb_pcb 1 sub { + /j exch def + i j ne { + matrixH off_index j offset mul add getw + 31 off_index1 sub neg bitshift 1 and 1 eq { + 0 1 offset 1 sub { + /k exch def + matrixH offset j mul k add + 2 copy getw matrixH offset i mul k add getw xor putw + } for + } if + } if + } for + } { + zero_lines_nb zero_lines i put + /zero_lines zero_lines 1 add def + } ifelse + } for + + /matrix_rank nb_pcb zero_lines sub def + /loop2 0 def + matrix_rank 1 nb_pcb 1 sub { + /i exch def + column_arrangement i get 0 gt { + 0 1 nb_pcb 1 sub { + /j exch def + processed_column j get not { + column_arrangement j column_arrangement i get put + column_arrangement i 0 put + processed_column j true put + processed_column i false put + swap_col loop0 2 mul i put + swap_col loop0 2 mul 1 add j put + column_arrangement i j put + /loop0 loop0 1 add def + /loop2 loop2 1 add def + exit + } if + } for + } if + } for + + /loop1 0 def + 0 1 nb_pcb 1 sub { + /kl exch def + processed_column kl get not loop1 loop0 loop2 sub lt and { + column_arrangement kl column_arrangement swap_col loop1 2 mul get get put + processed_column kl true put + swap_col loop1 2 mul 1 add kl put + /loop1 loop1 1 add def + } if + } for + + /loop1 0 def + 0 1 nb_pcb 1 sub { + /kl exch def + processed_column kl get not { + column_arrangement kl zero_lines_nb loop1 get put + /loop1 loop1 1 add def + } if + } for + + 0 1 nb_pcb 1 sub { + /i exch def + 0 1 offset 1 sub { + /j exch def + matrixH column_arrangement i get offset mul j add getw + matrixA exch i offset mul j add exch putw + } for + } for + + /tmp 0 def + 0 1 loop0 1 sub { + /i exch def + 0 1 nb_pcb 1 sub { + /j exch def + matrixA swap_col i 2 mul get 32 idiv j offset mul add getw + 31 swap_col i 2 mul get 32 mod sub neg bitshift 1 and neg tmp xor 1 and + tmp xor /tmp exch def + matrixA swap_col i 2 mul get 32 idiv j offset mul add + 2 copy getw + matrixA swap_col i 2 mul 1 add get 32 idiv j offset mul add getw + 31 swap_col i 2 mul 1 add get 32 mod sub neg bitshift 1 and neg + matrixA swap_col i 2 mul get 32 idiv j offset mul add getw xor + 1 31 swap_col i 2 mul get 32 mod sub bitshift and + xor putw + matrixA swap_col i 2 mul 1 add get 32 idiv j offset mul add + 2 copy getw + tmp 1 and neg + matrixA swap_col i 2 mul 1 add get 32 idiv j offset mul add getw xor + 1 31 swap_col i 2 mul 1 add get 32 mod sub bitshift and + xor putw + } for + } for + + } def + + /createGeneratorMatrix { + + /pn Pg_sub_block matrix_rank sub def + /offset pn 32 div ceiling cvi def + /effwidth offset 32 mul def + /offset_cap Pg_sub_block 32 div ceiling cvi def + /G offset Pg_sub_block mul arrayw def + 0 1 offset Pg_sub_block mul 1 sub { + G exch 0 putw + } for + 0 1 pn 1 sub { + /i exch def + G Pg_sub_block pn sub i add offset mul i 32 idiv add + 2 copy getw 1 31 i 32 mod sub bitshift or putw + } for + /matrix_index Pg_sub_block pn sub def + /loop0 0 def + 0 1 Pg_sub_block pn sub effwidth mul 1 sub { + /i exch def + matrix_index Pg_sub_block ge { + /loop0 loop0 1 add def + /matrix_index Pg_sub_block pn sub def + } if + i effwidth mod pn lt { + G i 32 idiv + 2 copy getw + matrixA matrix_index 32 idiv offset_cap loop0 mul add getw + 31 matrix_index 32 mod sub neg bitshift 1 and neg + G i 32 idiv getw xor + 1 31 i 32 mod sub bitshift and + xor putw + /matrix_index matrix_index 1 add def + } if + } for + + } def + + /ldpc { + + /wr exch def + /wc exch def + [ exch {48 sub} forall ] /data exch def + + /Pn data length def + wr -1 ne { % Message data + /Pg Pn wr mul wr wc sub div ceiling wr div ceiling wr mul cvi def + /nb_sub_blocks Pg 2700 idiv 1 add def + /Pg_sub_block Pg nb_sub_blocks idiv wr idiv wr mul def + /Pn_sub_block Pg_sub_block wr wc sub mul wr idiv def + /nb_sub_blocks Pg Pg_sub_block idiv def + /encoding_iterations Pg Pg_sub_block idiv Pn_sub_block nb_sub_blocks mul Pn lt {1 sub} if def + createMatrixA + } { % Metadata + /Pg Pn 2 mul def + /nb_sub_blocks 1 def + /Pg_sub_block Pg def + /Pn_sub_block Pn def + /encoding_iterations 1 def + createMetadataMatrixA + } ifelse + GaussJordan + createGeneratorMatrix + + /ecc_encoded_data Pg array def + + /offset Pg_sub_block matrix_rank sub 32 div ceiling cvi def + 0 1 encoding_iterations 1 sub { + /iter exch def + 0 1 Pg_sub_block 1 sub { + /i exch def + /temp 0 def + /loop0 0 def + /offset_index offset i mul def + iter Pn_sub_block mul 1 iter 1 add Pn_sub_block mul 1 sub { + data exch get + G offset_index loop0 32 idiv add getw 31 loop0 32 mod sub neg bitshift 1 and and + /temp exch temp xor def + /loop0 loop0 1 add def + } for + ecc_encoded_data i iter Pg_sub_block mul add temp put + } for + } for + + encoding_iterations nb_sub_blocks ne { + /start encoding_iterations Pn_sub_block mul def + /last_index encoding_iterations Pg_sub_block mul def + /Pg_sub_block Pg encoding_iterations Pg_sub_block mul sub def + /Pn_sub_block Pg_sub_block wr wc sub mul wr idiv def + createMatrixA + GaussJordan + createGeneratorMatrix + /offset Pg_sub_block matrix_rank sub 32 div ceiling cvi def + 0 1 Pg_sub_block 1 sub { + /i exch def + /temp 0 def + /loop0 0 def + /offset_index offset i mul def + start 1 Pn 1 sub { + data exch get + G offset_index loop0 32 idiv add getw 31 loop0 32 mod sub neg bitshift 1 and and + /temp exch temp xor def + /loop0 loop0 1 add def + } for + ecc_encoded_data i last_index add temp put + } for + } if + + /out Pg string def + 0 1 Pg 1 sub { + dup ecc_encoded_data exch get + out 3 1 roll 48 add put + } for + out + + } def + + % Replace data bitstream with LDPC error correction stream + /bits bits datawc datawr ldpc def + + % Interleave via pseudorandom permutation + /s0 16#0000 def /s1 16#0000 def /s2 16#0003 def /s3 16#75C7 def % s=226759 + bits length 1 sub -1 1 { + /l exch def + lcg64_temper + dup 0 lt {16#80000000 xor 2147483648.0 add} if + 4294967296.0 div l 1 add mul cvi % (float)UINT32_MAX = 65536.0 * 65536 + /r exch def + bits l get bits r get + bits exch l exch put + bits exch r exch put + } for + + % Append padding bits to the interleaved, ECC encoded data up to capacity + /tmpbits C string def + tmpbits 0 bits putinterval + /j bits length def + C j sub 1 add 2 idiv { + tmpbits j 48 put + j 1 add C lt {tmpbits j 1 add 49 put} if + /j j 2 add def + } repeat + /bits tmpbits def + + % Define the color palette + colors 4 eq { + /bi 0 def /gi 1 def /mi 2 def /yi 3 def + /ki 4 def /wi 5 def % Extended + /palette << + bi (0000FF) gi (00FF00) mi (FF00FF) yi (FFFF00) + ki (000000) wi (FFFFFF) + >> def + /metacolorindex [bi gi mi yi] def + /palettelayout [bi gi mi yi] def + } { + /rgbres << + % r g b Graduations + 8 [ 2 2 2 ] + 16 [ 4 2 2 ] + 32 [ 4 4 2 ] + 64 [ 4 4 4 ] + 128 [ 8 4 4 ] + 256 [ 8 8 4 ] + >> colors get def + + /rvals rgbres 0 get [ exch 1 sub dup 0 exch 1 exch {255 2 index div mul round cvi exch} for pop ] def + /gvals rgbres 1 get [ exch 1 sub dup 0 exch 1 exch {255 2 index div mul round cvi exch} for pop ] def + /bvals rgbres 2 get [ exch 1 sub dup 0 exch 1 exch {255 2 index div mul round cvi exch} for pop ] def + + /palette colors dict def + /palettelayout 64 colors 2 copy gt {exch} if pop array def + /i 0 def /j 8 def + rvals { + /r exch def + gvals { + /g exch def + bvals { + /b exch def + r 16 bitshift g 8 bitshift or b or + (000000) 6 string copy dup 3 -1 roll 16 6 string cvrs dup length 6 exch sub exch putinterval + false + 1 index (000000) eq {/ki i def pop true} if + 1 index (0000FF) eq {/bi i def pop true} if + 1 index (00FF00) eq {/gi i def pop true} if + 1 index (00FFFF) eq {/ci i def pop true} if + 1 index (FF0000) eq {/ri i def pop true} if + 1 index (FF00FF) eq {/mi i def pop true} if + 1 index (FFFF00) eq {/yi i def pop true} if + 1 index (FFFFFF) eq {/wi i def pop true} if + not { + colors 64 le + colors 128 eq + r 0 eq r 73 eq or r 182 eq or r 255 eq or and + colors 256 eq + r 0 eq r 73 eq or r 182 eq or r 255 eq or and + g 0 eq g 73 eq or g 182 eq or g 255 eq or and + or or { % RGB space is sampled into 64 slots + palettelayout j i put + /j j 1 add def + } if + } if + palette exch i exch put + /i i 1 add def + } forall + } forall + } forall + palettelayout 0 [ki bi gi ci ri mi yi wi] putinterval + /metacolorindex [ki bi gi ci ri mi yi wi] def + } ifelse + + % Create the pixel map + /pixs [rows cols mul {-1} repeat] def + /jmv {cols mul add} def + + % Finder patterns + slave not { % Master alignment pattern + /fpat [ + [ 1 1 1 0 0 ] + [ 1 2 2 0 0 ] + [ 1 2 1 2 1 ] + [ 0 0 2 2 1 ] + [ 0 0 1 1 1 ] + ] def + /fmap [ + [ -1 bi yi ] % UL + [ -1 yi bi ] % LL + [ -1 gi mi ] % UR + [ -1 mi gi ] % LR + ] def + } { % Slave alignment pattern + /fpat [ + [ 0 0 0 0 0 ] + [ 0 2 2 0 0 ] + [ 0 2 1 2 0 ] + [ 0 0 2 2 0 ] + [ 0 0 0 0 0 ] + ] def + /fmap [ + [ -1 ki wi ] % UL + [ -1 ki wi ] % LL + [ -1 ki wi ] % UR + [ -1 ki wi ] % LR + ] def + } ifelse + 0 1 4 { + /y exch def + 0 1 4 { + /x exch def + /fpb fpat y get x get def + pixs x 1 add y 1 add jmv fmap 0 get fpb get put + pixs x 1 add rows y sub 2 sub jmv fmap 1 get fpb get put + pixs x cols add 6 sub y 1 add jmv fmap 2 get fpb get put + pixs x cols add 6 sub rows y sub 2 sub jmv fmap 3 get fpb get put + } for + } for + + % Alignment patterns + /algnpat0 [ + [ ki ki -1 ] + [ ki wi ki ] + [ -1 ki ki ] + ] def + /algnpat1 [ + [ -1 ki ki ] + [ ki wi ki ] + [ ki ki -1 ] + ] def + /num cols 16 div round cvi 1 sub def + /algnrpos [ 3 17 ] def + num 0 gt { + /algnrpos [ 0 1 num {cols 7 sub num div mul cvi 3 add} for ] def + } if + /num rows 16 div round cvi 1 sub def + /algncpos [ 3 17 ] def + num 0 gt { + /algncpos [ 0 1 num {rows 7 sub num div mul cvi 3 add} for ] def + } if + /putalgnpat { + /pp exch def + /py exch def + /px exch def + 0 1 2 { + /pb exch def + 0 1 2 { + /pa exch def + pixs px pa add py pb add jmv pp pb get pa get put + } for + } for + } def + 0 1 algncpos length 1 sub { + /j exch def + /y algncpos j get def + 0 1 algnrpos length 1 sub { + /i exch def + /x algnrpos i get def + pixs x y jmv get -1 eq { + x 1 sub y 1 sub i j add 2 mod 0 eq {algnpat0} {algnpat1} ifelse putalgnpat + } if + } for + } for + + slave not { + + [ % Expanded to [ x y ] [ x -y ] [ -x -y ] [ x -y ] + % Metadata and palette + [ 6 1 ] [ 6 2 ] [ 6 3 ] [ 6 4 ] [ 6 5 ] [ 6 6 ] [ 5 6 ] [ 4 6 ] [ 3 6 ] [ 2 6 ] % 0-39 + [ 1 6 ] [ 7 1 ] [ 7 2 ] [ 7 3 ] [ 7 4 ] [ 7 5 ] [ 7 6 ] [ 7 7 ] [ 6 7 ] [ 5 7 ] % 40-79 + % Palette only + [ 4 7 ] [ 3 7 ] [ 2 7 ] [ 1 7 ] [ 8 1 ] [ 8 2 ] [ 8 3 ] [ 8 4 ] % 16-31 + [ 8 5 ] [ 8 6 ] [ 8 7 ] [ 8 8 ] [ 7 8 ] [ 6 8 ] [ 5 8 ] [ 4 8 ] % 32-47 + [ 3 8 ] [ 2 8 ] [ 1 8 ] [ 9 1 ] [ 9 2 ] [ 9 3 ] [ 9 4 ] [ 9 5 ] % 48-63 + ] { + aload pop /y exch def /x exch def + [ x y ] [ x neg y ] [ x neg y neg ] [ x y neg ] + } forall + 176 array astore /metadatamap exch def + + /palettemap1 [ + [ 4 1 ] [ 4 2 ] [ 5 1 ] [ 5 2 ] [ 2 4 ] [ 2 5 ] [ 1 4 ] [ 1 5 ] % 0-7 + [ -2 1 ] [ -2 2 ] [ -1 1 ] [ -1 2 ] [ -4 4 ] [ -4 5 ] [ -5 4 ] [ -5 5 ] % 8-15 + ] def + + /palettemap2 [ + [ -4 -5 ] [ -4 -4 ] [ -5 -5 ] [ -5 -4 ] [ -2 -2 ] [ -2 -1 ] [ -1 -2 ] [ -1 -1 ] % 0-7 + [ 2 -5 ] [ 2 -4 ] [ 1 -5 ] [ 1 -4 ] [ 4 -2 ] [ 4 -1 ] [ 5 -2 ] [ 5 -1 ] % 8-15 + ] def + + } { % Slave + + % TODO Cascade + + /metadatamap [ + 1 1 19 { + /i exch def + [ 0 i ] [ 1 i ] + } for + 5 1 12 { + /i exch def + [ 2 i ] [ 3 i ] + } for + ] def + + /palettemap1 [ + 5 1 12 { [ exch 4 exch ] } for + 12 -1 5 { [ exch 5 exch ] } for + 5 1 12 { [ exch 6 exch ] } for + 12 -1 5 { [ exch 7 exch ] } for + ] def + + /palettemap2 [ + palettemap1 {[ exch aload pop neg exch neg exch]} forall + ] def + + } ifelse + + % Normalise wrapping + metadatamap { + dup 0 get dup 0 lt {cols add 1 sub 1 index 0 3 -1 roll put} {pop} ifelse + dup 1 get dup 0 lt {rows add 1 sub 1 index 1 3 -1 roll put} {pop} ifelse + pop + } forall + palettemap1 { + dup 0 get dup 0 lt {cols add 1 sub 1 index 0 3 -1 roll put} {pop} ifelse + dup 1 get dup 0 lt {rows add 1 sub 1 index 1 3 -1 roll put} {pop} ifelse + pop + } forall + palettemap2 { + dup 0 get dup 0 lt {cols add 1 sub 1 index 0 3 -1 roll put} {pop} ifelse + dup 1 get dup 0 lt {rows add 1 sub 1 index 1 3 -1 roll put} {pop} ifelse + pop + } forall + + % Reserve the metadata modules to be placed once mask is determined + 0 1 nummetamodules 1 sub { + pixs exch metadatamap exch get aload pop jmv 0 put + } for + + % Place the color palette + slave not { + % Up to first 16 colors into finder slots + 0 1 16 colors 2 copy gt {exch} if pop 1 sub { + /i exch def + palettelayout i get dup + pixs exch palettemap1 i get aload pop jmv exch put + pixs exch palettemap2 i get aload pop jmv exch put + } for + /i 16 def + } { + /i 0 def + } ifelse + + % Continue palette placement after end of metadata modules + /j nummetamodules def + i 2 palettelayout length 1 sub { + /i exch def + palettelayout i get dup + pixs exch metadatamap j get aload pop jmv exch put + pixs exch metadatamap j 2 add get aload pop jmv exch put + palettelayout i 1 add get dup + pixs exch metadatamap j 1 add get aload pop jmv exch put + pixs exch metadatamap j 3 add get aload pop jmv exch put + /j j 4 add def + } for + + % Calculate the mask patterns applied to data modules + /maskfuncs [ + {add colors mod} bind + {pop colors mod} bind + {exch pop colors mod} bind + {3 idiv exch 2 idiv add colors mod} bind + {2 idiv exch 3 idiv add colors mod} bind + {add dup 2 idiv exch 3 idiv add colors mod} bind + {2 copy exch dup mul mul 7 mod 3 1 roll exch dup mul add 2 mul 19 mod add colors mod} bind + {2 copy dup mul mul 5 mod 3 1 roll dup mul exch 2 mul add 13 mod add colors mod} bind + ] def + mask -1 ne { % User specifies a mask + /maskfuncs [maskfuncs mask get] def + /bestmaskval mask def + } if + /masks maskfuncs length array def + 0 1 masks length 1 sub { + /m exch def + /mask rows cols mul array def + 0 1 rows 1 sub { + /j exch def + 0 1 cols 1 sub { + /i exch def + pixs i j jmv get -1 eq {i j maskfuncs m get exec} {0} ifelse + mask i j jmv 3 -1 roll put + } for + } for + masks m mask put + } for + + % Walk the symbol placing the data bitstream + /posx 0 def /posy 0 def + /i 0 def + { % loop + posx cols eq {exit} if + pixs posx posy jmv get -1 eq { + bits i databpm getinterval 0 exch {48 sub add 2 mul} forall 2 idiv + pixs posx posy jmv 3 -1 roll put + /i i databpm add def + } if + /posy posy 1 add def + posy rows eq {/posy 0 def /posx posx 1 add def} if + } loop + + % Evaluate runlength encoded rows or columns in full symbols + /evalrle { + /scrle exch def + /scr1 0 def /scr3 0 def + 0 2 scrle length 2 sub { + /j exch def + scrle j 1 add get -1 ne { % Skip over voids + % Detect runs of 5 or more like modules, except in voids + scrle j get dup 5 ge {2 sub /scr1 exch scr1 add def} {pop} ifelse + % Detect finder pattern + j 4 ge j scrle length 5 sub le and { + scrle j 4 sub 10 getinterval % n1 c1 ... n5 c5 + dup {1 eq} forall pop 4 {exch pop and} repeat { % n{1-5}=1 + mark exch aload pop + 8 index dup 6 index eq exch 2 index eq and % c1=c3=c5 + 7 index 4 index eq and { % c2=c4 + 2 index /c4 exch def /c5 exch def + c4 bi eq c5 yi eq and c4 yi eq c5 bi eq and + c4 gi eq c5 mi eq and c4 mi eq c5 gi eq and + or or or {/scr3 scr3 100 add def} if + } if + cleartomark + } {pop} ifelse + } if + } if + } for + scr1 scr3 + } def + + /evalmask { + /sym exch def + + /n1 0 def /n2 0 def /n3 0 def + /rle rows cols 2 copy lt {exch} if pop 2 mul 2 add array def + /lastpairs cols array def + /thispairs cols array def + + % Runlength encode and evaluate each column + 0 1 cols 1 sub { + /i exch def + mark 0 -1 + i cols rows cols mul 1 sub { + sym exch get 2 copy eq {pop exch 1 add exch} {1 exch} ifelse + } for + rle 0 counttomark 2 sub getinterval astore + evalrle n3 add /n3 exch def n1 add /n1 exch def + pop + } for + + 0 1 rows 1 sub { + /i exch def + + % Runlength encode and evaluate each row + /symrow sym i cols mul cols getinterval def + mark 0 -1 + symrow { + 2 copy eq {pop exch 1 add exch} {1 exch} ifelse + } forall + rle 0 counttomark 2 sub getinterval astore + evalrle n3 add /n3 exch def n1 add /n1 exch def + pop + + % Count and score same coloured blocks + /lastpairs thispairs /thispairs lastpairs def def + -1 symrow {exch 2 copy ne {pop -1 exch} if} forall + pop + thispairs astore pop + i 0 gt { + mark + lastpairs aload pop thispairs aload pop + n2 cols { exch dup -1 ne { cols 1 add index eq {3 add} if } {pop} ifelse } repeat + /n2 exch def + cleartomark + } if + } for + + n1 n2 add n3 add + } def + + % Evaluate the masked symbols to find the most suitable + /bestscore 999999999 def + 0 1 masks length 1 sub { + /m exch def + /masksym rows cols mul array def + 0 1 rows cols mul 1 sub { + /i exch def + masksym i pixs i get masks m get i get xor put + } for + masks length 1 ne { + masksym evalmask /score exch def + score bestscore lt { + /bestsym masksym def + /bestmaskval m def + /bestscore score def + } if + } { + /bestsym masksym def + } ifelse + } for + /pixs bestsym def + /metamask bestmaskval def + + % Derive the metadata bitstream + /addtometapart { + dup metapart p 3 -1 roll putinterval + length p add /p exch def + } def + + /addtometabits { + dup metabits q 3 -1 roll putinterval + length q add /q exch def + } def + + /metapart 40 string def + /metabits nummetabits string def + /p 0 def /q 0 def + slave not { + + % Part I + colors ln 2 ln div round cvi 1 sub + 3 tofixedbits addtometapart % Nc + metapart 0 p getinterval 2 -1 ldpc addtometabits /p 0 def + + % Part II + metass 1 tofixedbits addtometapart % SS + metavf 2 tofixedbits addtometapart % VF + metamask 3 tofixedbits addtometapart % MSK + hasslaves {(1)} {(0)} ifelse addtometapart % SF + metapart 0 p getinterval 2 -1 ldpc addtometabits /p 0 def + + % Part III + metass 0 eq { % Square + cols 17 sub 4 idiv [ 0 4 8 16 ] metavf get sub 1 sub + metavlen tofixedbits addtometapart % V + } { % Rectangular + cols 17 sub 4 idiv 1 sub + metavlen 2 idiv tofixedbits addtometapart % V1 + rows 17 sub 4 idiv 1 sub + metavlen 2 idiv tofixedbits addtometapart % V2 + } ifelse + datawc 3 sub metaelen 2 idiv tofixedbits addtometapart % E1 + datawr 4 sub metaelen 2 idiv tofixedbits addtometapart % E2 + hasslaves { % TODO Cascading + 0 4 tofixedbits addtometapart % S + } if + metapart 0 p getinterval 2 -1 ldpc addtometabits /p 0 def + + } { % slave + + % Part I + sameshape {0} {1} ifelse 1 tofixedbits addtometapart % SS + sameecc {0} {1} ifelse 1 tofixedbits addtometapart % SE + hasslaves {1} {0} ifelse 1 tofixedbits addtometapart % SF + metapart 0 p getinterval 2 -1 ldpc addtometabits /p 0 def + + % Part II + sameshape not { + diffside 17 sub 4 idiv 1 sub + 5 tofixedbits addtometapart % V + } if + hasslaves { % TODO Cascading + 0 3 tofixedbits addtometapart % S + } if + metapart 0 p getinterval 2 -1 ldpc addtometabits /p 0 def + + % Part III + sameecc not { + datawc 3 sub metaelen 2 idiv tofixedbits addtometapart % E1 + datawr 4 sub metaelen 2 idiv tofixedbits addtometapart % E2 + } if + metapart 0 p getinterval 2 -1 ldpc addtometabits /p 0 def + + } ifelse + q 1 nummetabits 1 sub { % Pad with 0s + metabits exch 48 put + } for + + % Place the metadata + /i 0 def /j 0 def + slave not { % Two-color encoding of Part I (Nc) in master symbols + metabits i 6 getinterval { + colors 4 eq {[bi yi]} {[ki wi]} ifelse exch 48 sub get + pixs metadatamap j get aload pop jmv 3 -1 roll put + /j j 1 add def + } forall + /i i 6 add def + } if + nummetabits i sub metabpm idiv { + metabits i metabpm getinterval 0 exch {48 sub add 2 mul} forall 2 idiv + metacolorindex exch get + pixs metadatamap j get aload pop jmv 3 -1 roll put + /i i metabpm add def + /j j 1 add def + } repeat + + << + /ren //renmatrix + /pixs pixs + /pixx cols + /pixy rows + /colormap palette + /height rows 2 mul 72 div + /width cols 2 mul 72 div + /opt options + >> + + dontdraw not //renmatrix if + + end + +} +[/barcode] {null def} forall +bind def +/jabcode dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER jabcode-- + % --BEGIN ENCODER gs1-cc-- -% --REQUIRES preamble raiseerror renmatrix micropdf417 pdf417-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renmatrix micropdf417 pdf417-- % --DESC: GS1 Composite 2D Component % --EXAM: (01)95012345678903(3103)000123 % --EXOP: ccversion=b cccolumns=4 % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp gs1-cc 0.0 2017040400 208546 207818 -%%BeginData: 656 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp gs1-cc 0.0 2022082100 222469 205288 +%%BeginData: 639 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /pdf417 dup /uk.co.terryburton.bwipp findresource put dup /micropdf417 dup /uk.co.terryburton.bwipp findresource put begin /gs1-cc { - + 20 dict begin % Confine variables to local scope /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def + /parse false def + /dontlint false def + /lintreqs false def /dontdraw false def /ccversion (a) def /cccolumns -1 def /lintype () def /linwidth -1 def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -20434,10 +27658,12 @@ begin currentdict end /options exch def } if options {def} forall - + /cccolumns cccolumns cvi def /linwidth linwidth cvi def + /gs1-cc //loadctx exec + % Select columns based on linear type cccolumns -1 eq { << @@ -20454,55 +27680,20 @@ begin /databarlimited 3 /databarexpanded 4 /databarexpandedstacked 4 - >> lintype get /cccolumns exch def + >> lintype get /cccolumns exch def } if - % Expand ordinals of the form ^NNN to ASCII - /expand { - /in exch def - /out in length string def - /j 0 def - in - { % loop - (^) search { - dup out exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi out exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup out exch j exch putinterval - length j add /j exch def - out 0 j getinterval exit - } ifelse - } loop - } bind def - - % Parse out AIs - /ais [] def - /vals [] def - barcode dup length 1 sub 1 exch getinterval - { % loop - dup () eq {exit} if - (\)) search pop - exch pop - exch (\() search { - exch pop exch 3 1 roll - } { - () 3 1 roll - } ifelse - [ ais aload pop counttomark 2 add index ] /ais exch def - [ vals aload pop counttomark 1 add index expand ] /vals exch def - pop pop - } loop - pop + barcode /ai //gs1process exec + /fncs exch def + /vals exch def + /ais exch def % Method selection - /isupper {dup 65 ge exch 90 le and} bind def % A-Z - /isnum0 {dup 48 ge exch 57 le and} bind def % 0-9 - /isnum1 {dup 49 ge exch 57 le and} bind def % 1-9 + /isupper {dup 65 ge exch 90 le and} def % A-Z + /isnum0 {dup 48 ge exch 57 le and} def % 0-9 + /isnum1 {dup 49 ge exch 57 le and} def % 1-9 { % common exit - + % (10/11/17)... ais length 1 ge { ais 0 get (10) eq ais 0 get (11) eq or ais 0 get (17) eq or { @@ -20545,18 +27736,20 @@ begin % Freeform -1 (0) exit - + } loop /method exch def /npre exch def - /fnc1 -1 def /lnumeric -2 def /lalphanumeric -3 def /liso646 -4 def - /tobin { string dup length 1 sub 0 exch 1 exch {1 index exch 48 put} for - dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval - } bind def - + dup 3 -1 roll 2 2 index length string cvrs dup length 2 index length exch sub exch putinterval + } def + +{ + + /fnc1 -1 def /lnumeric -2 def /lalphanumeric -3 def /liso646 -4 def + /alpha << 65 1 90 {dup 65 sub 5 tobin} for 48 1 57 {dup 4 add 6 tobin} for @@ -20566,16 +27759,16 @@ begin /numeric << 0 1 119 { dup (00) 2 string copy dup 3 -1 roll 11 2 string cvrs - dup length 2 exch sub exch putinterval - dup 0 get 65 eq {dup 0 94 put} if - dup 1 get 65 eq {dup 1 94 put} if + dup length 2 exch sub exch putinterval + dup 0 get 65 eq {dup 0 94 put} if + dup 1 get 65 eq {dup 1 94 put} if exch 8 add - (0000000) 7 string copy dup 3 -1 roll 2 7 string cvrs + (0000000) 7 string copy dup 3 -1 roll 2 7 string cvrs dup length 7 exch sub exch putinterval } for lalphanumeric (0000) >> def - + /alphanumeric << 48 1 57 {dup 43 sub 5 tobin} for fnc1 (01111) @@ -20585,7 +27778,7 @@ begin lnumeric (000) liso646 (00100) >> def - + /iso646 << 48 1 57 {dup 43 sub 5 tobin} for fnc1 (01111) @@ -20601,6 +27794,8 @@ begin lalphanumeric (00100) >> def +} ctxdef + method (10) eq { % TODO: fixme ais 0 get (11) eq ais 0 get (17) eq or { vals 0 get @@ -20615,6 +27810,7 @@ begin ] /cdf exch def /ais ais 1 ais length 1 sub getinterval def /vals vals 1 vals length 1 sub getinterval def + /fncs fncs 1 fncs length 1 sub getinterval def } { /cdf [ 1 0 1 1 ] def } ifelse @@ -20624,6 +27820,7 @@ begin ais length 1 gt {/gpf [ gpf aload pop fnc1 ] def} if % TODO: check /ais ais 1 ais length 1 sub getinterval def /vals vals 1 vals length 1 sub getinterval def + /fncs fncs 1 fncs length 1 sub getinterval def } { /gpf [fnc1] def % TODO: check } ifelse @@ -20645,7 +27842,7 @@ begin /ai90rem exch def /nalpha 0 ai90rem {dup 65 ge exch 90 le and {1 add} if} forall def /nnums 0 ai90rem {dup 48 ge exch 57 le and {1 add} if} forall def - /mode nalpha nnums gt {(alpha)} {(numeric)} ifelse def + /mode nalpha nnums gt {(alpha)} { nalpha 0 eq {(numeric)} {(alphanumeric)} ifelse } ifelse def nalpha nnums add ai90rem length ne {/mode (alphanumeric) def} if /cdf [ cdf aload pop @@ -20693,15 +27890,14 @@ begin abits aload pop ] def } ifelse - mode (numeric) eq { + mode (alpha) ne { /gpf [ ai90rem {} forall ais length 1 gt {fnc1} if ] def } { - /encs mode (alpha) eq {alpha} {alphanumeric} ifelse def /in [ ai90rem {} forall ais length 1 gt {fnc1} if ] def /out in length 6 mul array def /j 0 def 0 1 in length 1 sub { - in exch get encs exch get + in exch get alpha exch get dup [ exch {48 sub} forall ] out exch j exch putinterval length j add /j exch def } for @@ -20710,10 +27906,11 @@ begin out 0 j getinterval aload pop ] def /gpf [] def - ais length 1 gt mode (alpha) ne or {/mode (numeric) def} if + ais length 1 gt {/mode (numeric) def} if } ifelse /ais ais 1 ais length 1 sub getinterval def /vals vals 1 vals length 1 sub getinterval def + /fncs fncs 1 fncs length 1 sub getinterval def ais length 0 ne { ais1 (21) eq ais1 (8004) eq or { /gpf [ @@ -20722,6 +27919,7 @@ begin ] def /ais ais 1 ais length 1 sub getinterval def /vals vals 1 vals length 1 sub getinterval def + /fncs fncs 1 fncs length 1 sub getinterval def ais length 0 ne {/gpf [gpf aload pop fnc1] def} if } if } if @@ -20733,24 +27931,6 @@ begin /mode (numeric) def } if - % Pre-defined fixed length data field AIs - % any AI whose prefix is not included in this table must be - % terminated with "FNC1", even if it's fixed length - /aifixed 23 dict def - [ - 0 1 4 {} for - ] { - (00) 2 string copy dup dup 1 5 -1 roll 48 add put aifixed 3 1 roll put - } forall - [ - 11 1 20 {} for - 23 - 31 1 36 {} for - 41 - ] { - 10 2 string cvrs dup aifixed 3 1 roll put - } forall - % Append the remaining AI data 0 1 ais length 1 sub { /i exch def @@ -20761,7 +27941,7 @@ begin dup gpf length ai [ exch {} forall ] putinterval dup gpf length ai length add val [ exch {} forall ] putinterval /gpf exch def - i ais length 1 sub ne aifixed ai 0 2 getinterval known not and { % Append FNC1 + i ais length 1 sub ne fncs i get and { % Append FNC1 gpf length 1 add array dup 0 gpf putinterval dup gpf length fnc1 put @@ -20770,21 +27950,25 @@ begin } for % Calculate the number of bits remaining to the next valid symbol size +{ + /bitcapsmaps << + /a [ + [167 138 118 108 88 78 59] + [167 138 118 98 78] + [197 167 138 108 78] + ] + /b [ + [ 336 296 256 208 160 104 56] + [ 768 648 536 416 304 208 152 112 72 32] + [1184 1016 840 672 496 352 264 208 152 96 56] + ] + >> def +} ctxdef + /rembits { /used exch def ccversion (c) ne { % cc-a or cc-b - << - /a [ - [167 138 118 108 88 78 59] - [167 138 118 98 78] - [197 167 138 108 78] - ] - /b [ - [ 336 296 256 208 160 104 56] - [ 768 648 536 416 304 208 152 112 72 32] - [1184 1016 840 672 496 352 264 208 152 96 56] - ] - >> ccversion get cccolumns 2 sub get /bitcaps exch def + /bitcaps bitcapsmaps ccversion get cccolumns 2 sub get def -1 bitcaps {dup used ge {exch} if pop} forall dup -1 ne {used sub} if } { @@ -20793,14 +27977,19 @@ begin m 40 le {8 } if m 41 ge m 160 le and {16} if m 161 ge m 320 le and {32} if - m 321 ge {64} if + m 321 ge m 833 le and {64} if % 833 = 900 - 3 - 64, where 900 = 30 rows x 30 cols limit + m 834 ge {32} if % Reduce to meet advertised "up to 2361 digits" (allows max 2372) within 900 limit /eccws exch def /m m eccws add 3 add def - /c linwidth 52 sub 17 idiv def - m c idiv 90 gt {/c c 1 add def} if - /r m c div ceiling cvi def - /tgt c r mul eccws sub 3 sub dup 5 idiv 6 mul exch 5 mod add 8 mul def - used 8296 le {tgt used sub} {-1} ifelse + cccolumns 30 gt { /cccolumns 30 def } if + { % Loop until rows <= 30 or columns >= 30 (GS1 General Specifications 5.11.2.3) + m cccolumns div ceiling cvi 30 le cccolumns 30 ge or {exit} if + /cccolumns cccolumns 1 add def + } loop + /r m cccolumns div ceiling cvi def + r 3 lt { /r 3 def } if % GS1 General Specifications 5.11.2.3 "3 to 30 rows" + /tgt cccolumns r mul eccws sub 3 sub dup 5 idiv 6 mul exch 5 mod add 8 mul def + used 8304 le {tgt used sub} {-1} ifelse } ifelse dup -1 eq { % Upgrade CC-A to CC-B or CC-B to CC-C to fit pop @@ -20813,10 +28002,10 @@ begin } { /ccversion -1 def } ifelse - } ifelse + } ifelse used rembits } if - } bind def + } def /encode { dup /raw ne {exch get} {pop} ifelse @@ -20824,7 +28013,7 @@ begin dup length exch gpfenc exch j exch putinterval /j exch j add def - } bind def + } def % Pre-compute alphanumeric and numeric runlengths and position of next ISO646-only characters /numericruns [ gpf length {0} repeat 0 -1 ] def @@ -20834,7 +28023,7 @@ begin /i exch def gpf i get (00) 2 string copy - dup 0 gpf i get dup fnc1 eq {pop 94} if put + dup 0 gpf i get dup fnc1 eq {pop 94} if put i gpf length 1 sub lt {dup 1 gpf i 1 add get dup fnc1 eq {pop 94} if put} if numeric exch known { numericruns i numericruns i 2 add get 2 add put @@ -20852,17 +28041,17 @@ begin nextiso646only i nextiso646only i 1 add get 1 add put } ifelse } for - + % Encode the general purpose field - /gpfenc 8296 array def + /gpfenc 8304 array def % 8304 = (865 / 5) * 6 * 8, where 865 = 900 - 3 - 32 /i 0 def /j 0 def { % loop i gpf length eq {exit} if { % not a loop but common exit point - + mode (numeric) eq { i gpf length 2 sub le { - 2 string + 2 string dup 0 gpf i get dup fnc1 eq {pop 94} if put dup 1 gpf i 1 add get dup fnc1 eq {pop 94} if put dup numeric exch known { @@ -20871,7 +28060,7 @@ begin exit } if pop - lalphanumeric numeric encode + lalphanumeric numeric encode /mode (alphanumeric) def exit } { @@ -20888,13 +28077,13 @@ begin /i i 1 add def exit } { % C1.FNC1 - 2 string dup 0 gpf i get put dup 1 94 put numeric encode + 2 string dup 0 gpf i get put dup 1 94 put numeric encode /i i 1 add def exit } ifelse } ifelse } if - + mode (alphanumeric) eq { gpf i get fnc1 eq { fnc1 alphanumeric encode @@ -20921,7 +28110,7 @@ begin /i i 1 add def exit } if - + mode (iso646) eq { gpf i get fnc1 eq { fnc1 iso646 encode @@ -20943,7 +28132,7 @@ begin /i i 1 add def exit } if - + } loop } loop /gpf gpfenc 0 j getinterval def @@ -20953,38 +28142,41 @@ begin pad length 0 gt { 0 5 pad length 1 sub { % Fill with 00100 /i exch def - pad i [ 0 0 1 0 0 ] 0 pad length i sub 5 2 copy gt {exch} if pop getinterval putinterval - } for + pad i [ 0 0 1 0 0 ] 0 pad length i sub 5 2 copy gt {exch} if pop getinterval putinterval + } for mode (numeric) eq { % Prefix shift from numeric to ASCII /pad [ 0 0 0 0 pad aload pop ] 0 pad length getinterval def } if - mode (alpha) eq { % Prefix FNC1 - /pad [ 1 1 1 1 1 pad aload pop ] 0 pad length getinterval def + mode (alpha) eq { % Prefix FNC1 + shift from numeric to ASCII + /pad [ 1 1 1 1 1 0 0 0 0 pad aload pop ] 0 pad length getinterval def } if } if - % Concatinate fields + % Concatenate fields /bits [ cdf aload pop gpf aload pop pad aload pop ] def - ccversion (a) eq { - /pwr928 [ - [ 0 0 0 0 0 0 1 ] - 68 {7 array} repeat - ] def - 1 1 68 { - /j exch def - /v 0 def - 6 -1 1 { - /i exch def - /v pwr928 j 1 sub get i get 2 mul v 928 idiv add def - pwr928 j get i v 928 mod put - } for - pwr928 j get 0 pwr928 j 1 sub get 0 get 2 mul v 928 idiv add put +{ + /pwr928 [ + [ 0 0 0 0 0 0 1 ] + 68 {7 array} repeat + ] def + 1 1 68 { + /j exch def + /v 0 def + 6 -1 1 { + /i exch def + /v pwr928 j 1 sub get i get 2 mul v 928 idiv add def + pwr928 j get i v 928 mod put } for + pwr928 j get 0 pwr928 j 1 sub get 0 get 2 mul v 928 idiv add put + } for +} ctxdef + + ccversion (a) eq { /cws [ 28 {0} repeat ] def /b 0 def /c 0 def { % loop @@ -21007,7 +28199,7 @@ begin /i exch def cs i 1 sub 2 copy get cs i get 928 idiv add put cs i 2 copy get 928 mod put - } for + } for /b b bsl add def /c c csl add def } loop @@ -21019,6 +28211,7 @@ begin dup length 4 exch sub exch putinterval barcode i 4 mul 3 -1 roll putinterval } for + options (parse) undef options (dontdraw) true put options (cca) true put options (columns) cccolumns put @@ -21032,6 +28225,7 @@ begin bits i 8 mul 8 getinterval 0 exch {add 2 mul} forall 2 idiv barcode exch i exch put } for + options (parse) undef options (dontdraw) true put options (ccb) true put options (columns) cccolumns put @@ -21045,18 +28239,24 @@ begin bits i 8 mul 8 getinterval 0 exch {add 2 mul} forall 2 idiv barcode exch i exch put } for + options (parse) undef options (dontdraw) true put options (ccc) true put options (columns) cccolumns put + options (eclevel) eccws ln 2 ln div cvi 1 sub put /args barcode options //pdf417 exec def } if args dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /gs1-cc dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -21065,18 +28265,19 @@ end % --END ENCODER gs1-cc-- % --BEGIN ENCODER ean13composite-- -% --REQUIRES preamble raiseerror renlinear renmatrix ean5 ean2 ean13 micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix ean5 ean2 ean13 micropdf417 pdf417 gs1-cc-- % --DESC: EAN-13 Composite % --EXAM: 2112345678900|(99)1234-abcd % --EXOP: includetext % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp ean13composite 0.0 2017040400 82022 81974 -%%BeginData: 72 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp ean13composite 0.0 2022082100 105183 107941 +%%BeginData: 159 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /ean13 dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -21087,8 +28288,13 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /usematrix false def + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -21100,6 +28306,8 @@ begin } if options {def} forall + dontdraw { /usematrix true def } if + % Split the linear and composite parts barcode (|) search { /linear exch def @@ -21109,38 +28317,117 @@ begin pop } ifelse - gsave - options (lintype) (ean13) put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint with a fake AI (01) + comp length 18 add string + dup 0 ((01)00000000000000) putinterval + dup 18 comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part - linear options //ean13 exec //renlinear exec + linear options //ean13 exec + usematrix not { + gsave + + //renlinear exec + + % Plot the separator + -1 72 rmoveto << + /ren //renmatrix + /pixs [ + 0 1 93 {0} repeat 1 0 + 1 0 93 {0} repeat 0 1 + 0 1 93 {0} repeat 1 0 + ] + /pixx 97 + /pixy 3 + /height 6 72 div + /width 97 72 div + /opt options + >> //renmatrix exec + + % Plot the 2D part + -2 6 rmoveto comp options //gs1-cc exec //renmatrix exec + + grestore + } { + /linsym exch def + /sbs linsym /sbs get def + /bhs linsym /bhs get def + /bbs linsym /bbs get def + /linwidth 0 sbs {cvi add} forall def + + /compsym comp options //gs1-cc exec def + /ccpixs compsym /pixs get def + /ccpixx compsym /pixx get def + + /linpad [ ccpixx 97 sub {0} repeat ] def + + /diff linwidth linpad length add 2 add ccpixx sub def % An add-on can make linear wider than composite + diff 0 gt { % Left align composite + /ccrpad [ diff {0} repeat ] def + /pixx ccpixx diff add def + } { + /ccrpad 0 array def + /pixx ccpixx def + } ifelse - % Plot the separator - -1 72 rmoveto << - /ren //renmatrix /pixs [ - 0 1 93 {0} repeat 1 0 - 1 0 93 {0} repeat 0 1 - 0 1 93 {0} repeat 1 0 - ] - /pixx 97 - /pixy 3 - /height 6 72 div - /width 97 72 div - /opt options - >> //renmatrix exec + 0 ccpixx ccpixs length 1 sub { + /i exch def + 2 { ccpixs i ccpixx getinterval aload pop ccrpad aload pop } repeat + } for + 2 { linpad aload pop 0 1 93 {0} repeat 1 0 ccrpad aload pop } repeat + 2 { linpad aload pop 1 0 93 {0} repeat 0 1 ccrpad aload pop } repeat + 2 { linpad aload pop 0 1 93 {0} repeat 1 0 ccrpad aload pop } repeat + 71 -1 0 { + /y exch def + linpad aload pop + 0 + 0 1 sbs length 1 sub { + /i exch def + i 2 mod 0 eq { + % Don't print when bbs > y || (bbs + bhs) < y (i.e. add-on or includetext offsets) + bbs i 2 idiv get 72 mul dup y gt exch bhs i 2 idiv get 72 mul add y lt or { + sbs i get cvi {0} repeat + } { + sbs i get cvi {1} repeat + } ifelse + } { + sbs i get cvi {0} repeat + } ifelse + } for + 0 + } for + ] def - % Plot the 2D part - -2 6 rmoveto comp options //gs1-cc exec //renmatrix exec + /pixy pixs length pixx idiv def + << + /ren //renmatrix + /pixs pixs + /pixx pixx + /pixy pixy + /height pixy 72 div + /width pixx 72 div + /opt options + >> - grestore + dontdraw not { + gsave + //renmatrix exec + grestore + } if + } ifelse end -} bind def +} +[/barcode] {null def} forall +bind def /ean13composite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -21149,18 +28436,19 @@ end % --END ENCODER ean13composite-- % --BEGIN ENCODER ean8composite-- -% --REQUIRES preamble raiseerror renlinear renmatrix ean5 ean2 ean8 micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix ean5 ean2 ean8 micropdf417 pdf417 gs1-cc-- % --DESC: EAN-8 Composite % --EXAM: 02345673|(21)A12345678 % --EXOP: includetext % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp ean8composite 0.0 2017040400 82363 82316 -%%BeginData: 75 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp ean8composite 0.0 2022082100 109084 108283 +%%BeginData: 162 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /ean8 dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -21171,8 +28459,13 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /usematrix false def + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -21184,6 +28477,8 @@ begin } if options {def} forall + dontdraw { /usematrix true def } if + % Split the linear and composite parts barcode (|) search { /linear exch def @@ -21193,41 +28488,120 @@ begin pop } ifelse - gsave - % Get the result of encoding with ean8 and gs1-cc options (lintype) (ean8) put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint with a fake AI (01) + comp length 18 add string + dup 0 ((01)00000000000000) putinterval + dup 18 comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part - linear options //ean8 exec //renlinear exec + linear options //ean8 exec + usematrix not { + gsave + + //renlinear exec + + % Plot the separator + -1 72 rmoveto << + /ren //renmatrix + /pixs [ + 0 1 65 {0} repeat 1 0 + 1 0 65 {0} repeat 0 1 + 0 1 65 {0} repeat 1 0 + ] + /pixx 69 + /pixy 3 + /height 6 72 div + /width 69 72 div + /opt options + >> //renmatrix exec + + % Plot the 2D part + comp options //gs1-cc exec + dup (pixx) get 69 exch sub 6 rmoveto + //renmatrix exec + + grestore + } { + /linsym exch def + /sbs linsym /sbs get def + /bhs linsym /bhs get def + /bbs linsym /bbs get def + /linwidth 0 sbs {cvi add} forall def + + /compsym comp options //gs1-cc exec def + /ccpixs compsym /pixs get def + /ccpixx compsym /pixx get def + + /linpad [ ccpixx 69 sub {0} repeat ] def + + /diff linwidth linpad length add 2 add ccpixx sub def % An add-on can make linear wider than composite + diff 0 gt { % Left align composite + /ccrpad [ diff {0} repeat ] def + /pixx ccpixx diff add def + } { + /ccrpad 0 array def + /pixx ccpixx def + } ifelse - % Plot the separator - -1 72 rmoveto << - /ren //renmatrix /pixs [ - 0 1 65 {0} repeat 1 0 - 1 0 65 {0} repeat 0 1 - 0 1 65 {0} repeat 1 0 - ] - /pixx 69 - /pixy 3 - /height 6 72 div - /width 69 72 div - /opt options - >> //renmatrix exec + 0 ccpixx ccpixs length 1 sub { + /i exch def + 2 { ccpixs i ccpixx getinterval aload pop ccrpad aload pop } repeat + } for + 2 { linpad aload pop 0 1 65 {0} repeat 1 0 ccrpad aload pop } repeat + 2 { linpad aload pop 1 0 65 {0} repeat 0 1 ccrpad aload pop } repeat + 2 { linpad aload pop 0 1 65 {0} repeat 1 0 ccrpad aload pop } repeat + 71 -1 0 { + /y exch def + linpad aload pop + 0 + 0 1 sbs length 1 sub { + /i exch def + i 2 mod 0 eq { + % Don't print when bbs > y || (bbs + bhs) < y (i.e. add-on or includetext offsets) + bbs i 2 idiv get 72 mul dup y gt exch bhs i 2 idiv get 72 mul add y lt or { + sbs i get cvi {0} repeat + } { + sbs i get cvi {1} repeat + } ifelse + } { + sbs i get cvi {0} repeat + } ifelse + } for + 0 + } for + ] def - % Plot the 2D part - comp options //gs1-cc exec - dup (pixx) get 69 exch sub 6 rmoveto - //renmatrix exec + /pixy pixs length pixx idiv def + << + /ren //renmatrix + /pixs pixs + /pixx pixx + /pixy pixy + /height pixy 72 div + /width pixx 72 div + /opt options + >> - grestore + dontdraw not { + gsave + //renmatrix exec + grestore + } if + } ifelse end -} bind def +} +[/barcode] {null def} forall +bind def /ean8composite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -21236,18 +28610,19 @@ end % --END ENCODER ean8composite-- % --BEGIN ENCODER upcacomposite-- -% --REQUIRES preamble raiseerror renlinear renmatrix ean5 ean2 upca micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix ean5 ean2 upca micropdf417 pdf417 gs1-cc-- % --DESC: UPC-A Composite % --EXAM: 416000336108|(99)1234-abcd % --EXOP: includetext % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp upcacomposite 0.0 2017040400 82104 82161 -%%BeginData: 72 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp upcacomposite 0.0 2022082100 105177 107936 +%%BeginData: 159 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -2 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /upca dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -21258,8 +28633,13 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /usematrix false def + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -21271,6 +28651,8 @@ begin } if options {def} forall + dontdraw { /usematrix true def } if + % Split the linear and composite parts barcode (|) search { /linear exch def @@ -21280,38 +28662,117 @@ begin pop } ifelse - gsave - options (lintype) (ean13) put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint with a fake AI (01) + comp length 18 add string + dup 0 ((01)00000000000000) putinterval + dup 18 comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part - linear options //upca exec //renlinear exec + linear options //upca exec + usematrix not { + gsave + + //renlinear exec + + % Plot the separator + -1 72 rmoveto << + /ren //renmatrix + /pixs [ + 0 1 93 {0} repeat 1 0 + 1 0 93 {0} repeat 0 1 + 0 1 93 {0} repeat 1 0 + ] + /pixx 97 + /pixy 3 + /height 6 72 div + /width 97 72 div + /opt options + >> //renmatrix exec + + % Plot the 2D part + -2 6 rmoveto comp options //gs1-cc exec //renmatrix exec + + grestore + } { + /linsym exch def + /sbs linsym /sbs get def + /bhs linsym /bhs get def + /bbs linsym /bbs get def + /linwidth 0 sbs {cvi add} forall def + + /compsym comp options //gs1-cc exec def + /ccpixs compsym /pixs get def + /ccpixx compsym /pixx get def + + /linpad [ ccpixx 97 sub {0} repeat ] def + + /diff linwidth linpad length add 2 add ccpixx sub def % An add-on can make linear wider than composite + diff 0 gt { % Left align composite + /ccrpad [ diff {0} repeat ] def + /pixx ccpixx diff add def + } { + /ccrpad 0 array def + /pixx ccpixx def + } ifelse - % Plot the separator - -1 72 rmoveto << - /ren //renmatrix /pixs [ - 0 1 93 {0} repeat 1 0 - 1 0 93 {0} repeat 0 1 - 0 1 93 {0} repeat 1 0 - ] - /pixx 97 - /pixy 3 - /height 6 72 div - /width 97 72 div - /opt options - >> //renmatrix exec + 0 ccpixx ccpixs length 1 sub { + /i exch def + 2 { ccpixs i ccpixx getinterval aload pop ccrpad aload pop } repeat + } for + 2 { linpad aload pop 0 1 93 {0} repeat 1 0 ccrpad aload pop } repeat + 2 { linpad aload pop 1 0 93 {0} repeat 0 1 ccrpad aload pop } repeat + 2 { linpad aload pop 0 1 93 {0} repeat 1 0 ccrpad aload pop } repeat + 71 -1 0 { + /y exch def + linpad aload pop + 0 + 0 1 sbs length 1 sub { + /i exch def + i 2 mod 0 eq { + % Don't print when bbs > y || (bbs + bhs) < y (i.e. add-on or includetext offsets) + bbs i 2 idiv get 72 mul dup y gt exch bhs i 2 idiv get 72 mul add y lt or { + sbs i get cvi {0} repeat + } { + sbs i get cvi {1} repeat + } ifelse + } { + sbs i get cvi {0} repeat + } ifelse + } for + 0 + } for + ] def - % Plot the 2D part - -2 6 rmoveto comp options //gs1-cc exec //renmatrix exec + /pixy pixs length pixx idiv def + << + /ren //renmatrix + /pixs pixs + /pixx pixx + /pixy pixy + /height pixy 72 div + /width pixx 72 div + /opt options + >> - grestore + dontdraw not { + gsave + //renmatrix exec + grestore + } if + } ifelse end -} bind def +} +[/barcode] {null def} forall +bind def /upcacomposite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -21320,18 +28781,19 @@ end % --END ENCODER upcacomposite-- % --BEGIN ENCODER upcecomposite-- -% --REQUIRES preamble raiseerror renlinear renmatrix ean5 ean2 upce micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix ean5 ean2 upce micropdf417 pdf417 gs1-cc-- % --DESC: UPC-E Composite % --EXAM: 00123457|(15)021231 % --EXOP: includetext % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp upcecomposite 0.0 2017040400 83282 83120 -%%BeginData: 87 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp upcecomposite 0.0 2022082100 108608 104503 +%%BeginData: 159 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -2 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /upce dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -21342,8 +28804,13 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /usematrix false def + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -21355,6 +28822,8 @@ begin } if options {def} forall + dontdraw { /usematrix true def } if + % Split the linear and composite parts barcode (|) search { /linear exch def @@ -21364,53 +28833,117 @@ begin pop } ifelse - % Define the separator - /sep << - /ren //renmatrix - /pixs [ - 0 1 49 {0} repeat 1 0 - 1 0 49 {0} repeat 0 1 - 0 1 49 {0} repeat 1 0 - ] - /pixx 53 - /pixy 3 - /height 6 72 div - /width 53 72 div - /opt options - >> def - - gsave - options (lintype) (upce) put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint with a fake AI (01) + comp length 18 add string + dup 0 ((01)00000000000000) putinterval + dup 18 comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part - linear options //upce exec //renlinear exec + linear options //upce exec + usematrix not { + gsave + + //renlinear exec + + % Plot the separator + -1 72 rmoveto << + /ren //renmatrix + /pixs [ + 0 1 49 {0} repeat 1 0 + 1 0 49 {0} repeat 0 1 + 0 1 49 {0} repeat 1 0 + ] + /pixx 53 + /pixy 3 + /height 6 72 div + /width 53 72 div + /opt options + >> //renmatrix exec + + % Plot the 2D part + -2 6 rmoveto comp options //gs1-cc exec //renmatrix exec + + grestore + } { + /linsym exch def + /sbs linsym /sbs get def + /bhs linsym /bhs get def + /bbs linsym /bbs get def + /linwidth 0 sbs {cvi add} forall def + + /compsym comp options //gs1-cc exec def + /ccpixs compsym /pixs get def + /ccpixx compsym /pixx get def + + /linpad [ ccpixx 53 sub {0} repeat ] def + + /diff linwidth linpad length add 2 add ccpixx sub def % An add-on can make linear wider than composite + diff 0 gt { % Left align composite + /ccrpad [ diff {0} repeat ] def + /pixx ccpixx diff add def + } { + /ccrpad 0 array def + /pixx ccpixx def + } ifelse - % Plot the separator - -1 72 rmoveto << - /ren //renmatrix /pixs [ - 0 1 49 {0} repeat 1 0 - 1 0 49 {0} repeat 0 1 - 0 1 49 {0} repeat 1 0 - ] - /pixx 53 - /pixy 3 - /height 6 72 div - /width 53 72 div - /opt options - >> //renmatrix exec + 0 ccpixx ccpixs length 1 sub { + /i exch def + 2 { ccpixs i ccpixx getinterval aload pop ccrpad aload pop } repeat + } for + 2 { linpad aload pop 0 1 49 {0} repeat 1 0 ccrpad aload pop } repeat + 2 { linpad aload pop 1 0 49 {0} repeat 0 1 ccrpad aload pop } repeat + 2 { linpad aload pop 0 1 49 {0} repeat 1 0 ccrpad aload pop } repeat + 71 -1 0 { + /y exch def + linpad aload pop + 0 + 0 1 sbs length 1 sub { + /i exch def + i 2 mod 0 eq { + % Don't print when bbs > y || (bbs + bhs) < y (i.e. add-on or includetext offsets) + bbs i 2 idiv get 72 mul dup y gt exch bhs i 2 idiv get 72 mul add y lt or { + sbs i get cvi {0} repeat + } { + sbs i get cvi {1} repeat + } ifelse + } { + sbs i get cvi {0} repeat + } ifelse + } for + 0 + } for + ] def - % Plot the 2D part - -2 6 rmoveto comp options //gs1-cc exec //renmatrix exec + /pixy pixs length pixx idiv def + << + /ren //renmatrix + /pixs pixs + /pixx pixx + /pixy pixy + /height pixy 72 div + /width pixx 72 div + /opt options + >> - grestore + dontdraw not { + gsave + //renmatrix exec + grestore + } if + } ifelse end -} bind def +} +[/barcode] {null def} forall +bind def /upcecomposite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -21419,18 +28952,19 @@ end % --END ENCODER upcecomposite-- % --BEGIN ENCODER databaromnicomposite-- -% --REQUIRES preamble raiseerror renlinear renmatrix databaromni micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix databaromni micropdf417 pdf417 gs1-cc-- % --DESC: GS1 DataBar Omnidirectional Composite % --EXAM: (01)03612345678904|(11)990102 % --EXOP: % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp databaromnicomposite 0.0 2017040400 82965 86277 -%%BeginData: 100 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databaromnicomposite 0.0 2022082100 94570 94434 +%%BeginData: 114 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -2 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /databaromni dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -21441,8 +28975,12 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -21469,6 +29007,13 @@ begin options (linkage) true put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint the combined AI element strings + linear length comp length add string + dup 0 linear putinterval + dup linear length comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part linear options //databaromni exec @@ -21497,7 +29042,7 @@ begin % Right shifted module for value 3 finder sep fp [ 0 0 0 0 0 0 0 0 0 0 1 0 0 ] putinterval } if - } bind def + } def mark 0 linsbs {1 index 1 eq {{0}} {{1}} ifelse repeat} forall counttomark 1 sub array astore /bot exch def pop pop @@ -21522,7 +29067,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /databaromnicomposite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -21531,18 +29078,19 @@ end % --END ENCODER databaromnicomposite-- % --BEGIN ENCODER databarstackedcomposite-- -% --REQUIRES preamble raiseerror renlinear renmatrix databaromni databarstacked micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix databaromni databarstacked micropdf417 pdf417 gs1-cc-- % --DESC: GS1 DataBar Stacked Composite % --EXAM: (01)03412345678900|(17)010200 % --EXOP: % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp databarstackedcomposite 0.0 2017040400 88569 84684 -%%BeginData: 96 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databarstackedcomposite 0.0 2022082100 96302 96201 +%%BeginData: 110 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -2 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /databarstacked dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /databarstackedcomposite { @@ -21552,8 +29100,12 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -21580,6 +29132,13 @@ begin options (linkage) true put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint the combined AI element strings + linear length comp length add string + dup 0 linear putinterval + dup linear length comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part linear options //databarstacked exec @@ -21608,7 +29167,7 @@ begin % Right shifted module for value 3 finder sep fp [ 0 0 0 0 0 0 0 0 0 0 1 0 0 ] putinterval } if - } bind def + } def /sep [ bot {1 exch sub} forall ] def sep 0 [ 0 0 0 0 ] putinterval sep sep length 4 sub [ 0 0 0 0 ] putinterval @@ -21630,7 +29189,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /databarstackedcomposite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -21639,18 +29200,19 @@ end % --END ENCODER databarstackedcomposite-- % --BEGIN ENCODER databarstackedomnicomposite-- -% --REQUIRES preamble raiseerror renlinear renmatrix databaromni databarstackedomni micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix databaromni databarstackedomni micropdf417 pdf417 gs1-cc-- % --DESC: GS1 DataBar Stacked Omnidirectional Composite % --EXAM: (01)03612345678904|(11)990102 % --EXOP: % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp databarstackedomnicomposite 0.0 2017040400 88645 84756 -%%BeginData: 96 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databarstackedomnicomposite 0.0 2022082100 96354 96225 +%%BeginData: 110 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -2 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /databarstackedomni dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /databarstackedomnicomposite { @@ -21660,8 +29222,12 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -21688,6 +29254,13 @@ begin options (linkage) true put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint the combined AI element strings + linear length comp length add string + dup 0 linear putinterval + dup linear length comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part linear options //databarstackedomni exec @@ -21716,9 +29289,9 @@ begin % Right shifted module for value 3 finder sep fp [ 0 0 0 0 0 0 0 0 0 0 1 0 0 ] putinterval } if - } bind def + } def /sep [ bot {1 exch sub} forall ] def - sep 0 [ 0 0 0 ] putinterval + sep 0 [ 0 0 0 0 ] putinterval sep sep length 4 sub [ 0 0 0 0 ] putinterval 18 sepfinder 0 linheight rmoveto << @@ -21738,7 +29311,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /databarstackedomnicomposite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -21747,18 +29322,19 @@ end % --END ENCODER databarstackedomnicomposite-- % --BEGIN ENCODER databartruncatedcomposite-- -% --REQUIRES preamble raiseerror renlinear renmatrix databaromni databartruncated micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix databaromni databartruncated micropdf417 pdf417 gs1-cc-- % --DESC: GS1 DataBar Truncated Composite % --EXAM: (01)03612345678904|(11)990102 % --EXOP: % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp databartruncatedcomposite 0.0 2017040400 89639 85738 -%%BeginData: 100 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databartruncatedcomposite 0.0 2022082100 97436 97319 +%%BeginData: 114 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -2 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /databartruncated dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -21769,8 +29345,12 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -21797,6 +29377,13 @@ begin options (linkage) true put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint the combined AI element strings + linear length comp length add string + dup 0 linear putinterval + dup linear length comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part linear options //databartruncated exec @@ -21825,7 +29412,7 @@ begin % Right shifted module for value 3 finder sep fp [ 0 0 0 0 0 0 0 0 0 0 1 0 0 ] putinterval } if - } bind def + } def mark 0 linsbs {1 index 1 eq {{0}} {{1}} ifelse repeat} forall counttomark 1 sub array astore /bot exch def pop pop @@ -21850,7 +29437,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /databartruncatedcomposite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -21859,18 +29448,19 @@ end % --END ENCODER databartruncatedcomposite-- % --BEGIN ENCODER databarlimitedcomposite-- -% --REQUIRES preamble raiseerror renlinear renmatrix databarlimited micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix databarlimited micropdf417 pdf417 gs1-cc-- % --DESC: GS1 DataBar Limited Composite -% --EXAM: (01)03512345678907|(21)abcdefghijklmnopqrstuv +% --EXAM: (01)03512345678907|(21)abcdefghijklmnopqrst % --EXOP: % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp databarlimitedcomposite 0.0 2017040400 79414 79211 -%%BeginData: 79 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databarlimitedcomposite 0.0 2022082100 87443 90776 +%%BeginData: 93 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -2 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /databarlimited dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -21881,8 +29471,12 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -21909,6 +29503,13 @@ begin options (linkage) true put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint the combined AI element strings + linear length comp length add string + dup 0 linear putinterval + dup linear length comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part linear options //databarlimited exec @@ -21921,7 +29522,7 @@ begin 1 linsbs {1 index 0 eq {{1}} {{0}} ifelse repeat} forall counttomark 1 sub array astore /sep exch def pop pop sep 0 [0 0 0] putinterval - sep sep length 4 sub [0 0 0 0] putinterval + sep sep length 9 sub [0 0 0 0 0 0 0 0 0] putinterval % 4 + 5 right guard spaces 0 linheight rmoveto << /ren //renmatrix /pixs sep @@ -21933,15 +29534,17 @@ begin >> //renmatrix exec % Plot the 2D part - comp options //gs1-cc exec - dup (pixx) get 72 exch sub 1 rmoveto + comp options //gs1-cc exec + dup (pixx) get 72 exch sub 1 rmoveto //renmatrix exec grestore end -} bind def +} +[/barcode] {null def} forall +bind def /databarlimitedcomposite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -21950,18 +29553,19 @@ end % --END ENCODER databarlimitedcomposite-- % --BEGIN ENCODER databarexpandedcomposite-- -% --REQUIRES preamble raiseerror renlinear renmatrix databarexpanded micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix databarexpanded micropdf417 pdf417 gs1-cc-- % --DESC: GS1 DataBar Expanded Composite % --EXAM: (01)93712345678904(3103)001234|(91)1A2B3C4D5E % --EXOP: % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp databarexpandedcomposite 0.0 2017040400 85836 82285 -%%BeginData: 98 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databarexpandedcomposite 0.0 2022082100 93873 93874 +%%BeginData: 112 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -2 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /databarexpanded dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -21972,8 +29576,12 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -22000,6 +29608,13 @@ begin options (linkage) true put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint the combined AI element strings + linear length comp length add string + dup 0 linear putinterval + dup linear length comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part linear options //databarexpanded exec @@ -22023,7 +29638,7 @@ begin } ifelse sep exch i exch put } for - } bind def + } def mark 0 linsbs {1 index 1 eq {{0}} {{1}} ifelse repeat} forall counttomark 1 sub array astore /bot exch def pop pop @@ -22033,7 +29648,7 @@ begin [ % Finder pattern module positions 18 98 bot length 13 sub {} for 69 98 bot length 13 sub {} for - ] {sepfinder} forall + ] {sepfinder} forall 0 linheight rmoveto << /ren //renmatrix /pixs sep @@ -22051,7 +29666,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /databarexpandedcomposite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -22060,18 +29677,19 @@ end % --END ENCODER databarexpandedcomposite-- % --BEGIN ENCODER databarexpandedstackedcomposite-- -% --REQUIRES preamble raiseerror renlinear renmatrix databarexpanded databarexpandedstacked micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix databarexpanded databarexpandedstacked micropdf417 pdf417 gs1-cc-- % --DESC: GS1 DataBar Expanded Stacked Composite % --EXAM: (01)00012345678905(10)ABCDEF|(21)12345678 -% --EXOP: segments=4 +% --EXOP: segments=4 % --RNDR: renmatrix renlinear -%%BeginResource: uk.co.terryburton.bwipp databarexpandedstackedcomposite 0.0 2017040400 88452 84444 -%%BeginData: 95 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp databarexpandedstackedcomposite 0.0 2022082100 96049 95929 +%%BeginData: 109 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -2 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /databarexpandedstacked dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin /databarexpandedstackedcomposite { @@ -22081,8 +29699,12 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -22109,6 +29731,13 @@ begin options (linkage) true put options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint the combined AI element strings + linear length comp length add string + dup 0 linear putinterval + dup linear length comp putinterval + /ai //gs1process exec pop pop pop % Plot the linear part linear options //databarexpandedstacked exec @@ -22132,14 +29761,14 @@ begin } ifelse sep exch i exch put } for - } bind def + } def /sep [ bot {1 exch sub} forall ] def - sep 0 [ 0 0 0 ] putinterval + sep 0 [ 0 0 0 0 ] putinterval sep sep length 4 sub [ 0 0 0 0 ] putinterval [ % Finder pattern module positions 19 98 bot length 13 sub {} for 70 98 bot length 13 sub {} for - ] {sepfinder} forall + ] {sepfinder} forall 0 linheight rmoveto << /ren //renmatrix /pixs sep @@ -22158,7 +29787,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /databarexpandedstackedcomposite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -22167,18 +29798,19 @@ end % --END ENCODER databarexpandedstackedcomposite-- % --BEGIN ENCODER gs1-128composite-- -% --REQUIRES preamble raiseerror renlinear renmatrix code128 gs1-128 micropdf417 pdf417 gs1-cc-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renlinear renmatrix code128 gs1-128 micropdf417 pdf417 gs1-cc-- % --DESC: GS1-128 Composite % --EXAM: (00)030123456789012340|(02)13012345678909(37)24(10)1234567ABCDEFG % --EXOP: ccversion=c % --RNDR: renlinear renmatrix -%%BeginResource: uk.co.terryburton.bwipp gs1-128composite 0.0 2017040400 85883 88824 -%%BeginData: 100 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp gs1-128composite 0.0 2022082100 97016 93461 +%%BeginData: 114 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -2 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /gs1-128 dup /uk.co.terryburton.bwipp findresource put dup /gs1-cc dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -22189,8 +29821,12 @@ begin /options exch def /barcode exch def + /ctx null def /dontdraw false def - + /parse false def + /dontlint false def + /lintreqs true def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -22215,6 +29851,13 @@ begin options (inkspread) (0) put options (dontdraw) true put + options (dontlint) true put + + % Lint the combined AI element strings + linear length comp length add string + dup 0 linear putinterval + dup linear length comp putinterval + /ai //gs1process exec pop pop pop % Dummy plot of linear part with CC-A to get width options (linkagea) true put @@ -22225,7 +29868,7 @@ begin options (lintype) (gs1-128) put options (linwidth) linwidth put comp options //gs1-cc exec /compsym exch def - compsym (pixx) get 99 eq {(a)} {(c)} ifelse /linktype exch def + compsym (pixx) get 99 eq {(a)} {(c)} ifelse /linktype exch def % Plot linear part linktype (a) eq { @@ -22261,7 +29904,7 @@ begin /x s p sub 1 sub 11 mul 10 add p 0 eq {2 add} if 99 sub def x 1 rmoveto } { - -7 1 rmoveto + -7 1 rmoveto } ifelse compsym //renmatrix exec @@ -22270,7 +29913,9 @@ begin end -} bind def +} +[/barcode] {null def} forall +bind def /gs1-128composite dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -22279,16 +29924,17 @@ end % --END ENCODER gs1-128composite-- % --BEGIN ENCODER gs1datamatrix-- -% --REQUIRES preamble raiseerror renmatrix datamatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renmatrix datamatrix-- % --DESC: GS1 Data Matrix % --EXAM: (01)03453120000011(17)120508(10)ABCD1234(410)9501101020917 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp gs1datamatrix 0.0 2017040400 79986 76213 -%%BeginData: 135 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp gs1datamatrix 0.0 2022082100 77432 73954 +%%BeginData: 91 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /datamatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -22299,8 +29945,13 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def - + /parse false def + /dontlint false def + /lintreqs true def + /gssep false def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -22312,65 +29963,12 @@ begin } if options {def} forall - % Expand ordinals of the form ^NNN to ASCII - /expand { - /in exch def - /out in length string def - /j 0 def - in - { % loop - (^) search { - dup out exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi out exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup out exch j exch putinterval - length j add /j exch def - out 0 j getinterval exit - } ifelse - } loop - } bind def - - % Parse out AIs - /ais [] def - /vals [] def - barcode dup length 1 sub 1 exch getinterval - { % loop - dup () eq {exit} if - (\)) search pop - exch pop - exch (\() search { - exch pop exch 3 1 roll - } { - () 3 1 roll - } ifelse - [ ais aload pop counttomark 2 add index ] /ais exch def - [ vals aload pop counttomark 1 add index expand ] /vals exch def - pop pop - } loop - pop - - % Pre-defined fixed length data field AIs - % any AI whose prefix is not included in this table must be - % terminated with "FNC1", even if it's fixed length - /aifixed 23 dict def - [ - 0 1 4 {} for - ] { - (00) 2 string copy dup dup 1 5 -1 roll 48 add put aifixed 3 1 roll put - } forall - [ - 11 1 20 {} for - 23 - 31 1 36 {} for - 41 - ] { - 10 2 string cvrs dup aifixed 3 1 roll put - } forall + barcode /ai //gs1process exec + /fncs exch def + /vals exch def + /ais exch def - % Create the datamatrix data + % Create the datamatrix data /fnc1 -1 def /dmtx [ fnc1 ] def 0 1 ais length 1 sub { @@ -22382,10 +29980,10 @@ begin dup dmtx length ai [ exch {} forall ] putinterval dup dmtx length ai length add val [ exch {} forall ] putinterval /dmtx exch def - i ais length 1 sub ne aifixed ai 0 2 getinterval known not and { % Append FNC1 + i ais length 1 sub ne fncs i get and { % Append FNC1 dmtx length 1 add array dup 0 dmtx putinterval - dup dmtx length fnc1 put + dup dmtx length gssep {29} {fnc1} ifelse put /dmtx exch def } if } for @@ -22406,18 +30004,21 @@ begin /barcode barcode 0 j getinterval def % Get the result of encoding with datamatrix + options (parse) undef options (dontdraw) true put options (parsefnc) true put /args barcode options //datamatrix exec def args (opt) options put args - + dontdraw not //renmatrix if - + end -} bind def +} +[/barcode] {null def} forall +bind def /gs1datamatrix dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -22426,16 +30027,17 @@ end % --END ENCODER gs1datamatrix-- % --BEGIN ENCODER gs1datamatrixrectangular-- -% --REQUIRES preamble raiseerror renmatrix datamatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renmatrix datamatrix-- % --DESC: GS1 Data Matrix Rectangular % --EXAM: (01)03453120000011(17)120508(10)ABCD1234(410)9501101020917 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp gs1datamatrixrectangular 0.0 2017040400 80189 79933 -%%BeginData: 136 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp gs1datamatrixrectangular 0.0 2022082100 77747 74258 +%%BeginData: 92 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /datamatrix dup /uk.co.terryburton.bwipp findresource put begin @@ -22446,8 +30048,13 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def + /parse false def + /dontlint false def + /lintreqs true def /dontdraw false def - + /gssep false def + % Parse the input options options type /stringtype eq { 1 dict begin @@ -22459,65 +30066,12 @@ begin } if options {def} forall - % Expand ordinals of the form ^NNN to ASCII - /expand { - /in exch def - /out in length string def - /j 0 def - in - { % loop - (^) search { - dup out exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi out exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup out exch j exch putinterval - length j add /j exch def - out 0 j getinterval exit - } ifelse - } loop - } bind def + barcode /ai //gs1process exec + /fncs exch def + /vals exch def + /ais exch def - % Parse out AIs - /ais [] def - /vals [] def - barcode dup length 1 sub 1 exch getinterval - { % loop - dup () eq {exit} if - (\)) search pop - exch pop - exch (\() search { - exch pop exch 3 1 roll - } { - () 3 1 roll - } ifelse - [ ais aload pop counttomark 2 add index ] /ais exch def - [ vals aload pop counttomark 1 add index expand ] /vals exch def - pop pop - } loop - pop - - % Pre-defined fixed length data field AIs - % any AI whose prefix is not included in this table must be - % terminated with "FNC1", even if it's fixed length - /aifixed 23 dict def - [ - 0 1 4 {} for - ] { - (00) 2 string copy dup dup 1 5 -1 roll 48 add put aifixed 3 1 roll put - } forall - [ - 11 1 20 {} for - 23 - 31 1 36 {} for - 41 - ] { - 10 2 string cvrs dup aifixed 3 1 roll put - } forall - - % Create the datamatrix data + % Create the datamatrix data /fnc1 -1 def /dmtx [ fnc1 ] def 0 1 ais length 1 sub { @@ -22529,10 +30083,10 @@ begin dup dmtx length ai [ exch {} forall ] putinterval dup dmtx length ai length add val [ exch {} forall ] putinterval /dmtx exch def - i ais length 1 sub ne aifixed ai 0 2 getinterval known not and { % Append FNC1 + i ais length 1 sub ne fncs i get and { % Append FNC1 dmtx length 1 add array dup 0 dmtx putinterval - dup dmtx length fnc1 put + dup dmtx length gssep {29} {fnc1} ifelse put /dmtx exch def } if } for @@ -22553,6 +30107,7 @@ begin /barcode barcode 0 j getinterval def % Get the result of encoding with datamatrix + options (parse) undef options (dontdraw) true put options (parsefnc) true put options (format) (rectangle) put @@ -22560,12 +30115,14 @@ begin args (opt) options put args - + dontdraw not //renmatrix if - + end -} bind def +} +[/barcode] {null def} forall +bind def /gs1datamatrixrectangular dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -22573,16 +30130,88 @@ end %%EndResource % --END ENCODER gs1datamatrixrectangular-- +% --BEGIN ENCODER gs1dldatamatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renmatrix datamatrix-- +% --DESC: GS1 Digital Link Data Matrix +% --EXAM: https://id.gs1.org/01/12312312312333/22/ABC%2d123?99=XYZ%2f987#test +% --EXOP: +% --RNDR: renmatrix +%%BeginResource: uk.co.terryburton.bwipp gs1dldatamatrix 0.0 2022082100 70572 63571 +%%BeginData: 59 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /parseinput dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +dup /datamatrix dup /uk.co.terryburton.bwipp findresource put +begin +/gs1dldatamatrix { + + 20 dict begin % Confine variables to local scope + + /options exch def % We are given an option string + /barcode exch def % We are given a barcode string + + /ctx null def + /parse false def + /dontlint false def + /lintreqs true def + /dontdraw false def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + % Parse the input + /fncvals << + /parse parse + /parseonly true + /parsefnc false + >> def + /barcode barcode fncvals //parseinput exec def + + barcode /dl //gs1process exec pop pop pop + + % Get the result of encoding with datamatrix + options (parse) undef + options (dontdraw) true put + /args barcode options //datamatrix exec def + + args (opt) options put + args + + dontdraw not //renmatrix if + + end + +} +[/barcode] {null def} forall +bind def +/gs1dldatamatrix dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER gs1dldatamatrix-- + % --BEGIN ENCODER gs1qrcode-- -% --REQUIRES preamble raiseerror renmatrix qrcode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renmatrix qrcode-- % --DESC: GS1 QR Code % --EXAM: (01)03453120000011(8200)http://www.abc.net(10)ABCD1234(410)9501101020917 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp gs1qrcode 0.0 2017040400 76420 79603 -%%BeginData: 134 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp gs1qrcode 0.0 2022082100 77214 73742 +%%BeginData: 89 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /gs1process dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /qrcode dup /uk.co.terryburton.bwipp findresource put begin @@ -22593,8 +30222,12 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def + /parse false def + /dontlint false def + /lintreqs true def /dontdraw false def - + % Parse the input options options type /stringtype eq { 1 dict begin @@ -22606,63 +30239,10 @@ begin } if options {def} forall - % Expand ordinals of the form ^NNN to ASCII - /expand { - /in exch def - /out in length string def - /j 0 def - in - { % loop - (^) search { - dup out exch j exch putinterval - length j add 1 add /j exch def - pop - dup 0 3 getinterval cvi out exch j 1 sub exch put - dup length 3 sub 3 exch getinterval - } { - dup out exch j exch putinterval - length j add /j exch def - out 0 j getinterval exit - } ifelse - } loop - } bind def - - % Parse out AIs - /ais [] def - /vals [] def - barcode dup length 1 sub 1 exch getinterval - { % loop - dup () eq {exit} if - (\)) search pop - exch pop - exch (\() search { - exch pop exch 3 1 roll - } { - () 3 1 roll - } ifelse - [ ais aload pop counttomark 2 add index ] /ais exch def - [ vals aload pop counttomark 1 add index expand ] /vals exch def - pop pop - } loop - pop - - % Pre-defined fixed length data field AIs - % any AI whose prefix is not included in this table must be - % terminated with "FNC1", even if it's fixed length - /aifixed 23 dict def - [ - 0 1 4 {} for - ] { - (00) 2 string copy dup dup 1 5 -1 roll 48 add put aifixed 3 1 roll put - } forall - [ - 11 1 20 {} for - 23 - 31 1 36 {} for - 41 - ] { - 10 2 string cvrs dup aifixed 3 1 roll put - } forall + barcode /ai //gs1process exec + /fncs exch def + /vals exch def + /ais exch def % Create the qrcode data /fnc1 -1 def @@ -22676,7 +30256,7 @@ begin dup qrc length ai [ exch {} forall ] putinterval dup qrc length ai length add val [ exch {} forall ] putinterval /qrc exch def - i ais length 1 sub ne aifixed ai 0 2 getinterval known not and { % Append FNC1 + i ais length 1 sub ne fncs i get and { % Append FNC1 qrc length 1 add array dup 0 qrc putinterval dup qrc length fnc1 put @@ -22700,18 +30280,21 @@ begin /barcode barcode 0 j getinterval def % Get the result of encoding with qrcode + options (parse) undef options (dontdraw) true put options (parsefnc) true put /args barcode options //qrcode exec def args (opt) options put args - + dontdraw not //renmatrix if - + end -} bind def +} +[/barcode] {null def} forall +bind def /gs1qrcode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -22719,16 +30302,191 @@ end %%EndResource % --END ENCODER gs1qrcode-- +% --BEGIN ENCODER gs1dlqrcode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renmatrix qrcode-- +% --DESC: GS1 Digital Link QR Code +% --EXAM: https://id.gs1.org/01/12312312312333/22/ABC%2d123?99=XYZ%2f987#test +% --EXOP: +% --RNDR: renmatrix +%%BeginResource: uk.co.terryburton.bwipp gs1dlqrcode 0.0 2022082100 67116 67111 +%%BeginData: 59 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /parseinput dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +dup /qrcode dup /uk.co.terryburton.bwipp findresource put +begin +/gs1dlqrcode { + + 20 dict begin % Confine variables to local scope + + /options exch def % We are given an option string + /barcode exch def % We are given a barcode string + + /ctx null def + /parse false def + /dontlint false def + /lintreqs true def + /dontdraw false def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + % Parse the input + /fncvals << + /parse parse + /parseonly true + /parsefnc false + >> def + /barcode barcode fncvals //parseinput exec def + + barcode /dl //gs1process exec pop pop pop + + % Get the result of encoding with qrcode + options (parse) undef + options (dontdraw) true put + /args barcode options //qrcode exec def + + args (opt) options put + args + + dontdraw not //renmatrix if + + end + +} +[/barcode] {null def} forall +bind def +/gs1dlqrcode dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER gs1dlqrcode-- + +% --BEGIN ENCODER gs1dotcode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput gs1process renmatrix dotcode-- +% --DESC: GS1 DotCode +% --EXAM: (235)5vBZIF%!<B;?oa%(01)01234567890128(8008)19052001 +% --EXOP: rows=16 +% --RNDR: renmatrix +%%BeginResource: uk.co.terryburton.bwipp gs1dotcode 0.0 2022082100 77157 73683 +%%BeginData: 90 ASCII Lines +/setpacking where {pop currentpacking true setpacking} if +10 dict +dup /raiseerror dup /uk.co.terryburton.bwipp findresource put +dup /gs1process dup /uk.co.terryburton.bwipp findresource put +dup /renmatrix dup /uk.co.terryburton.bwipp findresource put +dup /dotcode dup /uk.co.terryburton.bwipp findresource put +begin +/gs1dotcode { + + 20 dict begin % Confine variables to local scope + + /options exch def % We are given an option string + /barcode exch def % We are given a barcode string + + /ctx null def + /dontdraw false def + /parse false def + /dontlint false def + /lintreqs true def + + % Parse the input options + options type /stringtype eq { + 1 dict begin + options { + token false eq {exit} if dup length string cvs (=) search + true eq {cvlit exch pop exch def} {cvlit true def} ifelse + } loop + currentdict end /options exch def + } if + options {def} forall + + barcode /ai //gs1process exec + /fncs exch def + /vals exch def + /ais exch def + + % Create the dotcode data + /fnc1 -1 def + /dmtx [ fnc1 ] def + 0 1 ais length 1 sub { + /i exch def + /ai ais i get def + /val vals i get def + dmtx length ai length add val length add array + dup 0 dmtx putinterval + dup dmtx length ai [ exch {} forall ] putinterval + dup dmtx length ai length add val [ exch {} forall ] putinterval + /dmtx exch def + i ais length 1 sub ne fncs i get and { % Append FNC1 + dmtx length 1 add array + dup 0 dmtx putinterval + dup dmtx length fnc1 put + /dmtx exch def + } if + } for + + % Compose input to dotcode + /barcode dmtx length 1 add 5 mul string def + /i 0 def /j 0 def { + i dmtx length eq {exit} if + dmtx i get dup fnc1 eq { + pop barcode j (^FNC1) putinterval + /j j 4 add def + } { + barcode exch j exch put + } ifelse + /i i 1 add def + /j j 1 add def + } loop + /barcode barcode 0 j getinterval def + + % Get the result of encoding with dotcode + options (parse) undef + options (dontdraw) true put + options (parsefnc) true put + /args barcode options //dotcode exec def + + args (opt) options put + args + + dontdraw not //renmatrix if + + end + +} +[/barcode] {null def} forall +bind def +/gs1dotcode dup load /uk.co.terryburton.bwipp defineresource pop +end +/setpacking where {pop setpacking} if +%%EndData +%%EndResource +% --END ENCODER gs1dotcode-- + % --BEGIN ENCODER hibccode39-- -% --REQUIRES preamble raiseerror renlinear code39-- +% --REQUIRES preamble loadctx unloadctx raiseerror renlinear code39-- % --DESC: HIBC Code 39 % --EXAM: A123BJC5D6E71 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp hibccode39 0.0 2017040400 68512 68281 -%%BeginData: 92 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp hibccode39 0.0 2022082100 63587 67110 +%%BeginData: 103 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code39 dup /uk.co.terryburton.bwipp findresource put @@ -22740,8 +30498,9 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /textxoffset 0 def @@ -22763,10 +30522,14 @@ begin /textyoffset textyoffset cvr def /textxoffset textxoffset cvr def + /hibccode39 //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def /charvals 43 dict def 0 1 42 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -22810,12 +30573,16 @@ begin args (textxalign) (center) put args (opt) options put args - + dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /hibccode39 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -22824,15 +30591,17 @@ end % --END ENCODER hibccode39-- % --BEGIN ENCODER hibccode128-- -% --REQUIRES preamble raiseerror renlinear code128-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renlinear code128-- % --DESC: HIBC Code 128 % --EXAM: A123BJC5D6E71 % --EXOP: includetext % --RNDR: renlinear -%%BeginResource: uk.co.terryburton.bwipp hibccode128 0.0 2017040400 68415 68036 -%%BeginData: 91 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp hibccode128 0.0 2022082100 69879 69846 +%%BeginData: 102 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renlinear dup /uk.co.terryburton.bwipp findresource put dup /code128 dup /uk.co.terryburton.bwipp findresource put @@ -22844,8 +30613,9 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def - /textfont /NimbusMonL-Regu def + /textfont /Courier def /textsize 10 def /textyoffset -7 def /textxoffset 0 def @@ -22867,10 +30637,14 @@ begin /textyoffset textyoffset cvr def /textxoffset textxoffset cvr def + /hibccode128 //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def /charvals 43 dict def 0 1 42 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -22913,12 +30687,16 @@ begin args (textxalign) (center) put args (opt) options put args - + dontdraw not //renlinear if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /hibccode128 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -22927,15 +30705,17 @@ end % --END ENCODER hibccode128-- % --BEGIN ENCODER hibcdatamatrix-- -% --REQUIRES preamble raiseerror renmatrix datamatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix datamatrix-- % --DESC: HIBC Data Matrix % --EXAM: A123BJC5D6E71 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp hibcdatamatrix 0.0 2017040400 65202 64798 -%%BeginData: 74 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp hibcdatamatrix 0.0 2022082100 67458 67144 +%%BeginData: 85 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /datamatrix dup /uk.co.terryburton.bwipp findresource put @@ -22947,6 +30727,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /validatecheck false def @@ -22961,10 +30742,14 @@ begin } if options {def} forall + /hibcdatamatrix //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def /charvals 43 dict def 0 1 42 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -22999,12 +30784,16 @@ begin args (opt) options put args - + dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /hibcdatamatrix dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -23013,15 +30802,17 @@ end % --END ENCODER hibcdatamatrix-- % --BEGIN ENCODER hibcdatamatrixrectangular-- -% --REQUIRES preamble raiseerror renmatrix datamatrix-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix datamatrix-- % --DESC: HIBC Data Matrix Rectangular % --EXAM: A123BJC5D6E71 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp hibcdatamatrixrectangular 0.0 2017040400 65451 65014 -%%BeginData: 75 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp hibcdatamatrixrectangular 0.0 2022082100 67707 67360 +%%BeginData: 86 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /datamatrix dup /uk.co.terryburton.bwipp findresource put @@ -23033,6 +30824,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /validatecheck false def @@ -23047,10 +30839,14 @@ begin } if options {def} forall + /hibcdatamatrixrectangular //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def /charvals 43 dict def 0 1 42 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -23086,12 +30882,16 @@ begin args (opt) options put args - + dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /hibcdatamatrixrectangular dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -23100,15 +30900,17 @@ end % --END ENCODER hibcdatamatrixrectangular-- % --BEGIN ENCODER hibcpdf417-- -% --REQUIRES preamble raiseerror renmatrix pdf417-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix pdf417-- % --DESC: HIBC PDF417 % --EXAM: A123BJC5D6E71 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp hibcpdf417 0.0 2017040400 65591 65215 -%%BeginData: 78 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp hibcpdf417 0.0 2022082100 67713 67465 +%%BeginData: 89 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /pdf417 dup /uk.co.terryburton.bwipp findresource put @@ -23120,6 +30922,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /columns 2 def /validatecheck false def @@ -23137,10 +30940,14 @@ begin /columns columns cvi def + /hibcpdf417 //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def /charvals 43 dict def 0 1 42 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -23176,12 +30983,16 @@ begin args (opt) options put args - + dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /hibcpdf417 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -23190,15 +31001,17 @@ end % --END ENCODER hibcpdf417-- % --BEGIN ENCODER hibcmicropdf417-- -% --REQUIRES preamble raiseerror renmatrix micropdf417-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix micropdf417-- % --DESC: HIBC MicroPDF417 % --EXAM: A123BJC5D6E71 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp hibcmicropdf417 0.0 2017040400 65641 65250 -%%BeginData: 78 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp hibcmicropdf417 0.0 2022082100 67787 67500 +%%BeginData: 89 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /micropdf417 dup /uk.co.terryburton.bwipp findresource put @@ -23210,6 +31023,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /columns 2 def /validatecheck false def @@ -23227,10 +31041,14 @@ begin /columns columns cvi def + /hibcmicropdf417 //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def /charvals 43 dict def 0 1 42 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -23266,12 +31084,16 @@ begin args (opt) options put args - + dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /hibcmicropdf417 dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -23280,15 +31102,17 @@ end % --END ENCODER hibcmicropdf417-- % --BEGIN ENCODER hibcqrcode-- -% --REQUIRES preamble raiseerror renmatrix qrcode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix qrcode-- % --DESC: HIBC QR Code % --EXAM: A123BJC5D6E71 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp hibcqrcode 0.0 2017040400 65146 64770 -%%BeginData: 74 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp hibcqrcode 0.0 2022082100 68350 68090 +%%BeginData: 85 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /qrcode dup /uk.co.terryburton.bwipp findresource put @@ -23300,6 +31124,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /validatecheck false def @@ -23314,10 +31139,14 @@ begin } if options {def} forall + /hibcqrcode //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def /charvals 43 dict def 0 1 42 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -23352,12 +31181,16 @@ begin args (opt) options put args - + dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /hibcqrcode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -23366,15 +31199,17 @@ end % --END ENCODER hibcqrcode-- % --BEGIN ENCODER hibccodablockf-- -% --REQUIRES preamble raiseerror renmatrix codablockf-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix codablockf-- % --DESC: HIBC Codablock F % --EXAM: A123BJC5D6E71 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp hibccodablockf 0.0 2017040400 65182 64798 -%%BeginData: 74 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp hibccodablockf 0.0 2022082100 67542 67272 +%%BeginData: 85 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /codablockf dup /uk.co.terryburton.bwipp findresource put @@ -23386,6 +31221,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /validatecheck false def @@ -23400,10 +31236,14 @@ begin } if options {def} forall + /hibccodablockf //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def /charvals 43 dict def 0 1 42 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -23438,12 +31278,16 @@ begin args (opt) options put args - + dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /hibccodablockf dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if @@ -23452,15 +31296,17 @@ end % --END ENCODER hibccodablockf-- % --BEGIN ENCODER hibcazteccode-- -% --REQUIRES preamble raiseerror renmatrix azteccode-- +% --REQUIRES preamble loadctx unloadctx raiseerror parseinput renmatrix azteccode-- % --DESC: HIBC Aztec Code % --EXAM: A123BJC5D6E71 % --EXOP: % --RNDR: renmatrix -%%BeginResource: uk.co.terryburton.bwipp hibcazteccode 0.0 2017040400 68614 64895 -%%BeginData: 74 ASCII Lines +%%BeginResource: uk.co.terryburton.bwipp hibcazteccode 0.0 2022082100 67408 67137 +%%BeginData: 85 ASCII Lines /setpacking where {pop currentpacking true setpacking} if -1 dict +10 dict +dup /loadctx dup /uk.co.terryburton.bwipp findresource put +dup /unloadctx dup /uk.co.terryburton.bwipp findresource put dup /raiseerror dup /uk.co.terryburton.bwipp findresource put dup /renmatrix dup /uk.co.terryburton.bwipp findresource put dup /azteccode dup /uk.co.terryburton.bwipp findresource put @@ -23472,6 +31318,7 @@ begin /options exch def % We are given an option string /barcode exch def % We are given a barcode string + /ctx null def /dontdraw false def /validatecheck false def @@ -23486,10 +31333,14 @@ begin } if options {def} forall + /hibcazteccode //loadctx exec + % Create a string of the available characters +{ /barchars (0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%) def /charvals 43 dict def 0 1 42 {charvals exch dup barchars exch 1 getinterval exch put} for +} ctxdef % Validate the input 0 1 barcode length 1 sub { @@ -23524,12 +31375,16 @@ begin args (opt) options put args - + dontdraw not //renmatrix if + //unloadctx exec + end -} bind def +} +[/barcode] {null def} forall +bind def /hibcazteccode dup load /uk.co.terryburton.bwipp defineresource pop end /setpacking where {pop setpacking} if diff --git a/graphics/pstricks/contrib/pst-barcode/latex/pst-barcode.sty b/graphics/pstricks/contrib/pst-barcode/latex/pst-barcode.sty index 08b7deacd6..049df4a35f 100644 --- a/graphics/pstricks/contrib/pst-barcode/latex/pst-barcode.sty +++ b/graphics/pstricks/contrib/pst-barcode/latex/pst-barcode.sty @@ -1,12 +1,12 @@ -%% $Id: pst-barcode.sty 445 2017-04-19 11:13:52Z herbert $ +%% $Id: pst-barcode.sty 590 2022-08-23 16:53:11Z herbert $ \RequirePackage{pstricks} -\ProvidesPackage{pst-barcode}[2016/04/22 package wrapper for +\ProvidesPackage{pst-barcode}[2022/08/23 package wrapper for pst-barcode.tex (hv)] \input{pst-barcode.tex} \ProvidesFile{pst-barcode.tex} [\filedate\space v\fileversion\space `PST-barcode' (hv)] \IfFileExists{pst-barcode.pro}{% \ProvidesFile{pst-barcode.pro} - [2017/04/04 PostScript prologue file (hv)] + [2022/08/23 PostScript prologue file (hv)] \@addtofilelist{pst-barcode.pro}}{}% \endinput diff --git a/graphics/pstricks/contrib/pst-barcode/tex/pst-barcode.tex b/graphics/pstricks/contrib/pst-barcode/tex/pst-barcode.tex index f9e6868a40..ab77cff3df 100644 --- a/graphics/pstricks/contrib/pst-barcode/tex/pst-barcode.tex +++ b/graphics/pstricks/contrib/pst-barcode/tex/pst-barcode.tex @@ -1,4 +1,4 @@ -%% $Id: pst-barcode.tex 519 2017-08-22 07:47:55Z herbert $ +%% $Id: pst-barcode.tex 591 2022-08-23 16:54:56Z herbert $ %% %% This is file `pst-barcode.tex', %% @@ -20,8 +20,8 @@ \let\PSTBarcodeLoaded\endinput \ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi % -\def\fileversion{0.18} -\def\filedate{2017/08/22} +\def\fileversion{0.19} +\def\filedate{2022/08/21} \message{`PST-barcode' v\fileversion, \filedate\space (tb,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax |