Lines Matching refs:code

9  * Very capable code, excellent density, high reliability; in very wide use world-wide
15 * @param string $code
19 public function __construct($code, $type = 'B', $ean = false, $quiet_zone_left = null, $quiet_zone_right = null)
21 $this->init($code, $type, $ean);
31 * @param string $code
35 protected function init($code, $type, $ean)
37 $code = UtfString::strcode2utf($code); // mPDF 5.7.1 Allows e.g. <barcode code="5432&#013;1068" type="C128A" />
157 foreach (explode(" ", $code) as $v) {
168 throw new \Mpdf\Barcode\BarcodeException(sprintf('Invalid CODE128RAW barcode value "%s". 0-105 needed', $code));
174 throw new \Mpdf\Barcode\BarcodeException(sprintf('Invalid CODE128RAW barcode value "%s". 0-105 needed', $code));
189 $code=$newCode;
217 if ((strlen($code) % 2) != 0) {
218 // The length of barcode value must be even ($code). You must pad the number with zeros
227 $hclen = (strlen($code) / 2);
230 if ($code[2 * $i]<"0" || $code[2 * $i]>"9" || $code[2 * $i + 1]<"0" || $code[2 * $i + 1]>"9") {
231 throw new \Mpdf\Barcode\BarcodeException(sprintf('Invalid character "%s" in CODE128C barcode value "%s"', $code[$i], $code));
233 $newCode .= chr((int) ($code[2 * $i] . $code[2 * $i + 1]));
236 $code = $newCode;
249 $code = chr(102) . $code;
252 $clen = strlen($code);
257 if (strpos($keys, $code[$i]) === false) {
258 throw new \Mpdf\Barcode\BarcodeException(sprintf('Invalid character "%s" in CODE128%s barcode value "%s"', $code[$i], $type, $code));
260 $sum += (strpos($keys, $code[$i]) * ($i + 1));
268 $code = chr($startid) . $code . chr($check) . chr(106) . chr(107);
269 $bararray = ['code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => []];
271 $len = strlen($code);
275 $ck = strpos($keys, $code[$i]);
277 $char_num = ord($code[$i]);
283 throw new \Mpdf\Barcode\BarcodeException(sprintf('Invalid character "%s" in CODE128C barcode value "%s"', $code[$i], $code));