├── .gitignore
├── vendor
├── picqer
│ └── php-barcode-generator
│ │ ├── .gitignore
│ │ ├── src
│ │ ├── Exceptions
│ │ │ ├── BarcodeException.php
│ │ │ ├── UnknownTypeException.php
│ │ │ ├── InvalidFormatException.php
│ │ │ ├── InvalidLengthException.php
│ │ │ ├── InvalidCharacterException.php
│ │ │ └── InvalidCheckDigitException.php
│ │ ├── BarcodeGeneratorHTML.php
│ │ ├── BarcodeGeneratorSVG.php
│ │ ├── BarcodeGeneratorJPG.php
│ │ └── BarcodeGeneratorPNG.php
│ │ ├── .travis.yml
│ │ ├── phpunit.xml
│ │ ├── generate-verified-files.php
│ │ ├── composer.json
│ │ ├── tests
│ │ └── verified-files
│ │ │ ├── 0049000004632-ean13.svg
│ │ │ └── 081231723897-ean13.svg
│ │ └── Readme.md
├── guzzlehttp
│ ├── guzzle
│ │ ├── src
│ │ │ ├── Exception
│ │ │ │ ├── GuzzleException.php
│ │ │ │ ├── TooManyRedirectsException.php
│ │ │ │ ├── TransferException.php
│ │ │ │ ├── ClientException.php
│ │ │ │ ├── ServerException.php
│ │ │ │ ├── BadResponseException.php
│ │ │ │ ├── SeekException.php
│ │ │ │ └── ConnectException.php
│ │ │ ├── functions_include.php
│ │ │ ├── Handler
│ │ │ │ ├── CurlFactoryInterface.php
│ │ │ │ ├── CurlHandler.php
│ │ │ │ ├── Proxy.php
│ │ │ │ └── EasyHandle.php
│ │ │ ├── Cookie
│ │ │ │ ├── SessionCookieJar.php
│ │ │ │ ├── FileCookieJar.php
│ │ │ │ └── CookieJarInterface.php
│ │ │ └── ClientInterface.php
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ └── composer.json
│ ├── promises
│ │ ├── tests
│ │ │ ├── bootstrap.php
│ │ │ ├── AggregateExceptionTest.php
│ │ │ ├── Thennable.php
│ │ │ ├── TaskQueueTest.php
│ │ │ ├── NotPromiseInstance.php
│ │ │ └── RejectionExceptionTest.php
│ │ ├── .gitignore
│ │ ├── src
│ │ │ ├── functions_include.php
│ │ │ ├── CancellationException.php
│ │ │ ├── PromisorInterface.php
│ │ │ ├── AggregateException.php
│ │ │ ├── RejectionException.php
│ │ │ ├── FulfilledPromise.php
│ │ │ ├── RejectedPromise.php
│ │ │ ├── TaskQueue.php
│ │ │ └── PromiseInterface.php
│ │ ├── Makefile
│ │ ├── .travis.yml
│ │ ├── phpunit.xml.dist
│ │ ├── composer.json
│ │ ├── CHANGELOG.md
│ │ └── LICENSE
│ └── psr7
│ │ ├── .gitignore
│ │ ├── src
│ │ ├── functions_include.php
│ │ ├── NoSeekStream.php
│ │ ├── LazyOpenStream.php
│ │ ├── DroppingStream.php
│ │ └── InflateStream.php
│ │ ├── tests
│ │ ├── bootstrap.php
│ │ ├── DroppingStreamTest.php
│ │ ├── InflateStreamTest.php
│ │ ├── NoSeekStreamTest.php
│ │ ├── LazyOpenStreamTest.php
│ │ ├── BufferStreamTest.php
│ │ ├── PumpStreamTest.php
│ │ └── FnStreamTest.php
│ │ ├── .travis.yml
│ │ ├── phpunit.xml.dist
│ │ ├── Makefile
│ │ ├── composer.json
│ │ ├── LICENSE
│ │ └── CHANGELOG.md
├── mike42
│ └── escpos-php
│ │ ├── example
│ │ ├── resources
│ │ │ ├── tux.png
│ │ │ ├── document.odt
│ │ │ ├── document.pdf
│ │ │ ├── document.z
│ │ │ ├── tulips.png
│ │ │ ├── escpos-php.png
│ │ │ ├── escpos-php-small.png
│ │ │ └── character-encoding-test-strings.inc
│ │ ├── specific
│ │ │ ├── README.md
│ │ │ ├── 62-greek-symbol-swap.php
│ │ │ ├── 50-P-822D-greek.php
│ │ │ ├── 68-redblack.php
│ │ │ ├── 123-code128-barcode.php
│ │ │ ├── 33-spanish-seypos-prp-300.php
│ │ │ ├── 97-dithering.php
│ │ │ ├── 37-chinese.php
│ │ │ ├── 29-latvian-star-tup592.php
│ │ │ ├── 44-pound-symbol-star-tsp650.php
│ │ │ ├── 32-german-tm-t20-ii-custom-command.php
│ │ │ ├── 6-arabic-epos-tep-220m.php
│ │ │ ├── 54-gfx-sidebyside.php
│ │ │ └── 39-currency-symbols.php
│ │ ├── interface
│ │ │ ├── README.md
│ │ │ ├── cups.php
│ │ │ ├── ethernet.php
│ │ │ ├── windows-lpt.php
│ │ │ ├── windows-usb.php
│ │ │ ├── linux-usb.php
│ │ │ └── smb.php
│ │ ├── graphics.php
│ │ ├── bit-image.php
│ │ ├── README.md
│ │ ├── text-size.php
│ │ ├── character-encodings-with-images.php
│ │ ├── qr-code.php
│ │ ├── character-encodings.php
│ │ ├── print-from-pdf.php
│ │ ├── print-from-html.php
│ │ └── character-tables.php
│ │ ├── test
│ │ ├── unit
│ │ │ ├── resources
│ │ │ │ ├── doc.pdf
│ │ │ │ ├── black_white.bmp
│ │ │ │ ├── black_white.gif
│ │ │ │ ├── black_white.jpg
│ │ │ │ ├── black_white.png
│ │ │ │ ├── canvas_black.bmp
│ │ │ │ ├── canvas_black.gif
│ │ │ │ ├── canvas_black.jpg
│ │ │ │ ├── canvas_black.png
│ │ │ │ ├── canvas_white.bmp
│ │ │ │ ├── canvas_white.gif
│ │ │ │ ├── canvas_white.jpg
│ │ │ │ ├── canvas_white.png
│ │ │ │ ├── black_transparent.gif
│ │ │ │ ├── black_transparent.png
│ │ │ │ └── demo.php
│ │ │ └── CupsPrintConnectorTest.php
│ │ ├── integration
│ │ │ └── resources
│ │ │ │ └── output
│ │ │ │ ├── demo.bin
│ │ │ │ ├── bit-image.bin
│ │ │ │ ├── graphics.bin
│ │ │ │ ├── character-tables.bin
│ │ │ │ ├── receipt-with-logo.bin
│ │ │ │ ├── character-encodings.bin
│ │ │ │ ├── text-size.bin
│ │ │ │ ├── qr-code.bin
│ │ │ │ └── barcode.bin
│ │ ├── phpunit.xml
│ │ └── bootstrap.php
│ │ ├── .gitignore
│ │ ├── src
│ │ └── Mike42
│ │ │ └── Escpos
│ │ │ ├── PrintBuffers
│ │ │ ├── cache
│ │ │ │ ├── Characters-StarCapabilityProfile.ser.z
│ │ │ │ ├── Characters-P822DCapabilityProfile.ser.z
│ │ │ │ ├── Characters-SimpleCapabilityProfile.ser.z
│ │ │ │ ├── Characters-DefaultCapabilityProfile.ser.z
│ │ │ │ └── Characters-EposTepCapabilityProfile.ser.z
│ │ │ ├── PrintBuffer.php
│ │ │ └── ImagePrintBuffer.php
│ │ │ ├── CapabilityProfiles
│ │ │ ├── EposTepCapabilityProfile.php
│ │ │ ├── SimpleCapabilityProfile.php
│ │ │ └── AbstractCapabilityProfile.php
│ │ │ ├── NativeEscposImage.php
│ │ │ ├── PrintConnectors
│ │ │ ├── NetworkPrintConnector.php
│ │ │ ├── PrintConnector.php
│ │ │ ├── FilePrintConnector.php
│ │ │ └── DummyPrintConnector.php
│ │ │ └── GdEscposImage.php
│ │ ├── .travis.yml
│ │ ├── doc
│ │ └── Makefile
│ │ ├── autoload.php
│ │ ├── composer.json
│ │ ├── CONTRIBUTORS.md
│ │ └── LICENSE.md
├── autoload.php
├── composer
│ ├── autoload_classmap.php
│ ├── autoload_namespaces.php
│ ├── autoload_files.php
│ ├── autoload_psr4.php
│ ├── LICENSE
│ ├── autoload_static.php
│ └── autoload_real.php
└── psr
│ └── http-message
│ ├── README.md
│ ├── composer.json
│ ├── LICENSE
│ └── src
│ └── ResponseInterface.php
├── composer.json
├── README.md
├── index.php
└── form.php
/.gitignore:
--------------------------------------------------------------------------------
1 | /.DS_Store
2 |
--------------------------------------------------------------------------------
/vendor/picqer/php-barcode-generator/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .DS_Store
3 | vendor
4 | composer.lock
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php:
--------------------------------------------------------------------------------
1 | all.xml
14 |
15 | clean:
16 | rm --preserve-root -Rf html latex xml doxygen_sqlite3.db all.xml warnings.log
17 |
18 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/AggregateException.php:
--------------------------------------------------------------------------------
1 | assertContains('foo', $e->getMessage());
12 | $this->assertEquals(['baz', 'bar'], $e->getReason());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/test/unit/resources/demo.php:
--------------------------------------------------------------------------------
1 | readImage("doc.pdf[5]");
5 | $im -> destroy();
6 | } catch (ImagickException $e) {
7 | echo "Error: " . $e -> getMessage() . "\n";
8 | }
9 |
10 | $im = new Imagick();
11 | try {
12 | ob_start();
13 | @$im -> readImage("doc.pdf[5]");
14 | ob_end_clean();
15 | $im -> destroy();
16 | } catch (ImagickException $e) {
17 | echo "Error: " . $e -> getMessage() . "\n";
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/interface/README.md:
--------------------------------------------------------------------------------
1 | Interfaces
2 | ----------
3 | This directory contains boilerpalte code to show you how to open a print connector
4 | to printers which are connected in different ways.
5 |
6 | To get a list of supported interfaces and operating systems, see the main README.md file for the project.
7 |
8 | If you have a printer interface with no example, and you want to help put one together, then please lodge a request on the bug tracker: https://github.com/mike42/escpos-php/issues
9 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | tests
7 |
8 |
9 |
10 |
11 | src
12 |
13 | src/
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/test/integration/resources/output/text-size.bin:
--------------------------------------------------------------------------------
1 | @@!
2 | Change height & width
3 | ! ! 1!2!"3!34!D5!U6!f7!w8
4 | !
5 | Change width only (height=4):
6 | ! !1!2!#3!34!C5!S6!c7!s8
7 | !
8 | Change height only (width=4):
9 | ! !01!12!23!34!45!56!67!78
10 | !
11 | Very narrow text:
12 | ! !The quick brown fox jumps over the lazy dog.
13 | !
14 | Very wide text:
15 | ! !0Hello world!
16 | !
17 | Largest possible text:
18 | ! !wHello
19 | world!
20 | VA
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | tests
7 |
8 |
9 |
10 |
11 | src
12 |
13 | src/
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_files.php:
--------------------------------------------------------------------------------
1 | $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
10 | 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
11 | '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
12 | );
13 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/62-greek-symbol-swap.php:
--------------------------------------------------------------------------------
1 | text("Μιχάλης Νίκος\n");
12 | $printer -> cut();
13 | $printer -> close();
14 |
15 | ?>
16 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/NoSeekStream.php:
--------------------------------------------------------------------------------
1 | '1','errmsg'=>'未指定参数']);
7 | exit;
8 | }else{
9 | $number = isset($_POST['number'])?$_POST['number']:1;
10 | $n = isset($_POST['name'])?$_POST['name'] : '';
11 | $c =isset($_POST['company'])?$_POST['company'] : '';
12 | $params = implode([$number,$n,$c],";");
13 | }
14 | $userInfo = explode(";",$params);
15 | $printer = new Printer($userInfo);
16 | $printer->start();
17 |
18 | ?>
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/tests/Thennable.php:
--------------------------------------------------------------------------------
1 | nextPromise = new Promise();
13 | }
14 |
15 | public function then(callable $res = null, callable $rej = null)
16 | {
17 | return $this->nextPromise->then($res, $rej);
18 | }
19 |
20 | public function resolve($value)
21 | {
22 | $this->nextPromise->resolve($value);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/test/phpunit.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 | unit
11 |
12 |
13 | integration
14 |
15 |
16 |
17 |
18 | ../src
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_psr4.php:
--------------------------------------------------------------------------------
1 | array($vendorDir . '/psr/http-message/src'),
10 | 'Picqer\\Barcode\\' => array($vendorDir . '/picqer/php-barcode-generator/src'),
11 | 'Mike42\\' => array($vendorDir . '/mike42/escpos-php/src/Mike42'),
12 | 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
13 | 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
14 | 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
15 | );
16 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/interface/cups.php:
--------------------------------------------------------------------------------
1 | text("Hello World!\n");
13 | $printer -> cut();
14 |
15 | /* Close printer */
16 | $printer -> close();
17 | } catch (Exception $e) {
18 | echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/50-P-822D-greek.php:
--------------------------------------------------------------------------------
1 | text($text . "\n");
16 | $printer -> cut();
17 |
18 | // Close the connection
19 | $printer -> close();
20 |
--------------------------------------------------------------------------------
/vendor/psr/http-message/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "psr/http-message",
3 | "description": "Common interface for HTTP messages",
4 | "keywords": ["psr", "psr-7", "http", "http-message", "request", "response"],
5 | "license": "MIT",
6 | "authors": [
7 | {
8 | "name": "PHP-FIG",
9 | "homepage": "http://www.php-fig.org/"
10 | }
11 | ],
12 | "require": {
13 | "php": ">=5.3.0"
14 | },
15 | "autoload": {
16 | "psr-4": {
17 | "Psr\\Http\\Message\\": "src/"
18 | }
19 | },
20 | "extra": {
21 | "branch-alias": {
22 | "dev-master": "1.0.x-dev"
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/EposTepCapabilityProfile.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos\CapabilityProfiles;
14 |
15 | class EposTepCapabilityProfile extends DefaultCapabilityProfile
16 | {
17 | // TODO override list of code pages
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/Makefile:
--------------------------------------------------------------------------------
1 | all: clean test
2 |
3 | test:
4 | vendor/bin/phpunit $(TEST)
5 |
6 | coverage:
7 | vendor/bin/phpunit --coverage-html=artifacts/coverage $(TEST)
8 |
9 | view-coverage:
10 | open artifacts/coverage/index.html
11 |
12 | check-tag:
13 | $(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))
14 |
15 | tag: check-tag
16 | @echo Tagging $(TAG)
17 | chag update $(TAG)
18 | git commit -a -m '$(TAG) release'
19 | chag tag
20 | @echo "Release has been created. Push using 'make release'"
21 | @echo "Changes made in the release commit"
22 | git diff HEAD~1 HEAD
23 |
24 | release: check-tag
25 | git push origin master
26 | git push origin $(TAG)
27 |
28 | clean:
29 | rm -rf artifacts/*
30 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:
--------------------------------------------------------------------------------
1 | stream = $stream;
16 | $msg = $msg ?: 'Could not seek the stream to position ' . $pos;
17 | parent::__construct($msg);
18 | }
19 |
20 | /**
21 | * @return StreamInterface
22 | */
23 | public function getStream()
24 | {
25 | return $this->stream;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/src/Mike42/Escpos/NativeEscposImage.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos;
14 |
15 | use Mike42\Escpos\EscposImage;
16 |
17 | /**
18 | * Implementation of EscposImage using only native PHP.
19 | * TODO: wbmp, pbm, bmp files.
20 | */
21 | class NativeEscposImage extends EscposImage
22 | {
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/68-redblack.php:
--------------------------------------------------------------------------------
1 | text("Hello World!\n");
13 | $printer -> setColor(Escpos::COLOR_2);
14 | $printer -> text("Red?!\n");
15 | $printer -> setColor(Escpos::COLOR_1);
16 | $printer -> text("Default color again?!\n");
17 | $printer -> cut();
18 | } finally {
19 | /* Always close the printer! */
20 | $printer -> close();
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/123-code128-barcode.php:
--------------------------------------------------------------------------------
1 | setJustification(Printer::JUSTIFY_CENTER);
13 | $printer -> setBarcodeHeight(48);
14 | $printer->setBarcodeTextPosition(Printer::BARCODE_TEXT_BELOW);
15 | foreach(array($a, $b, $c) as $item) {
16 | $printer -> barcode($item, Printer::BARCODE_CODE128);
17 | $printer -> feed(1);
18 | }
19 | $printer -> cut();
20 | $printer -> close();
21 |
22 |
--------------------------------------------------------------------------------
/vendor/picqer/php-barcode-generator/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 | ./tests/
17 |
18 |
19 |
20 |
21 | ./src
22 |
23 |
24 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/interface/ethernet.php:
--------------------------------------------------------------------------------
1 | text("Hello World!\n");
16 | $printer -> cut();
17 |
18 | /* Close printer */
19 | $printer -> close();
20 | } catch (Exception $e) {
21 | echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "guzzlehttp/promises",
3 | "type": "library",
4 | "description": "Guzzle promises library",
5 | "keywords": ["promise"],
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "Michael Dowling",
10 | "email": "mtdowling@gmail.com",
11 | "homepage": "https://github.com/mtdowling"
12 | }
13 | ],
14 | "require": {
15 | "php": ">=5.5.0"
16 | },
17 | "require-dev": {
18 | "phpunit/phpunit": "~4.0"
19 | },
20 | "autoload": {
21 | "psr-4": {
22 | "GuzzleHttp\\Promise\\": "src/"
23 | },
24 | "files": ["src/functions_include.php"]
25 | },
26 | "extra": {
27 | "branch-alias": {
28 | "dev-master": "1.0-dev"
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php:
--------------------------------------------------------------------------------
1 | getBarcode('081231723897', $generatorSVG::TYPE_EAN_13));
11 |
12 | $generatorHTML = new Picqer\Barcode\BarcodeGeneratorHTML();
13 | file_put_contents('tests/verified-files/081231723897-code128.html', $generatorHTML->getBarcode('081231723897', $generatorHTML::TYPE_CODE_128));
14 |
15 | $generatorSVG = new Picqer\Barcode\BarcodeGeneratorSVG();
16 | file_put_contents('tests/verified-files/0049000004632-ean13.svg', $generatorSVG->getBarcode('0049000004632', $generatorSVG::TYPE_EAN_13));
17 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/33-spanish-seypos-prp-300.php:
--------------------------------------------------------------------------------
1 | text("El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.\n");
18 | $printer -> cut();
19 | $printer -> close();
20 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # CHANGELOG
2 |
3 | ## 1.1.0 - 2016-03-07
4 |
5 | * Update EachPromise to prevent recurring on a iterator when advancing, as this
6 | could trigger fatal generator errors.
7 | * Update Promise to allow recursive waiting without unwrapping exceptions.
8 |
9 | ## 1.0.3 - 2015-10-15
10 |
11 | * Update EachPromise to immediately resolve when the underlying promise iterator
12 | is empty. Previously, such a promise would throw an exception when its `wait`
13 | function was called.
14 |
15 | ## 1.0.2 - 2015-05-15
16 |
17 | * Conditionally require functions.php.
18 |
19 | ## 1.0.1 - 2015-06-24
20 |
21 | * Updating EachPromise to call next on the underlying promise iterator as late
22 | as possible to ensure that generators that generate new requests based on
23 | callbacks are not iterated until after callbacks are invoked.
24 |
25 | ## 1.0.0 - 2015-05-12
26 |
27 | * Initial release
28 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Document
6 |
7 |
8 |
16 | 提交
17 |
18 |
33 |
34 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/tests/TaskQueueTest.php:
--------------------------------------------------------------------------------
1 | assertTrue($tq->isEmpty());
12 | }
13 |
14 | public function testKnowsIfFull()
15 | {
16 | $tq = new TaskQueue(false);
17 | $tq->add(function () {});
18 | $this->assertFalse($tq->isEmpty());
19 | }
20 |
21 | public function testExecutesTasksInOrder()
22 | {
23 | $tq = new TaskQueue(false);
24 | $called = [];
25 | $tq->add(function () use (&$called) { $called[] = 'a'; });
26 | $tq->add(function () use (&$called) { $called[] = 'b'; });
27 | $tq->add(function () use (&$called) { $called[] = 'c'; });
28 | $tq->run();
29 | $this->assertEquals(['a', 'b', 'c'], $called);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "guzzlehttp/psr7",
3 | "type": "library",
4 | "description": "PSR-7 message implementation",
5 | "keywords": ["message", "stream", "http", "uri"],
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "Michael Dowling",
10 | "email": "mtdowling@gmail.com",
11 | "homepage": "https://github.com/mtdowling"
12 | }
13 | ],
14 | "require": {
15 | "php": ">=5.4.0",
16 | "psr/http-message": "~1.0"
17 | },
18 | "require-dev": {
19 | "phpunit/phpunit": "~4.0"
20 | },
21 | "provide": {
22 | "psr/http-message-implementation": "1.0"
23 | },
24 | "autoload": {
25 | "psr-4": {
26 | "GuzzleHttp\\Psr7\\": "src/"
27 | },
28 | "files": ["src/functions_include.php"]
29 | },
30 | "extra": {
31 | "branch-alias": {
32 | "dev-master": "1.0-dev"
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/tests/DroppingStreamTest.php:
--------------------------------------------------------------------------------
1 | assertEquals(3, $drop->write('hel'));
14 | $this->assertEquals(2, $drop->write('lo'));
15 | $this->assertEquals(5, $drop->getSize());
16 | $this->assertEquals('hello', $drop->read(5));
17 | $this->assertEquals(0, $drop->getSize());
18 | $drop->write('12345678910');
19 | $this->assertEquals(5, $stream->getSize());
20 | $this->assertEquals(5, $drop->getSize());
21 | $this->assertEquals('12345', (string) $drop);
22 | $this->assertEquals(0, $drop->getSize());
23 | $drop->write('hello');
24 | $this->assertSame(0, $drop->write('test'));
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mike42/escpos-php",
3 | "type": "library",
4 | "description": "Thermal receipt printer library, for use with ESC/POS compatible printers",
5 | "homepage": "https://github.com/mike42/escpos-php",
6 | "keywords": ["receipt", "print", "escpos", "ESC-POS", "driver"],
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Michael Billington",
11 | "email": "michael.billington@gmail.com"
12 | },
13 | {
14 | "name": "Roni Saha",
15 | "email": "roni.cse@gmail.com"
16 | },
17 | {
18 | "name": "Gergely Radics",
19 | "email": "gerifield@ustream.tv"
20 | },
21 | {
22 | "name": "Warren Doyle",
23 | "email": "w.doyle@fuelled.co"
24 | },
25 | {
26 | "name": "vharo",
27 | "email": "vharo@geepok.com"
28 | }
29 | ],
30 | "require": {
31 | "php": ">=5.3.0"
32 | },
33 | "require-dev": {
34 | "phpunit/phpunit": "4.5.*",
35 | "squizlabs/php_codesniffer": "2.*"
36 | },
37 | "autoload": {
38 | "psr-4": {
39 | "Mike42\\": "src/Mike42"
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 | # escpos-php contributors
2 |
3 | This file contains a list of people who have made contributions of
4 | code which appear in the public repository of escpos-php.
5 |
6 | Main repository: [mike42/escpos-php](https://github.com/mike42/escpos-php) ([online contributor list](https://github.com/mike42/escpos-php/graphs/contributors))
7 |
8 | - [Michael Billington](https://github.com/mike42)
9 | - [Alif Maulana El Fattah Nataly](https://github.com/alif25r)
10 | - [Mareks Sudniks](https://github.com/marech)
11 | - [matiasgaston](https://github.com/matiasgaston)
12 | - [Mike Stivala](https://github.com/brndwgn)
13 | - [Nicholas Long](https://github.com/longsview)
14 |
15 | Via fork: [wdoyle/EpsonESCPOS-PHP](https://github.com/wdoyle/EpsonESCPOS-PHP):
16 |
17 | - [Warren Doyle](https://github.com/wdoyle)
18 |
19 | Via fork: [ronisaha/php-esc-pos](https://github.com/ronisaha/php-esc-pos):
20 |
21 | - [Roni Saha](https://github.com/ronisaha)
22 | - [Gergely Radics](https://github.com/Gerifield)
23 | - [vharo](https://github.com/vharo)
24 |
25 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:
--------------------------------------------------------------------------------
1 | filename = $filename;
27 | $this->mode = $mode;
28 | }
29 |
30 | /**
31 | * Creates the underlying stream lazily when required.
32 | *
33 | * @return StreamInterface
34 | */
35 | protected function createStream()
36 | {
37 | return stream_for(try_fopen($this->filename, $this->mode));
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/97-dithering.php:
--------------------------------------------------------------------------------
1 | bitImage($img1);
18 |
19 | /* Load with optimisations disabled, forcing the use of PHP to convert the
20 | pixels, which uses a threshold and is much slower.
21 | */
22 | $img2 = EscposImage::load(__DIR__ . '/../resources/tulips.png', false);
23 | $printer -> bitImage($img2);
24 | $printer -> cut();
25 | } finally {
26 | /* Always close the printer! */
27 | $printer -> close();
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/37-chinese.php:
--------------------------------------------------------------------------------
1 | textChinese("艾德蒙 AOC E2450SWH 23.6吋 LED液晶寬螢幕特價$ 19900\n\n");
21 |
22 | // Note that on the printer tested (ZJ5890), the font only contained simplified characters.
23 | $printer -> textChinese("示例文本打印机!\n\n");
24 | $printer -> close();
25 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | sudo: false
4 |
5 | php:
6 | - 5.5
7 | - 5.6
8 | - 7.0
9 | - hhvm
10 |
11 | before_script:
12 | - curl --version
13 | - composer self-update
14 | - composer install --no-interaction --prefer-source --dev
15 | - ~/.nvm/nvm.sh install v0.6.14
16 | - ~/.nvm/nvm.sh run v0.6.14
17 | - '[ "$TRAVIS_PHP_VERSION" != "7.0" ] || echo "xdebug.overload_var_dump = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini'
18 |
19 | script: make test
20 |
21 | matrix:
22 | allow_failures:
23 | - php: hhvm
24 | fast_finish: true
25 |
26 | before_deploy:
27 | - rvm 1.9.3 do gem install mime-types -v 2.6.2
28 | - make package
29 |
30 | deploy:
31 | provider: releases
32 | api_key:
33 | secure: UpypqlYgsU68QT/x40YzhHXvzWjFwCNo9d+G8KAdm7U9+blFfcWhV1aMdzugvPMl6woXgvJj7qHq5tAL4v6oswCORhpSBfLgOQVFaica5LiHsvWlAedOhxGmnJqMTwuepjBCxXhs3+I8Kof1n4oUL9gKytXjOVCX/f7XU1HiinU=
34 | file:
35 | - build/artifacts/guzzle.phar
36 | - build/artifacts/guzzle.zip
37 | on:
38 | repo: guzzle/guzzle
39 | tags: true
40 | all_branches: true
41 | php: 5.5
42 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/interface/windows-lpt.php:
--------------------------------------------------------------------------------
1 | LPT1
14 | */
15 | try {
16 | $connector = new WindowsPrintConnector("LPT1");
17 |
18 | // A FilePrintConnector will also work, but on non-Windows systems, writes
19 | // to an actual file called 'LPT1' rather than giving a useful error.
20 | // $connector = new FilePrintConnector("LPT1");
21 |
22 | /* Print a "Hello world" receipt" */
23 | $printer = new Printer($connector);
24 | $printer -> text("Hello World!\n");
25 | $printer -> cut();
26 |
27 | /* Close printer */
28 | $printer -> close();
29 | } catch (Exception $e) {
30 | echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/29-latvian-star-tup592.php:
--------------------------------------------------------------------------------
1 | text("Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus\n");
15 | $printer -> cut();
16 | $printer -> close();
17 |
18 | /* Option 2: Image-based output (formatting not available using this output) */
19 | $buffer = new ImagePrintBuffer();
20 | $connector = new FilePrintConnector("php://stdout");
21 | $printer = new Printer($connector, $profile);
22 | $printer -> setPrintBuffer($buffer);
23 | $printer -> text("Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus\n");
24 | $printer -> cut();
25 | $printer -> close();
26 |
--------------------------------------------------------------------------------
/vendor/composer/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Copyright (c) 2016 Nils Adermann, Jordi Boggiano
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is furnished
9 | to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 |
22 |
--------------------------------------------------------------------------------
/vendor/psr/http-message/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 PHP Framework Interoperability Group
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/test/bootstrap.php:
--------------------------------------------------------------------------------
1 | $c) {
34 | $code = ord($c);
35 | if ($code < 32 || $code > 126) {
36 | $chars[$i] = "\\x" . bin2hex($c);
37 | }
38 | }
39 | return implode($chars);
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/picqer/php-barcode-generator/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "picqer/php-barcode-generator",
3 | "type": "library",
4 | "description": "An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.",
5 | "keywords": [ "php", "barcode", "barcode generator", "EAN", "EAN13", "UPC", "Code39", "Code128", "Code93", "Standard 2 of 5", "MSI", "POSTNET", "KIX", "KIXCODE", "CODABAR", "PHARMA", "Code11", "SVG", "PNG", "HTML", "JPG", "JPEG" ],
6 | "homepage": "http://github.com/picqer/php-barcode-generator",
7 | "license": "LGPLv3",
8 | "authors": [
9 | {
10 | "name": "Nicola Asuni",
11 | "email": "info@tecnick.com",
12 | "homepage": "http://nicolaasuni.tecnick.com"
13 | },
14 | {
15 | "name": "Casper Bakker",
16 | "email": "info@picqer.com"
17 | }
18 | ],
19 | "require": {
20 | "php": ">=5.4.0"
21 | },
22 | "require-dev": {
23 | "phpunit/phpunit": "^5.3"
24 | },
25 | "autoload": {
26 | "psr-4": {
27 | "Picqer\\Barcode\\": "src"
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2016 Michael Dowling, https://github.com/mtdowling
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/tests/NotPromiseInstance.php:
--------------------------------------------------------------------------------
1 | nextPromise = new Promise();
14 | }
15 |
16 | public function then(callable $res = null, callable $rej = null)
17 | {
18 | return $this->nextPromise->then($res, $rej);
19 | }
20 |
21 | public function otherwise(callable $onRejected)
22 | {
23 | return $this->then($onRejected);
24 | }
25 |
26 | public function resolve($value)
27 | {
28 | $this->nextPromise->resolve($value);
29 | }
30 |
31 | public function reject($reason)
32 | {
33 | $this->nextPromise->reject($reason);
34 | }
35 |
36 | public function wait($unwrap = true, $defaultResolution = null)
37 | {
38 |
39 | }
40 |
41 | public function cancel()
42 | {
43 |
44 | }
45 |
46 | public function getState()
47 | {
48 | return $this->nextPromise->getState();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "guzzlehttp/guzzle",
3 | "type": "library",
4 | "description": "Guzzle is a PHP HTTP client library",
5 | "keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"],
6 | "homepage": "http://guzzlephp.org/",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Michael Dowling",
11 | "email": "mtdowling@gmail.com",
12 | "homepage": "https://github.com/mtdowling"
13 | }
14 | ],
15 | "require": {
16 | "php": ">=5.5.0",
17 | "guzzlehttp/psr7": "~1.1",
18 | "guzzlehttp/promises": "~1.0"
19 | },
20 | "require-dev": {
21 | "ext-curl": "*",
22 | "phpunit/phpunit": "~4.0",
23 | "psr/log": "~1.0"
24 | },
25 | "autoload": {
26 | "files": ["src/functions_include.php"],
27 | "psr-4": {
28 | "GuzzleHttp\\": "src/"
29 | }
30 | },
31 | "autoload-dev": {
32 | "psr-4": {
33 | "GuzzleHttp\\Tests\\": "tests/"
34 | }
35 | },
36 | "extra": {
37 | "branch-alias": {
38 | "dev-master": "6.2-dev"
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/tests/InflateStreamTest.php:
--------------------------------------------------------------------------------
1 | assertEquals('test', (string) $b);
15 | }
16 |
17 | public function testInflatesStreamsWithFilename()
18 | {
19 | $content = $this->getGzipStringWithFilename('test');
20 | $a = Psr7\stream_for($content);
21 | $b = new InflateStream($a);
22 | $this->assertEquals('test', (string) $b);
23 | }
24 |
25 | private function getGzipStringWithFilename($original_string)
26 | {
27 | $gzipped = bin2hex(gzencode($original_string));
28 |
29 | $header = substr($gzipped, 0, 20);
30 | // set FNAME flag
31 | $header[6]=0;
32 | $header[7]=8;
33 | // make a dummy filename
34 | $filename = "64756d6d7900";
35 | $rest = substr($gzipped, 20);
36 |
37 | return hex2bin($header . $filename . $rest);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/graphics.php:
--------------------------------------------------------------------------------
1 | graphics($tux);
16 | $printer -> text("Regular Tux.\n");
17 | $printer -> feed();
18 |
19 | $printer -> graphics($tux, Printer::IMG_DOUBLE_WIDTH);
20 | $printer -> text("Wide Tux.\n");
21 | $printer -> feed();
22 |
23 | $printer -> graphics($tux, Printer::IMG_DOUBLE_HEIGHT);
24 | $printer -> text("Tall Tux.\n");
25 | $printer -> feed();
26 |
27 | $printer -> graphics($tux, Printer::IMG_DOUBLE_WIDTH | Printer::IMG_DOUBLE_HEIGHT);
28 | $printer -> text("Large Tux in correct proportion.\n");
29 |
30 | $printer -> cut();
31 | } catch (Exception $e) {
32 | /* Images not supported on your PHP, or image file not found */
33 | $printer -> text($e -> getMessage() . "\n");
34 | }
35 |
36 | $printer -> close();
37 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/tests/RejectionExceptionTest.php:
--------------------------------------------------------------------------------
1 | message = $message;
11 | }
12 |
13 | public function __toString()
14 | {
15 | return $this->message;
16 | }
17 | }
18 |
19 | class Thing2 implements \JsonSerializable
20 | {
21 | public function jsonSerialize()
22 | {
23 | return '{}';
24 | }
25 | }
26 |
27 | /**
28 | * @covers GuzzleHttp\Promise\RejectionException
29 | */
30 | class RejectionExceptionTest extends \PHPUnit_Framework_TestCase
31 | {
32 | public function testCanGetReasonFromException()
33 | {
34 | $thing = new Thing1('foo');
35 | $e = new RejectionException($thing);
36 |
37 | $this->assertSame($thing, $e->getReason());
38 | $this->assertEquals('The promise was rejected with reason: foo', $e->getMessage());
39 | }
40 |
41 | public function testCanGetReasonMessageFromJson()
42 | {
43 | $reason = new Thing2();
44 | $e = new RejectionException($reason);
45 | $this->assertContains("{}", $e->getMessage());
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/DroppingStream.php:
--------------------------------------------------------------------------------
1 | stream = $stream;
23 | $this->maxLength = $maxLength;
24 | }
25 |
26 | public function write($string)
27 | {
28 | $diff = $this->maxLength - $this->stream->getSize();
29 |
30 | // Begin returning 0 when the underlying stream is too large.
31 | if ($diff <= 0) {
32 | return 0;
33 | }
34 |
35 | // Write the stream or a subset of the stream if needed.
36 | if (strlen($string) < $diff) {
37 | return $this->stream->write($string);
38 | }
39 |
40 | return $this->stream->write(substr($string, 0, $diff));
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/interface/windows-usb.php:
--------------------------------------------------------------------------------
1 | testfile
17 | * copy testfile "\\%COMPUTERNAME%\Receipt Printer"
18 | * del testfile
19 | */
20 | try {
21 | // Enter the share name for your USB printer here
22 | $connector = null;
23 | //$connector = new WindowsPrintConnector("Receipt Printer");
24 |
25 | /* Print a "Hello world" receipt" */
26 | $printer = new Printer($connector);
27 | $printer -> text("Hello World!\n");
28 | $printer -> cut();
29 |
30 | /* Close printer */
31 | $printer -> close();
32 | } catch (Exception $e) {
33 | echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/tests/NoSeekStreamTest.php:
--------------------------------------------------------------------------------
1 | getMockBuilder('Psr\Http\Message\StreamInterface')
20 | ->setMethods(['isSeekable', 'seek'])
21 | ->getMockForAbstractClass();
22 | $s->expects($this->never())->method('seek');
23 | $s->expects($this->never())->method('isSeekable');
24 | $wrapped = new NoSeekStream($s);
25 | $this->assertFalse($wrapped->isSeekable());
26 | $wrapped->seek(2);
27 | }
28 |
29 | /**
30 | * @expectedException \RuntimeException
31 | * @expectedExceptionMessage Cannot write to a non-writable stream
32 | */
33 | public function testHandlesClose()
34 | {
35 | $s = Psr7\stream_for('foo');
36 | $wrapped = new NoSeekStream($s);
37 | $wrapped->close();
38 | $wrapped->write('foo');
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/interface/linux-usb.php:
--------------------------------------------------------------------------------
1 | text("Hello World!\n");
27 | $printer -> cut();
28 |
29 | /* Close printer */
30 | $printer -> close();
31 | } catch (Exception $e) {
32 | echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/NetworkPrintConnector.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos\PrintConnectors;
14 |
15 | use Exception;
16 |
17 | /**
18 | * PrintConnector for directly opening a network socket to a printer to send it commands.
19 | */
20 | class NetworkPrintConnector extends FilePrintConnector
21 | {
22 | /**
23 | * Construct a new NetworkPrintConnector
24 | *
25 | * @param string $ip IP address or hostname to use.
26 | * @param string $port The port number to connect on.
27 | * @throws Exception Where the socket cannot be opened.
28 | */
29 | public function __construct($ip, $port = "9100")
30 | {
31 | $this -> fp = @fsockopen($ip, $port, $errno, $errstr);
32 | if ($this -> fp === false) {
33 | throw new Exception("Cannot initialise NetworkPrintConnector: " . $errstr);
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/LICENSE.md:
--------------------------------------------------------------------------------
1 | escpos-php: PHP receipt printer library for use with ESC/POS-compatible
2 | thermal and impact printers.
3 |
4 | Copyright (c) 2014-16 Michael Billington ,
5 | incorporating modifications by others. See CONTRIBUTORS.md for a full list.
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/44-pound-symbol-star-tsp650.php:
--------------------------------------------------------------------------------
1 | textRaw("\x9C"); // based on position in CP437
24 | $printer -> text(" 1.95\n");
25 |
26 | // B) Manually encoded UTF8 pound symbol. Tests that the driver correctly
27 | // encodes this as CP437.
28 | $printer -> text(base64_decode("wqM=") . " 2.95\n");
29 |
30 | // C) Pasted in file. Tests that your files are being saved as UTF-8, which
31 | // escpos-php is able to convert automatically to a mix of code pages.
32 | $printer -> text("£ 3.95\n");
33 |
34 | $printer -> cut();
35 | $printer -> close();
36 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/RejectionException.php:
--------------------------------------------------------------------------------
1 | reason = $reason;
21 |
22 | $message = 'The promise was rejected';
23 |
24 | if ($description) {
25 | $message .= ' with reason: ' . $description;
26 | } elseif (is_string($reason)
27 | || (is_object($reason) && method_exists($reason, '__toString'))
28 | ) {
29 | $message .= ' with reason: ' . $this->reason;
30 | } elseif ($reason instanceof \JsonSerializable) {
31 | $message .= ' with reason: '
32 | . json_encode($this->reason, JSON_PRETTY_PRINT);
33 | }
34 |
35 | parent::__construct($message);
36 | }
37 |
38 | /**
39 | * Returns the rejection reason.
40 | *
41 | * @return mixed
42 | */
43 | public function getReason()
44 | {
45 | return $this->reason;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/SimpleCapabilityProfile.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos\CapabilityProfiles;
14 |
15 | use Mike42\Escpos\CodePage;
16 |
17 | /**
18 | * This capability profile is designed for non-Epson printers sold online. Without knowing
19 | * their character encoding table, only CP437 output is assumed, and graphics() calls will
20 | * be disabled, as it usually prints junk on these models.
21 | */
22 | class SimpleCapabilityProfile extends DefaultCapabilityProfile
23 | {
24 | /**
25 | * Map of numbers to supported code pages.
26 | */
27 | public function getSupportedCodePages()
28 | {
29 | /* Use only CP437 output */
30 | return array(0 => CodePage::CP437);
31 | }
32 |
33 | /**
34 | * True for graphics support, false if not supported.
35 | */
36 | public function getSupportsGraphics()
37 | {
38 | /* Ask the driver to use bitImage wherever possible instead of graphics */
39 | return false;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/bit-image.php:
--------------------------------------------------------------------------------
1 | text("These example images are printed with the older\nbit image print command. You should only use\n\$p -> bitImage() if \$p -> graphics() does not\nwork on your printer.\n\n");
15 |
16 | $printer -> bitImage($tux);
17 | $printer -> text("Regular Tux (bit image).\n");
18 | $printer -> feed();
19 |
20 | $printer -> bitImage($tux, Printer::IMG_DOUBLE_WIDTH);
21 | $printer -> text("Wide Tux (bit image).\n");
22 | $printer -> feed();
23 |
24 | $printer -> bitImage($tux, Printer::IMG_DOUBLE_HEIGHT);
25 | $printer -> text("Tall Tux (bit image).\n");
26 | $printer -> feed();
27 |
28 | $printer -> bitImage($tux, Printer::IMG_DOUBLE_WIDTH | Printer::IMG_DOUBLE_HEIGHT);
29 | $printer -> text("Large Tux in correct proportion (bit image).\n");
30 | } catch (Exception $e) {
31 | /* Images not supported on your PHP, or image file not found */
32 | $printer -> text($e -> getMessage() . "\n");
33 | }
34 |
35 | $printer -> cut();
36 | $printer -> close();
37 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:
--------------------------------------------------------------------------------
1 | factory = isset($options['handle_factory'])
29 | ? $options['handle_factory']
30 | : new CurlFactory(3);
31 | }
32 |
33 | public function __invoke(RequestInterface $request, array $options)
34 | {
35 | if (isset($options['delay'])) {
36 | usleep($options['delay'] * 1000);
37 | }
38 |
39 | $easy = $this->factory->create($request, $options);
40 | curl_exec($easy->handle);
41 | $easy->errno = curl_errno($easy->handle);
42 |
43 | return CurlFactory::finish($this, $easy, $this->factory);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/PrintConnector.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos\PrintConnectors;
14 |
15 | /**
16 | * Interface passed to Escpos class for receiving print data. Print connectors
17 | * are responsible for transporting this to the actual printer.
18 | */
19 | interface PrintConnector
20 | {
21 | /**
22 | * Print connectors should cause a NOTICE if they are deconstructed
23 | * when they have not been finalized.
24 | */
25 | public function __destruct();
26 |
27 | /**
28 | * Finish using this print connector (close file, socket, send
29 | * accumulated output, etc).
30 | */
31 | public function finalize();
32 |
33 | /**
34 | * Read data from the printer.
35 | *
36 | * @param string $len Length of data to read.
37 | * @return Data read from the printer, or false where reading is not possible.
38 | */
39 | public function read($len);
40 |
41 | /**
42 | * Write data to the print connector.
43 | *
44 | * @param string $data The data to write
45 | */
46 | public function write($data);
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/test/unit/CupsPrintConnectorTest.php:
--------------------------------------------------------------------------------
1 | getMockConnector("FooPrinter", array("FooPrinter"));
10 | $connector->expects($this->once())->method('getCmdOutput')->with($this->stringContains("lp -d 'FooPrinter' "));
11 | $connector->finalize();
12 | }
13 | public function testPrinterDoesntExist()
14 | {
15 | $this -> setExpectedException('BadMethodCallException');
16 | $connector = $this->getMockConnector("FooPrinter", array("OtherPrinter"));
17 | $connector->expects($this->once())->method('getCmdOutput')->with($this->stringContains("lp -d 'FooPrinter' "));
18 | $connector->finalize();
19 | }
20 | public function testNoPrinter()
21 | {
22 | $this -> setExpectedException('BadMethodCallException');
23 | $connector = $this->getMockConnector("FooPrinter", array(""));
24 | }
25 | private function getMockConnector($path, array $printers)
26 | {
27 | $stub = $this->getMockBuilder('Mike42\Escpos\PrintConnectors\CupsPrintConnector')->setMethods(array (
28 | 'getCmdOutput',
29 | 'getLocalPrinters'
30 | ))->disableOriginalConstructor()->getMock();
31 | $stub->method('getCmdOutput')->willReturn("");
32 | $stub->method('getLocalPrinters')->willReturn($printers);
33 | $stub->__construct($path);
34 | return $stub;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/32-german-tm-t20-ii-custom-command.php:
--------------------------------------------------------------------------------
1 | getPrintConnector() -> write($cmd);
30 | $printer -> text("Beispieltext in Deutsch\n");
31 | $printer -> cut();
32 | $printer -> close();
33 | /*
34 | * Hex-dump of output confirms that ESC V 1 being sent:
35 | *
36 | * 0000000 033 @ 033 V 001 B e i s p i e l t e x
37 | * 0000010 t i n D e u t s c h \n 035 V A
38 | * 0000020 003
39 | */
40 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/test/integration/resources/output/qr-code.bin:
--------------------------------------------------------------------------------
1 | @!0QR code demo
2 | ! (k 1A2 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0Most simple example
3 |
4 | a(k 1A2 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0Same example, centred
5 | a
6 | !0Data encoding
7 | ! (k 1A2 (k 1C(k 1E0(k+ 1P00123456789012345678901234567890123456789(k 1Q0Numeric
8 |
9 | (k 1A2 (k 1C(k 1E0(k+ 1P0abcdefghijklmnopqrstuvwxyzabcdefghijklmn(k 1Q0Alphanumeric
10 |
11 | (k 1A2 (k 1C(k 1E0(k+ 1P0 (k 1Q0Binary
12 |
13 | !0Error correction
14 | ! (k 1A2 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0Error correction L
15 |
16 | (k 1A2 (k 1C(k 1E1(k 1P0Testing 123(k 1Q0Error correction M
17 |
18 | (k 1A2 (k 1C(k 1E2(k 1P0Testing 123(k 1Q0Error correction Q
19 |
20 | (k 1A2 (k 1C(k 1E3(k 1P0Testing 123(k 1Q0Error correction H
21 |
22 | !0Pixel size
23 | ! (k 1A2 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0Pixel size 1 (minimum)
24 |
25 | (k 1A2 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0Pixel size 2
26 |
27 | (k 1A2 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0Pixel size 3 (default)
28 |
29 | (k 1A2 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0Pixel size 4
30 |
31 | (k 1A2 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0Pixel size 5
32 |
33 | (k 1A2 (k 1C
34 | (k 1E0(k 1P0Testing 123(k 1Q0Pixel size 10
35 |
36 | (k 1A2 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0Pixel size 16 (maximum)
37 |
38 | !0QR model
39 | ! (k 1A1 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0QR Model 1
40 |
41 | (k 1A2 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0QR Model 2 (default)
42 |
43 | (k 1A3 (k 1C(k 1E0(k 1P0Testing 123(k 1Q0Micro QR code
44 | (not supported on all printers)
45 |
46 | VA
--------------------------------------------------------------------------------
/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorHTML.php:
--------------------------------------------------------------------------------
1 | getBarcodeData($code, $type);
22 |
23 | $html = '' . "\n";
24 |
25 | $positionHorizontal = 0;
26 | foreach ($barcodeData['bars'] as $bar) {
27 | $barWidth = round(($bar['width'] * $widthFactor), 3);
28 | $barHeight = round(($bar['height'] * $totalHeight / $barcodeData['maxHeight']), 3);
29 |
30 | if ($bar['drawBar']) {
31 | $positionVertical = round(($bar['positionVertical'] * $totalHeight / $barcodeData['maxHeight']), 3);
32 | // draw a vertical bar
33 | $html .= '
' . "\n";
34 | }
35 |
36 | $positionHorizontal += $barWidth;
37 | }
38 |
39 | $html .= '
' . "\n";
40 |
41 | return $html;
42 | }
43 | }
--------------------------------------------------------------------------------
/vendor/picqer/php-barcode-generator/tests/verified-files/0049000004632-ean13.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
38 |
--------------------------------------------------------------------------------
/vendor/picqer/php-barcode-generator/tests/verified-files/081231723897-ean13.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
38 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # CHANGELOG
2 |
3 | ## 1.3.0 - 2016-04-13
4 |
5 | * Added remaining interfaces needed for full PSR7 compatibility
6 | (ServerRequestInterface, UploadedFileInterface, etc.).
7 | * Added support for stream_for from scalars.
8 | * Can now extend Uri.
9 | * Fixed a bug in validating request methods by making it more permissive.
10 |
11 | ## 1.2.3 - 2016-02-18
12 |
13 | * Fixed support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote
14 | streams, which can sometimes return fewer bytes than requested with `fread`.
15 | * Fixed handling of gzipped responses with FNAME headers.
16 |
17 | ## 1.2.2 - 2016-01-22
18 |
19 | * Added support for URIs without any authority.
20 | * Added support for HTTP 451 'Unavailable For Legal Reasons.'
21 | * Added support for using '0' as a filename.
22 | * Added support for including non-standard ports in Host headers.
23 |
24 | ## 1.2.1 - 2015-11-02
25 |
26 | * Now supporting negative offsets when seeking to SEEK_END.
27 |
28 | ## 1.2.0 - 2015-08-15
29 |
30 | * Body as `"0"` is now properly added to a response.
31 | * Now allowing forward seeking in CachingStream.
32 | * Now properly parsing HTTP requests that contain proxy targets in
33 | `parse_request`.
34 | * functions.php is now conditionally required.
35 | * user-info is no longer dropped when resolving URIs.
36 |
37 | ## 1.1.0 - 2015-06-24
38 |
39 | * URIs can now be relative.
40 | * `multipart/form-data` headers are now overridden case-insensitively.
41 | * URI paths no longer encode the following characters because they are allowed
42 | in URIs: "(", ")", "*", "!", "'"
43 | * A port is no longer added to a URI when the scheme is missing and no port is
44 | present.
45 |
46 | ## 1.0.0 - 2015-05-19
47 |
48 | Initial release.
49 |
50 | Currently unsupported:
51 |
52 | - `Psr\Http\Message\ServerRequestInterface`
53 | - `Psr\Http\Message\UploadedFileInterface`
54 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/README.md:
--------------------------------------------------------------------------------
1 | Examples
2 | --------
3 |
4 | This folder contains a collectoion of feature examples.
5 | Generally, demo.php is the fastest way to find out which features your
6 | printer supports.
7 |
8 | ## Subfolders
9 | - `interface/` - contains examples for output interfaces: eg, parallel, serial, USB, network, file-based.
10 | - `specific/` - examples made in response to issues & questions. These cover specific languages, printers and interfaces, so hit narrower use cases.
11 |
12 | ## List of examples
13 |
14 | Each example prints to standard output, so either edit the print connector, or redirect the output to your printer to see it in action. They are designed for developers: open them in a text editor before you run them!
15 |
16 | - `bit-image.php` - Prints a images to the printer using the older "bit image" commands.
17 | - `demo.php` - Demonstrates output using a large subset of availale features.
18 | - `qr-code.php` - Prints QR codes, if your printer supports it.
19 | - `character-encodings.php` - Shows available character encodings. Change from the DefaultCapabilityProfile to get more useful output for your specific printer.
20 | - `graphics.php` - The same output as `bit-image.php`, printed with the newer graphics commands (not supported on many non-Epson printers)
21 | - `receipt-with-logo.php` - A simple receipt containing a logo and basic formating.
22 | - `character-encodings-with-images.php` - The same as `character-encodings.php`, but also prints each string using an `ImagePrintBuffer`, showing compatibility gaps.
23 | - `print-from-html.php` - Runs `wkhtmltoimage` to convert HTML to an image, and then prints the image. (This is very slow)
24 | - `character-tables.php` - Prints a compact character code table for each available character set. Used to debug incorrect output from `character-encodings.php`.
25 | - `print-from-pdf.php` - Loads a PDF and prints each page in a few different ways (very slow as well)
26 |
27 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/src/InflateStream.php:
--------------------------------------------------------------------------------
1 | read(10);
25 | $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header);
26 | // Skip the header, that is 10 + length of filename + 1 (nil) bytes
27 | $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength);
28 | $resource = StreamWrapper::getResource($stream);
29 | stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ);
30 | $this->stream = new Stream($resource);
31 | }
32 |
33 | /**
34 | * @param StreamInterface $stream
35 | * @param $header
36 | * @return int
37 | */
38 | private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)
39 | {
40 | $filename_header_length = 0;
41 |
42 | if (substr(bin2hex($header), 6, 2) === '08') {
43 | // we have a filename, read until nil
44 | $filename_header_length = 1;
45 | while ($stream->read(1) !== chr(0)) {
46 | $filename_header_length++;
47 | }
48 | }
49 |
50 | return $filename_header_length;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/text-size.php:
--------------------------------------------------------------------------------
1 |
7 | */
8 | require __DIR__ . '/../autoload.php';
9 | use Mike42\Escpos\Printer;
10 | use Mike42\Escpos\PrintConnectors\FilePrintConnector;
11 |
12 | $connector = new FilePrintConnector("php://stdout");
13 | $printer = new Printer($connector);
14 |
15 | /* Initialize */
16 | $printer -> initialize();
17 |
18 | /* Text of various (in-proportion) sizes */
19 | title($printer, "Change height & width\n");
20 | for ($i = 1; $i <= 8; $i++) {
21 | $printer -> setTextSize($i, $i);
22 | $printer -> text($i);
23 | }
24 | $printer -> text("\n");
25 |
26 | /* Width changing only */
27 | title($printer, "Change width only (height=4):\n");
28 | for ($i = 1; $i <= 8; $i++) {
29 | $printer -> setTextSize($i, 4);
30 | $printer -> text($i);
31 | }
32 | $printer -> text("\n");
33 |
34 | /* Height changing only */
35 | title($printer, "Change height only (width=4):\n");
36 | for ($i = 1; $i <= 8; $i++) {
37 | $printer -> setTextSize(4, $i);
38 | $printer -> text($i);
39 | }
40 | $printer -> text("\n");
41 |
42 | /* Very narrow text */
43 | title($printer, "Very narrow text:\n");
44 | $printer -> setTextSize(1, 8);
45 | $printer -> text("The quick brown fox jumps over the lazy dog.\n");
46 |
47 | /* Very flat text */
48 | title($printer, "Very wide text:\n");
49 | $printer -> setTextSize(4, 1);
50 | $printer -> text("Hello world!\n");
51 |
52 | /* Very large text */
53 | title($printer, "Largest possible text:\n");
54 | $printer -> setTextSize(8, 8);
55 | $printer -> text("Hello\nworld!\n");
56 |
57 | $printer -> cut();
58 | $printer -> close();
59 |
60 | function title(Printer $printer, $text)
61 | {
62 | $printer -> selectPrintMode(Printer::MODE_EMPHASIZED);
63 | $printer -> text("\n" . $text);
64 | $printer -> selectPrintMode(); // Reset
65 | }
66 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos\PrintConnectors;
14 |
15 | use Exception;
16 |
17 | /**
18 | * PrintConnector for passing print data to a file.
19 | */
20 | class FilePrintConnector implements PrintConnector
21 | {
22 | /**
23 | * @var resource $fp
24 | * The file pointer to send data to.
25 | */
26 | protected $fp;
27 |
28 | /**
29 | * Construct new connector, given a filename
30 | *
31 | * @param string $filename
32 | */
33 | public function __construct($filename)
34 | {
35 | $this -> fp = fopen($filename, "wb+");
36 | if ($this -> fp === false) {
37 | throw new Exception("Cannot initialise FilePrintConnector.");
38 | }
39 | }
40 |
41 | public function __destruct()
42 | {
43 | if ($this -> fp !== false) {
44 | trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE);
45 | }
46 | }
47 |
48 | /**
49 | * Close file pointer
50 | */
51 | public function finalize()
52 | {
53 | fclose($this -> fp);
54 | $this -> fp = false;
55 | }
56 |
57 | /* (non-PHPdoc)
58 | * @see PrintConnector::read()
59 | */
60 | public function read($len)
61 | {
62 | return fread($this -> fp, $len);
63 | }
64 |
65 | /**
66 | * Write data to the file
67 | *
68 | * @param string $data
69 | */
70 | public function write($data)
71 | {
72 | fwrite($this -> fp, $data);
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/6-arabic-epos-tep-220m.php:
--------------------------------------------------------------------------------
1 | utf8Glyphs($text);
38 |
39 | /*
40 | * Set up and use the printer
41 | */
42 | $buffer = new ImagePrintBuffer();
43 | $profile = EposTepCapabilityProfile::getInstance();
44 | $connector = new FilePrintConnector("php://output");
45 | // = WindowsPrintConnector("LPT2");
46 | // Windows LPT2 was used in the bug tracker
47 |
48 | $printer = new Printer($connector, $profile);
49 | $printer -> setPrintBuffer($buffer);
50 | $printer -> text($text . "\n");
51 | $printer -> close();
52 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/src/Mike42/Escpos/PrintConnectors/DummyPrintConnector.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos\PrintConnectors;
14 |
15 | /**
16 | * Print connector that writes to nowhere, but allows the user to retrieve the
17 | * buffered data. Used for testing.
18 | */
19 | final class DummyPrintConnector implements PrintConnector
20 | {
21 | /**
22 | * @var array $buffer
23 | * Buffer of accumilated data.
24 | */
25 | private $buffer;
26 |
27 | /**
28 | * @var string data which the printer will provide on next read
29 | */
30 | private $readData;
31 |
32 | /**
33 | * Create new print connector
34 | */
35 | public function __construct()
36 | {
37 | $this -> buffer = array();
38 | }
39 |
40 | public function __destruct()
41 | {
42 | if ($this -> buffer !== null) {
43 | trigger_error("Print connector was not finalized. Did you forget to close the printer?", E_USER_NOTICE);
44 | }
45 | }
46 |
47 | public function finalize()
48 | {
49 | $this -> buffer = null;
50 | }
51 |
52 | /**
53 | * @return string Get the accumulated data that has been sent to this buffer.
54 | */
55 | public function getData()
56 | {
57 | return implode($this -> buffer);
58 | }
59 |
60 | /**
61 | * {@inheritDoc}
62 | * @see PrintConnector::read()
63 | */
64 | public function read($len)
65 | {
66 | return $len >= strlen($this -> readData) ? $this -> readData : substr($this -> readData, 0, $len);
67 | }
68 |
69 | public function write($data)
70 | {
71 | $this -> buffer[] = $data;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/tests/LazyOpenStreamTest.php:
--------------------------------------------------------------------------------
1 | fname = tempnam('/tmp', 'tfile');
13 |
14 | if (file_exists($this->fname)) {
15 | unlink($this->fname);
16 | }
17 | }
18 |
19 | public function tearDown()
20 | {
21 | if (file_exists($this->fname)) {
22 | unlink($this->fname);
23 | }
24 | }
25 |
26 | public function testOpensLazily()
27 | {
28 | $l = new LazyOpenStream($this->fname, 'w+');
29 | $l->write('foo');
30 | $this->assertInternalType('array', $l->getMetadata());
31 | $this->assertFileExists($this->fname);
32 | $this->assertEquals('foo', file_get_contents($this->fname));
33 | $this->assertEquals('foo', (string) $l);
34 | }
35 |
36 | public function testProxiesToFile()
37 | {
38 | file_put_contents($this->fname, 'foo');
39 | $l = new LazyOpenStream($this->fname, 'r');
40 | $this->assertEquals('foo', $l->read(4));
41 | $this->assertTrue($l->eof());
42 | $this->assertEquals(3, $l->tell());
43 | $this->assertTrue($l->isReadable());
44 | $this->assertTrue($l->isSeekable());
45 | $this->assertFalse($l->isWritable());
46 | $l->seek(1);
47 | $this->assertEquals('oo', $l->getContents());
48 | $this->assertEquals('foo', (string) $l);
49 | $this->assertEquals(3, $l->getSize());
50 | $this->assertInternalType('array', $l->getMetadata());
51 | $l->close();
52 | }
53 |
54 | public function testDetachesUnderlyingStream()
55 | {
56 | file_put_contents($this->fname, 'foo');
57 | $l = new LazyOpenStream($this->fname, 'r');
58 | $r = $l->detach();
59 | $this->assertInternalType('resource', $r);
60 | fseek($r, 0);
61 | $this->assertEquals('foo', stream_get_contents($r));
62 | fclose($r);
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/tests/BufferStreamTest.php:
--------------------------------------------------------------------------------
1 | assertTrue($b->isReadable());
12 | $this->assertTrue($b->isWritable());
13 | $this->assertFalse($b->isSeekable());
14 | $this->assertEquals(null, $b->getMetadata('foo'));
15 | $this->assertEquals(10, $b->getMetadata('hwm'));
16 | $this->assertEquals([], $b->getMetadata());
17 | }
18 |
19 | public function testRemovesReadDataFromBuffer()
20 | {
21 | $b = new BufferStream();
22 | $this->assertEquals(3, $b->write('foo'));
23 | $this->assertEquals(3, $b->getSize());
24 | $this->assertFalse($b->eof());
25 | $this->assertEquals('foo', $b->read(10));
26 | $this->assertTrue($b->eof());
27 | $this->assertEquals('', $b->read(10));
28 | }
29 |
30 | /**
31 | * @expectedException \RuntimeException
32 | * @expectedExceptionMessage Cannot determine the position of a BufferStream
33 | */
34 | public function testCanCastToStringOrGetContents()
35 | {
36 | $b = new BufferStream();
37 | $b->write('foo');
38 | $b->write('baz');
39 | $this->assertEquals('foo', $b->read(3));
40 | $b->write('bar');
41 | $this->assertEquals('bazbar', (string) $b);
42 | $b->tell();
43 | }
44 |
45 | public function testDetachClearsBuffer()
46 | {
47 | $b = new BufferStream();
48 | $b->write('foo');
49 | $b->detach();
50 | $this->assertTrue($b->eof());
51 | $this->assertEquals(3, $b->write('abc'));
52 | $this->assertEquals('abc', $b->read(10));
53 | }
54 |
55 | public function testExceedingHighwaterMarkReturnsFalseButStillBuffers()
56 | {
57 | $b = new BufferStream(5);
58 | $this->assertEquals(3, $b->write('hi '));
59 | $this->assertFalse($b->write('hello'));
60 | $this->assertEquals('hi hello', (string) $b);
61 | $this->assertEquals(4, $b->write('test'));
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/FulfilledPromise.php:
--------------------------------------------------------------------------------
1 | value = $value;
22 | }
23 |
24 | public function then(
25 | callable $onFulfilled = null,
26 | callable $onRejected = null
27 | ) {
28 | // Return itself if there is no onFulfilled function.
29 | if (!$onFulfilled) {
30 | return $this;
31 | }
32 |
33 | $queue = queue();
34 | $p = new Promise([$queue, 'run']);
35 | $value = $this->value;
36 | $queue->add(static function () use ($p, $value, $onFulfilled) {
37 | if ($p->getState() === self::PENDING) {
38 | try {
39 | $p->resolve($onFulfilled($value));
40 | } catch (\Exception $e) {
41 | $p->reject($e);
42 | }
43 | }
44 | });
45 |
46 | return $p;
47 | }
48 |
49 | public function otherwise(callable $onRejected)
50 | {
51 | return $this->then(null, $onRejected);
52 | }
53 |
54 | public function wait($unwrap = true, $defaultDelivery = null)
55 | {
56 | return $unwrap ? $this->value : null;
57 | }
58 |
59 | public function getState()
60 | {
61 | return self::FULFILLED;
62 | }
63 |
64 | public function resolve($value)
65 | {
66 | if ($value !== $this->value) {
67 | throw new \LogicException("Cannot resolve a fulfilled promise");
68 | }
69 | }
70 |
71 | public function reject($reason)
72 | {
73 | throw new \LogicException("Cannot reject a fulfilled promise");
74 | }
75 |
76 | public function cancel()
77 | {
78 | // pass
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:
--------------------------------------------------------------------------------
1 | sessionKey = $sessionKey;
26 | $this->storeSessionCookies = $storeSessionCookies;
27 | $this->load();
28 | }
29 |
30 | /**
31 | * Saves cookies to session when shutting down
32 | */
33 | public function __destruct()
34 | {
35 | $this->save();
36 | }
37 |
38 | /**
39 | * Save cookies to the client session
40 | */
41 | public function save()
42 | {
43 | $json = [];
44 | foreach ($this as $cookie) {
45 | /** @var SetCookie $cookie */
46 | if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
47 | $json[] = $cookie->toArray();
48 | }
49 | }
50 |
51 | $_SESSION[$this->sessionKey] = json_encode($json);
52 | }
53 |
54 | /**
55 | * Load the contents of the client session into the data array
56 | */
57 | protected function load()
58 | {
59 | $cookieJar = isset($_SESSION[$this->sessionKey])
60 | ? $_SESSION[$this->sessionKey]
61 | : null;
62 |
63 | $data = json_decode($cookieJar, true);
64 | if (is_array($data)) {
65 | foreach ($data as $cookie) {
66 | $this->setCookie(new SetCookie($cookie));
67 | }
68 | } elseif (strlen($data)) {
69 | throw new \RuntimeException("Invalid cookie data");
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/PrintBuffer.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos\PrintBuffers;
14 |
15 | use Mike42\Escpos\Printer;
16 |
17 | /**
18 | * Print buffers manage newlines and character encoding for the target printer.
19 | * They are used as a swappable component: text or image-based output.
20 | *
21 | * - Text output (EscposPrintBuffer) is the fast default, and is recommended for
22 | * most people, as the text output can be more directly manipulated by ESC/POS
23 | * commands.
24 | * - Image output (ImagePrintBuffer) is designed to accept more encodings than the
25 | * physical printer supports, by rendering the text to small images on-the-fly.
26 | * This takes a lot more CPU than sending text, but is necessary for some users.
27 | * - If your use case fits outside these, then a further speed/flexibility trade-off
28 | * can be made by printing directly from generated HTML or PDF.
29 | */
30 | interface PrintBuffer
31 | {
32 | /**
33 | * Cause the buffer to send any partial input and wait on a newline.
34 | * If the printer is already on a new line, this does nothing.
35 | */
36 | public function flush();
37 |
38 | /**
39 | * Used by Escpos to check if a printer is set.
40 | */
41 | public function getPrinter();
42 |
43 | /**
44 | * Used by Escpos to hook up one-to-one link between buffers and printers.
45 | *
46 | * @param Escpos $printer New printer
47 | */
48 | public function setPrinter(Printer $printer = null);
49 |
50 | /**
51 | * Accept UTF-8 text for printing.
52 | *
53 | * @param string $text Text to print
54 | */
55 | public function writeText($text);
56 |
57 | /**
58 | * Accept 8-bit text in the current encoding and add it to the buffer.
59 | *
60 | * @param string $text Text to print, already the target encoding.
61 | */
62 | public function writeTextRaw($text);
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_static.php:
--------------------------------------------------------------------------------
1 | __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
11 | 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
12 | '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
13 | );
14 |
15 | public static $prefixLengthsPsr4 = array (
16 | 'P' =>
17 | array (
18 | 'Psr\\Http\\Message\\' => 17,
19 | 'Picqer\\Barcode\\' => 15,
20 | ),
21 | 'M' =>
22 | array (
23 | 'Mike42\\' => 7,
24 | ),
25 | 'G' =>
26 | array (
27 | 'GuzzleHttp\\Psr7\\' => 16,
28 | 'GuzzleHttp\\Promise\\' => 19,
29 | 'GuzzleHttp\\' => 11,
30 | ),
31 | );
32 |
33 | public static $prefixDirsPsr4 = array (
34 | 'Psr\\Http\\Message\\' =>
35 | array (
36 | 0 => __DIR__ . '/..' . '/psr/http-message/src',
37 | ),
38 | 'Picqer\\Barcode\\' =>
39 | array (
40 | 0 => __DIR__ . '/..' . '/picqer/php-barcode-generator/src',
41 | ),
42 | 'Mike42\\' =>
43 | array (
44 | 0 => __DIR__ . '/..' . '/mike42/escpos-php/src/Mike42',
45 | ),
46 | 'GuzzleHttp\\Psr7\\' =>
47 | array (
48 | 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
49 | ),
50 | 'GuzzleHttp\\Promise\\' =>
51 | array (
52 | 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
53 | ),
54 | 'GuzzleHttp\\' =>
55 | array (
56 | 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
57 | ),
58 | );
59 |
60 | public static function getInitializer(ClassLoader $loader)
61 | {
62 | return \Closure::bind(function () use ($loader) {
63 | $loader->prefixLengthsPsr4 = ComposerStaticInit5119da44ce688a720e1d799e9f57b770::$prefixLengthsPsr4;
64 | $loader->prefixDirsPsr4 = ComposerStaticInit5119da44ce688a720e1d799e9f57b770::$prefixDirsPsr4;
65 |
66 | }, null, ClassLoader::class);
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorSVG.php:
--------------------------------------------------------------------------------
1 | getBarcodeData($code, $type);
22 |
23 | // replace table for special characters
24 | $repstr = array("\0" => '', '&' => '&', '<' => '<', '>' => '>');
25 |
26 | $svg = '' . "\n";
27 | $svg .= '' . "\n";
28 | $svg .= '' . "\n";
46 |
47 | return $svg;
48 | }
49 | }
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/specific/54-gfx-sidebyside.php:
--------------------------------------------------------------------------------
1 | setJustification(Printer::JUSTIFY_CENTER);
51 | $printer -> graphics($img);
52 | $printer -> cut();
53 | } finally {
54 | // Always close the connection
55 | $printer -> close();
56 | }
57 | } catch (Exception $e) {
58 | // Print out any errors: Eg. printer connection, image loading & external image manipulation.
59 | echo $e -> getMessage() . "\n";
60 | echo $e -> getTraceAsString();
61 | } finally {
62 | unlink($imgCombined_path);
63 | unlink($tmpf_path);
64 | }
65 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/RejectedPromise.php:
--------------------------------------------------------------------------------
1 | reason = $reason;
22 | }
23 |
24 | public function then(
25 | callable $onFulfilled = null,
26 | callable $onRejected = null
27 | ) {
28 | // If there's no onRejected callback then just return self.
29 | if (!$onRejected) {
30 | return $this;
31 | }
32 |
33 | $queue = queue();
34 | $reason = $this->reason;
35 | $p = new Promise([$queue, 'run']);
36 | $queue->add(static function () use ($p, $reason, $onRejected) {
37 | if ($p->getState() === self::PENDING) {
38 | try {
39 | // Return a resolved promise if onRejected does not throw.
40 | $p->resolve($onRejected($reason));
41 | } catch (\Exception $e) {
42 | // onRejected threw, so return a rejected promise.
43 | $p->reject($e);
44 | }
45 | }
46 | });
47 |
48 | return $p;
49 | }
50 |
51 | public function otherwise(callable $onRejected)
52 | {
53 | return $this->then(null, $onRejected);
54 | }
55 |
56 | public function wait($unwrap = true, $defaultDelivery = null)
57 | {
58 | if ($unwrap) {
59 | throw exception_for($this->reason);
60 | }
61 | }
62 |
63 | public function getState()
64 | {
65 | return self::REJECTED;
66 | }
67 |
68 | public function resolve($value)
69 | {
70 | throw new \LogicException("Cannot resolve a rejected promise");
71 | }
72 |
73 | public function reject($reason)
74 | {
75 | if ($reason !== $this->reason) {
76 | throw new \LogicException("Cannot reject a rejected promise");
77 | }
78 | }
79 |
80 | public function cancel()
81 | {
82 | // pass
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/interface/smb.php:
--------------------------------------------------------------------------------
1 | testfile
19 | * ## If you need authentication, use "net use" to hook up the printer:
20 | * # net use "\\computername\Receipt Printer" /user:Guest
21 | * # net use "\\computername\Receipt Printer" /user:Bob secret
22 | * # net use "\\computername\Receipt Printer" /user:workgroup\Bob secret
23 | * copy testfile "\\computername\Receipt Printer"
24 | * del testfile
25 | *
26 | * GNU/Linux:
27 | * # No authentication
28 | * echo "Hello World" | smbclient "//computername/Receipt Printer" -c "print -" -N
29 | * # Guest login
30 | * echo "Hello World" | smbclient "//computername/Receipt Printer" -U Guest -c "print -" -N
31 | * # Basic username/password
32 | * echo "Hello World" | smbclient "//computername/Receipt Printer" secret -U "Bob" -c "print -"
33 | * # Including domain name
34 | * echo "Hello World" | smbclient "//computername/Receipt Printer" secret -U "workgroup\\Bob" -c "print -"
35 | */
36 | try {
37 | // Enter the share name for your printer here, as a smb:// url format
38 | $connector = new WindowsPrintConnector("smb://computername/Receipt Printer");
39 | //$connector = new WindowsPrintConnector("smb://Guest@computername/Receipt Printer");
40 | //$connector = new WindowsPrintConnector("smb://FooUser:secret@computername/workgroup/Receipt Printer");
41 | //$connector = new WindowsPrintConnector("smb://User:secret@computername/Receipt Printer");
42 |
43 | /* Print a "Hello world" receipt" */
44 | $printer = new Printer($connector);
45 | $printer -> text("Hello World!\n");
46 | $printer -> cut();
47 |
48 | /* Close printer */
49 | $printer -> close();
50 | } catch (Exception $e) {
51 | echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/tests/PumpStreamTest.php:
--------------------------------------------------------------------------------
1 | ['foo' => 'bar'],
14 | 'size' => 100
15 | ]);
16 |
17 | $this->assertEquals('bar', $p->getMetadata('foo'));
18 | $this->assertEquals(['foo' => 'bar'], $p->getMetadata());
19 | $this->assertEquals(100, $p->getSize());
20 | }
21 |
22 | public function testCanReadFromCallable()
23 | {
24 | $p = Psr7\stream_for(function ($size) {
25 | return 'a';
26 | });
27 | $this->assertEquals('a', $p->read(1));
28 | $this->assertEquals(1, $p->tell());
29 | $this->assertEquals('aaaaa', $p->read(5));
30 | $this->assertEquals(6, $p->tell());
31 | }
32 |
33 | public function testStoresExcessDataInBuffer()
34 | {
35 | $called = [];
36 | $p = Psr7\stream_for(function ($size) use (&$called) {
37 | $called[] = $size;
38 | return 'abcdef';
39 | });
40 | $this->assertEquals('a', $p->read(1));
41 | $this->assertEquals('b', $p->read(1));
42 | $this->assertEquals('cdef', $p->read(4));
43 | $this->assertEquals('abcdefabc', $p->read(9));
44 | $this->assertEquals([1, 9, 3], $called);
45 | }
46 |
47 | public function testInifiniteStreamWrappedInLimitStream()
48 | {
49 | $p = Psr7\stream_for(function () { return 'a'; });
50 | $s = new LimitStream($p, 5);
51 | $this->assertEquals('aaaaa', (string) $s);
52 | }
53 |
54 | public function testDescribesCapabilities()
55 | {
56 | $p = Psr7\stream_for(function () {});
57 | $this->assertTrue($p->isReadable());
58 | $this->assertFalse($p->isSeekable());
59 | $this->assertFalse($p->isWritable());
60 | $this->assertNull($p->getSize());
61 | $this->assertEquals('', $p->getContents());
62 | $this->assertEquals('', (string) $p);
63 | $p->close();
64 | $this->assertEquals('', $p->read(10));
65 | $this->assertTrue($p->eof());
66 |
67 | try {
68 | $this->assertFalse($p->write('aa'));
69 | $this->fail();
70 | } catch (\RuntimeException $e) {}
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/TaskQueue.php:
--------------------------------------------------------------------------------
1 | run();
12 | */
13 | class TaskQueue
14 | {
15 | private $enableShutdown = true;
16 | private $queue = [];
17 |
18 | public function __construct($withShutdown = true)
19 | {
20 | if ($withShutdown) {
21 | register_shutdown_function(function () {
22 | if ($this->enableShutdown) {
23 | // Only run the tasks if an E_ERROR didn't occur.
24 | $err = error_get_last();
25 | if (!$err || ($err['type'] ^ E_ERROR)) {
26 | $this->run();
27 | }
28 | }
29 | });
30 | }
31 | }
32 |
33 | /**
34 | * Returns true if the queue is empty.
35 | *
36 | * @return bool
37 | */
38 | public function isEmpty()
39 | {
40 | return !$this->queue;
41 | }
42 |
43 | /**
44 | * Adds a task to the queue that will be executed the next time run is
45 | * called.
46 | *
47 | * @param callable $task
48 | */
49 | public function add(callable $task)
50 | {
51 | $this->queue[] = $task;
52 | }
53 |
54 | /**
55 | * Execute all of the pending task in the queue.
56 | */
57 | public function run()
58 | {
59 | /** @var callable $task */
60 | while ($task = array_shift($this->queue)) {
61 | $task();
62 | }
63 | }
64 |
65 | /**
66 | * The task queue will be run and exhausted by default when the process
67 | * exits IFF the exit is not the result of a PHP E_ERROR error.
68 | *
69 | * You can disable running the automatic shutdown of the queue by calling
70 | * this function. If you disable the task queue shutdown process, then you
71 | * MUST either run the task queue (as a result of running your event loop
72 | * or manually using the run() method) or wait on each outstanding promise.
73 | *
74 | * Note: This shutdown will occur before any destructors are triggered.
75 | */
76 | public function disableShutdown()
77 | {
78 | $this->enableShutdown = false;
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_real.php:
--------------------------------------------------------------------------------
1 | = 50600 && !defined('HHVM_VERSION');
27 | if ($useStaticLoader) {
28 | require_once __DIR__ . '/autoload_static.php';
29 |
30 | call_user_func(\Composer\Autoload\ComposerStaticInit5119da44ce688a720e1d799e9f57b770::getInitializer($loader));
31 | } else {
32 | $map = require __DIR__ . '/autoload_namespaces.php';
33 | foreach ($map as $namespace => $path) {
34 | $loader->set($namespace, $path);
35 | }
36 |
37 | $map = require __DIR__ . '/autoload_psr4.php';
38 | foreach ($map as $namespace => $path) {
39 | $loader->setPsr4($namespace, $path);
40 | }
41 |
42 | $classMap = require __DIR__ . '/autoload_classmap.php';
43 | if ($classMap) {
44 | $loader->addClassMap($classMap);
45 | }
46 | }
47 |
48 | $loader->register(true);
49 |
50 | if ($useStaticLoader) {
51 | $includeFiles = Composer\Autoload\ComposerStaticInit5119da44ce688a720e1d799e9f57b770::$files;
52 | } else {
53 | $includeFiles = require __DIR__ . '/autoload_files.php';
54 | }
55 | foreach ($includeFiles as $fileIdentifier => $file) {
56 | composerRequire5119da44ce688a720e1d799e9f57b770($fileIdentifier, $file);
57 | }
58 |
59 | return $loader;
60 | }
61 | }
62 |
63 | function composerRequire5119da44ce688a720e1d799e9f57b770($fileIdentifier, $file)
64 | {
65 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66 | require $file;
67 |
68 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/resources/character-encoding-test-strings.inc:
--------------------------------------------------------------------------------
1 | "Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Wolther spillede på xylofon.\n",
7 | "German" => "Falsches Üben von Xylophonmusik quält jeden größeren Zwerg.\n",
8 | "Greek" => "Ξεσκεπάζω την ψυχοφθόρα βδελυγμία\n",
9 | "English" => "The quick brown fox jumps over the lazy dog.\n",
10 | "Spanish" => "El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.\n",
11 | "French" => "Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en canoë au delà des îles, près du mälström où brûlent les novæ.\n",
12 | "Irish Gaelic" => "D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh.\n",
13 | "Hungarian" => "Árvíztűrő tükörfúrógép.\n",
14 | "Icelandic" => "Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa.\n",
15 | "Latvian" => "Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus.\n",
16 | "Polish" => "Pchnąć w tę łódź jeża lub ośm skrzyń fig.\n",
17 | "Russian" => "В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!\n",
18 | "Turkish" => "Pijamalı hasta, yağız şoföre çabucak güvendi.\n",
19 | "Japanese (Katakana half-width)" => implode("\n", array("イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム", "ウイノオクヤマ ケフコエテ アサキユメミシ エヒモセスン")) . "\n"
20 | );
21 |
22 | /*
23 | * These strings are not expected to print correctly, if at all, even on an Epson printer. This is due to a mix of
24 | * escpos driver, printer, and PHP language support issues.
25 | *
26 | * They are included here as a collection of things not yet implemented.
27 | */
28 | $inputsNotOk = array(
29 | "Thai (No character encoder available)" => "นายสังฆภัณฑ์ เฮงพิทักษ์ฝั่ง ผู้เฒ่าซึ่งมีอาชีพเป็นฅนขายฃวด ถูกตำรวจปฏิบัติการจับฟ้องศาล ฐานลักนาฬิกาคุณหญิงฉัตรชฎา ฌานสมาธิ\n",
30 | "Japanese (Hiragana)" => implode("\n", array("いろはにほへとちりぬるを", " わかよたれそつねならむ", "うゐのおくやまけふこえて", "あさきゆめみしゑひもせす")) . "\n",
31 | "Japanese (Katakana full-width)" => implode("\n", array("イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム", "ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン")) . "\n",
32 | "Arabic (RTL not supported, encoding issues)" => "صِف خَلقَ خَودِ كَمِثلِ الشَمسِ إِذ بَزَغَت — يَحظى الضَجيعُ بِها نَجلاءَ مِعطارِ" . "\n",
33 | "Hebrew (RTL not supported, line break issues)" => "דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה" . "\n"
34 | );
35 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/src/Mike42/Escpos/CapabilityProfiles/AbstractCapabilityProfile.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos\CapabilityProfiles;
14 |
15 | /**
16 | * Not all printers support the same subset of available Esc/POS commands. Profiles allow you to specify
17 | * which features are available on your printer, so that Escpos is less likely to send unsupported commands.
18 | */
19 | abstract class AbstractCapabilityProfile
20 | {
21 | /**
22 | * Sub-classes must be retrieved via getInstance(), so that validation
23 | * can be attached to guarantee that dud profiles are not used on an Escpos object.
24 | */
25 | final protected function __construct()
26 | {
27 | // This space intentionally left blank.
28 | }
29 |
30 | /**
31 | * If getSupportedCodePages contains custom code pages, their character maps must be provided here.
32 | */
33 | abstract public function getCustomCodePages();
34 |
35 | /**
36 | * Return a map of code page numbers to names for this printer. Names
37 | * should match iconv code page names where possible (non-matching names will not be used).
38 | */
39 | abstract public function getSupportedCodePages();
40 |
41 | /**
42 | * True to support barcode "function b", false to use only function A.
43 | */
44 | abstract public function getSupportsBarcodeB();
45 |
46 | /**
47 | * True for bitImage support, false for no bitImage support.
48 | */
49 | abstract public function getSupportsBitImage();
50 |
51 | /**
52 | * True for graphics support, false for no graphics support.
53 | */
54 | abstract public function getSupportsGraphics();
55 |
56 | /**
57 | * True for 'STAR original' commands, false for standard ESC/POS only.
58 | */
59 | abstract public function getSupportsStarCommands();
60 |
61 | /**
62 | * True if the printer renders its own QR codes, false to send an image.
63 | */
64 | abstract public function getSupportsQrCode();
65 |
66 | /**
67 | * @return AbstractCapabilityProfile Instance of sub-class.
68 | */
69 | final public static function getInstance()
70 | {
71 | static $profile = array();
72 | $context = get_called_class();
73 | if (!isset($profile[$context])) {
74 | $profile[$context] = new static();
75 | }
76 | return $profile[$context];
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/character-encodings-with-images.php:
--------------------------------------------------------------------------------
1 | selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_EMPHASIZED | Printer::MODE_DOUBLE_WIDTH);
30 | $printer -> text("Implemented languages\n");
31 | $printer -> selectPrintMode();
32 | foreach ($inputsOk as $label => $str) {
33 | $printer -> setEmphasis(true);
34 | $printer -> text($label . ":\n");
35 | $printer -> setEmphasis(false);
36 | foreach ($buffers as $buffer) {
37 | $printer -> setPrintBuffer($buffer);
38 | $printer -> text($str);
39 | }
40 | $printer -> setPrintBuffer($buffers[0]);
41 | }
42 | $printer -> feed();
43 |
44 | $printer -> selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_EMPHASIZED | Printer::MODE_DOUBLE_WIDTH);
45 | $printer -> text("Works in progress\n");
46 | $printer -> selectPrintMode();
47 | foreach ($inputsNotOk as $label => $str) {
48 | $printer -> setEmphasis(true);
49 | $printer -> text($label . ":\n");
50 | $printer -> setEmphasis(false);
51 | foreach ($buffers as $buffer) {
52 | $printer -> setPrintBuffer($buffer);
53 | $printer -> text($str);
54 | }
55 | $printer -> setPrintBuffer($buffers[0]);
56 | }
57 | $printer -> cut();
58 |
59 | /* Close printer */
60 | $printer -> close();
61 | } catch (Exception $e) {
62 | echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/qr-code.php:
--------------------------------------------------------------------------------
1 | qrCode($testStr);
14 | $printer -> text("Most simple example\n");
15 | $printer -> feed();
16 |
17 | // Demo that alignment is the same as text
18 | $printer -> setJustification(Printer::JUSTIFY_CENTER);
19 | $printer -> qrCode($testStr);
20 | $printer -> text("Same example, centred\n");
21 | $printer -> setJustification();
22 | $printer -> feed();
23 |
24 | // Demo of numeric data being packed more densly
25 | title($printer, "Data encoding\n");
26 | $test = array(
27 | "Numeric" => "0123456789012345678901234567890123456789",
28 | "Alphanumeric" => "abcdefghijklmnopqrstuvwxyzabcdefghijklmn",
29 | "Binary" => str_repeat("\0", 40));
30 | foreach ($test as $type => $data) {
31 | $printer -> qrCode($data);
32 | $printer -> text("$type\n");
33 | $printer -> feed();
34 | }
35 |
36 | // Demo of error correction
37 | title($printer, "Error correction\n");
38 | $ec = array(
39 | Printer::QR_ECLEVEL_L => "L",
40 | Printer::QR_ECLEVEL_M => "M",
41 | Printer::QR_ECLEVEL_Q => "Q",
42 | Printer::QR_ECLEVEL_H => "H");
43 | foreach ($ec as $level => $name) {
44 | $printer -> qrCode($testStr, $level);
45 | $printer -> text("Error correction $name\n");
46 | $printer -> feed();
47 | }
48 |
49 | // Change size
50 | title($printer, "Pixel size\n");
51 | $sizes = array(
52 | 1 => "(minimum)",
53 | 2 => "",
54 | 3 => "(default)",
55 | 4 => "",
56 | 5 => "",
57 | 10 => "",
58 | 16 => "(maximum)");
59 | foreach ($sizes as $size => $label) {
60 | $printer -> qrCode($testStr, Printer::QR_ECLEVEL_L, $size);
61 | $printer -> text("Pixel size $size $label\n");
62 | $printer -> feed();
63 | }
64 |
65 | // Change model
66 | title($printer, "QR model\n");
67 | $models = array(
68 | Printer::QR_MODEL_1 => "QR Model 1",
69 | Printer::QR_MODEL_2 => "QR Model 2 (default)",
70 | Printer::QR_MICRO => "Micro QR code\n(not supported on all printers)");
71 | foreach ($models as $model => $name) {
72 | $printer -> qrCode($testStr, Printer::QR_ECLEVEL_L, 3, $model);
73 | $printer -> text("$name\n");
74 | $printer -> feed();
75 | }
76 |
77 | // Cut & close
78 | $printer -> cut();
79 | $printer -> close();
80 |
81 | function title(Printer $printer, $str)
82 | {
83 | $printer -> selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_DOUBLE_WIDTH);
84 | $printer -> text($str);
85 | $printer -> selectPrintMode();
86 | }
87 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/character-encodings.php:
--------------------------------------------------------------------------------
1 | selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_EMPHASIZED | Printer::MODE_DOUBLE_WIDTH);
35 | $printer -> text("Implemented languages\n");
36 | $printer -> selectPrintMode();
37 | foreach ($inputsOk as $label => $str) {
38 | $printer -> setEmphasis(true);
39 | $printer -> text($label . ":\n");
40 | $printer -> setEmphasis(false);
41 | $printer -> text($str);
42 | }
43 | $printer -> feed();
44 |
45 | $printer -> selectPrintMode(Printer::MODE_DOUBLE_HEIGHT | Printer::MODE_EMPHASIZED | Printer::MODE_DOUBLE_WIDTH);
46 | $printer -> text("Works in progress\n");
47 | $printer -> selectPrintMode();
48 | foreach ($inputsNotOk as $label => $str) {
49 | $printer -> setEmphasis(true);
50 | $printer -> text($label . ":\n");
51 | $printer -> setEmphasis(false);
52 | $printer -> text($str);
53 | }
54 | $printer -> cut();
55 |
56 | /* Close printer */
57 | $printer -> close();
58 | } catch (Exception $e) {
59 | echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
60 | }
61 |
--------------------------------------------------------------------------------
/vendor/psr/http-message/src/ResponseInterface.php:
--------------------------------------------------------------------------------
1 | text("€ 9,95\n");
16 | $printer -> text("£ 9.95\n");
17 | $printer -> text("$ 9.95\n");
18 | $printer -> text("¥ 9.95\n");
19 | $printer -> cut();
20 | $printer -> close();
21 |
22 | /* Option 2: Image-based output (formatting not available using this output). */
23 | $buffer = new ImagePrintBuffer();
24 | $connector = new FilePrintConnector("php://stdout");
25 | $printer = new Printer($connector, $profile);
26 | $printer -> setPrintBuffer($buffer);
27 | $printer -> text("€ 9,95\n");
28 | $printer -> text("£ 9.95\n");
29 | $printer -> text("$ 9.95\n");
30 | $printer -> text("¥ 9.95\n");
31 | $printer -> cut();
32 | $printer -> close();
33 |
34 | /*
35 | Option 3: If the printer is configured to print in a specific code
36 | page, you can set up a CapabilityProfile which either references its
37 | iconv encoding name, or includes all of the available characters.
38 |
39 | Here, we make use of CP858 for its inclusion of currency symbols which
40 | are not available in CP437. CP858 has good printer support, but is not
41 | included in all iconv builds.
42 | */
43 | class CustomCapabilityProfile extends SimpleCapabilityProfile
44 | {
45 | function getCustomCodePages()
46 | {
47 | /*
48 | * Example to print in a specific, user-defined character set
49 | * on a printer which has been configured to use i
50 | */
51 | return array(
52 | 'CP858' => "ÇüéâäàåçêëèïîìÄÅ" .
53 | "ÉæÆôöòûùÿÖÜø£Ø×ƒ" .
54 | "áíóúñѪº¿®¬½¼¡«»" .
55 | "░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐" .
56 | "└┴┬├─┼ãÃ╚╔╩╦╠═╬¤" .
57 | "ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀" .
58 | "ÓßÔÒõÕµþÞÚÛÙýݯ´" .
59 | " ±‗¾¶§÷¸°¨·¹³²■ ");
60 | }
61 |
62 | function getSupportedCodePages()
63 | {
64 | return array(
65 | 0 => 'custom:CP858');
66 | }
67 | }
68 |
69 | $connector = new FilePrintConnector("php://stdout");
70 | $profile = CustomCapabilityProfile::getInstance();
71 | $printer = new Printer($connector, $profile);
72 | $printer -> text("€ 9,95\n");
73 | $printer -> text("£ 9.95\n");
74 | $printer -> text("$ 9.95\n");
75 | $printer -> text("¥ 9.95\n");
76 |
77 | $printer -> cut();
78 | $printer -> close();
79 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/psr7/tests/FnStreamTest.php:
--------------------------------------------------------------------------------
1 | seek(1);
19 | }
20 |
21 | public function testProxiesToFunction()
22 | {
23 | $s = new FnStream([
24 | 'read' => function ($len) {
25 | $this->assertEquals(3, $len);
26 | return 'foo';
27 | }
28 | ]);
29 |
30 | $this->assertEquals('foo', $s->read(3));
31 | }
32 |
33 | public function testCanCloseOnDestruct()
34 | {
35 | $called = false;
36 | $s = new FnStream([
37 | 'close' => function () use (&$called) {
38 | $called = true;
39 | }
40 | ]);
41 | unset($s);
42 | $this->assertTrue($called);
43 | }
44 |
45 | public function testDoesNotRequireClose()
46 | {
47 | $s = new FnStream([]);
48 | unset($s);
49 | }
50 |
51 | public function testDecoratesStream()
52 | {
53 | $a = Psr7\stream_for('foo');
54 | $b = FnStream::decorate($a, []);
55 | $this->assertEquals(3, $b->getSize());
56 | $this->assertEquals($b->isWritable(), true);
57 | $this->assertEquals($b->isReadable(), true);
58 | $this->assertEquals($b->isSeekable(), true);
59 | $this->assertEquals($b->read(3), 'foo');
60 | $this->assertEquals($b->tell(), 3);
61 | $this->assertEquals($a->tell(), 3);
62 | $this->assertSame('', $a->read(1));
63 | $this->assertEquals($b->eof(), true);
64 | $this->assertEquals($a->eof(), true);
65 | $b->seek(0);
66 | $this->assertEquals('foo', (string) $b);
67 | $b->seek(0);
68 | $this->assertEquals('foo', $b->getContents());
69 | $this->assertEquals($a->getMetadata(), $b->getMetadata());
70 | $b->seek(0, SEEK_END);
71 | $b->write('bar');
72 | $this->assertEquals('foobar', (string) $b);
73 | $this->assertInternalType('resource', $b->detach());
74 | $b->close();
75 | }
76 |
77 | public function testDecoratesWithCustomizations()
78 | {
79 | $called = false;
80 | $a = Psr7\stream_for('foo');
81 | $b = FnStream::decorate($a, [
82 | 'read' => function ($len) use (&$called, $a) {
83 | $called = true;
84 | return $a->read($len);
85 | }
86 | ]);
87 | $this->assertEquals('foo', $b->read(3));
88 | $this->assertTrue($called);
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/vendor/picqer/php-barcode-generator/Readme.md:
--------------------------------------------------------------------------------
1 | # PHP Barcode Generator [](https://travis-ci.org/picqer/php-barcode-generator) [](https://packagist.org/packages/picqer/php-barcode-generator)
2 | This is an easy to use, non-bloated, framework independent, barcode generator in PHP.
3 |
4 | It creates SVG, PNG, JPG and HTML images, from the most used 1D barcode standards.
5 |
6 | *The codebase is largely from the [TCPDF barcode generator](https://github.com/tecnickcom/TCPDF) by Nicola Asuni. This code is therefor licensed under LGPLv3. It is still a bit of a mess, bit I will clean it in the future. I do not expect the interface of this class will change during the clean ups.*
7 |
8 | ## Installation
9 | Install through [composer](https://getcomposer.org/doc/00-intro.md):
10 |
11 | ```
12 | composer require picqer/php-barcode-generator
13 | ```
14 |
15 | ## Usage
16 | Initiate the barcode generator for the output you want, then call the ->getBarcode() routine as many times as you want.
17 |
18 | ```php
19 | $generator = new Picqer\Barcode\BarcodeGeneratorHTML();
20 | echo $generator->getBarcode('081231723897', $generator::TYPE_CODE_128);
21 | ```
22 |
23 | The ->getBarcode() routine accepts the following:
24 | - $code Data for the barcode
25 | - $type Type of barcode, use the constants defined in the class
26 | - $widthFactor Width is based on the length of the data, with this factor you can make the barcode bars wider then default
27 | - $totalHeight The total height of the barcode
28 | - $color Hex code of the foreground color
29 |
30 | ## Image types
31 | ```php
32 | $generatorSVG = new Picqer\Barcode\BarcodeGeneratorSVG();
33 | $generatorPNG = new Picqer\Barcode\BarcodeGeneratorPNG();
34 | $generatorJPG = new Picqer\Barcode\BarcodeGeneratorJPG();
35 | $generatorHTML = new Picqer\Barcode\BarcodeGeneratorHTML();
36 | ```
37 |
38 | ## Accepted types
39 | - TYPE_CODE_39
40 | - TYPE_CODE_39_CHECKSUM
41 | - TYPE_CODE_39E
42 | - TYPE_CODE_39E_CHECKSUM
43 | - TYPE_CODE_93
44 | - TYPE_STANDARD_2_5
45 | - TYPE_STANDARD_2_5_CHECKSUM
46 | - TYPE_INTERLEAVED_2_5
47 | - TYPE_INTERLEAVED_2_5_CHECKSUM
48 | - TYPE_CODE_128
49 | - TYPE_CODE_128_A
50 | - TYPE_CODE_128_B
51 | - TYPE_CODE_128_C
52 | - TYPE_EAN_2
53 | - TYPE_EAN_5
54 | - TYPE_EAN_8
55 | - TYPE_EAN_13
56 | - TYPE_UPC_A
57 | - TYPE_UPC_E
58 | - TYPE_MSI
59 | - TYPE_MSI_CHECKSUM
60 | - TYPE_POSTNET
61 | - TYPE_PLANET
62 | - TYPE_RMS4CC
63 | - TYPE_KIX
64 | - TYPE_IMB
65 | - TYPE_CODABAR
66 | - TYPE_CODE_11
67 | - TYPE_PHARMA_CODE
68 | - TYPE_PHARMA_CODE_TWO_TRACKS
69 |
70 | ## Examples
71 | Embedded PNG image in HTML:
72 |
73 | ```php
74 | $generator = new \Picqer\Barcode\BarcodeGeneratorPNG();
75 | echo '
';
76 | ```
77 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/example/print-from-pdf.php:
--------------------------------------------------------------------------------
1 | graphics($page);
22 | }
23 | $printer -> cut();
24 | } catch (Exception $e) {
25 | /*
26 | * loadPdf() throws exceptions if files or not found, or you don't have the
27 | * imagick extension to read PDF's
28 | */
29 | echo $e -> getMessage() . "\n";
30 | } finally {
31 | $printer -> close();
32 | }
33 |
34 |
35 | /*
36 | * 2: Speed up printing by roughly halving the resolution, and printing double-size.
37 | * This gives a 75% speed increase at the expense of some quality.
38 | *
39 | * Reduce the page width further if necessary: if it extends past the printing area, your prints will be very slow.
40 | */
41 | $connector = new FilePrintConnector("php://stdout");
42 | $printer = new Printer($connector);
43 | $pdf = 'resources/document.pdf';
44 | $pages = ImagickEscposImage::loadPdf($pdf, 260);
45 | foreach ($pages as $page) {
46 | $printer -> graphics($page, Printer::IMG_DOUBLE_HEIGHT | Printer::IMG_DOUBLE_WIDTH);
47 | }
48 | $printer -> cut();
49 | $printer -> close();
50 |
51 | /*
52 | * 3: PDF printing still too slow? If you regularly print the same files, serialize & compress your
53 | * EscposImage objects (after printing[1]), instead of throwing them away.
54 | *
55 | * (You can also do this to print logos on computers which don't have an
56 | * image processing library, by preparing a serialized version of your logo on your PC)
57 | *
58 | * [1]After printing, the pixels are loaded and formatted for the print command you used, so even a raspberry pi can print complex PDF's quickly.
59 | */
60 | $connector = new FilePrintConnector("php://stdout");
61 | $printer = new Printer($connector);
62 | $pdf = 'resources/document.pdf';
63 | $ser = 'resources/document.z';
64 | if (!file_exists($ser)) {
65 | $pages = ImagickEscposImage::loadPdf($pdf);
66 | } else {
67 | $pages = unserialize(gzuncompress(file_get_contents($ser)));
68 | }
69 |
70 | foreach ($pages as $page) {
71 | $printer -> graphics($page);
72 | }
73 | $printer -> cut();
74 | $printer -> close();
75 |
76 | if (!file_exists($ser)) {
77 | file_put_contents($ser, gzcompress(serialize($pages)));
78 | }
79 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:
--------------------------------------------------------------------------------
1 | filename = $cookieFile;
27 | $this->storeSessionCookies = $storeSessionCookies;
28 |
29 | if (file_exists($cookieFile)) {
30 | $this->load($cookieFile);
31 | }
32 | }
33 |
34 | /**
35 | * Saves the file when shutting down
36 | */
37 | public function __destruct()
38 | {
39 | $this->save($this->filename);
40 | }
41 |
42 | /**
43 | * Saves the cookies to a file.
44 | *
45 | * @param string $filename File to save
46 | * @throws \RuntimeException if the file cannot be found or created
47 | */
48 | public function save($filename)
49 | {
50 | $json = [];
51 | foreach ($this as $cookie) {
52 | /** @var SetCookie $cookie */
53 | if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
54 | $json[] = $cookie->toArray();
55 | }
56 | }
57 |
58 | $jsonStr = \GuzzleHttp\json_encode($json);
59 | if (false === file_put_contents($filename, $jsonStr)) {
60 | throw new \RuntimeException("Unable to save file {$filename}");
61 | }
62 | }
63 |
64 | /**
65 | * Load cookies from a JSON formatted file.
66 | *
67 | * Old cookies are kept unless overwritten by newly loaded ones.
68 | *
69 | * @param string $filename Cookie file to load.
70 | * @throws \RuntimeException if the file cannot be loaded.
71 | */
72 | public function load($filename)
73 | {
74 | $json = file_get_contents($filename);
75 | if (false === $json) {
76 | throw new \RuntimeException("Unable to load file {$filename}");
77 | } elseif ($json === '') {
78 | return;
79 | }
80 |
81 | $data = \GuzzleHttp\json_decode($json, true);
82 | if (is_array($data)) {
83 | foreach (json_decode($json, true) as $cookie) {
84 | $this->setCookie(new SetCookie($cookie));
85 | }
86 | } elseif (strlen($data)) {
87 | throw new \RuntimeException("Invalid cookie file: {$filename}");
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php:
--------------------------------------------------------------------------------
1 | 225 below) and printing w/ Escpos::IMG_DOUBLE_WIDTH | Escpos::IMG_DOUBLE_HEIGHT
25 | */
26 | try {
27 | /* Set up command */
28 | $source = __DIR__ . "/resources/document.html";
29 | $width = 550;
30 | $dest = tempnam(sys_get_temp_dir(), 'escpos') . ".png";
31 | $command = sprintf(
32 | "xvfb-run wkhtmltoimage -n -q --width %s %s %s",
33 | escapeshellarg($width),
34 | escapeshellarg($source),
35 | escapeshellarg($dest)
36 | );
37 |
38 | /* Test for dependencies */
39 | foreach (array("xvfb-run", "wkhtmltoimage") as $cmd) {
40 | $testCmd = sprintf("which %s", escapeshellarg($cmd));
41 | exec($testCmd, $testOut, $testStatus);
42 | if ($testStatus != 0) {
43 | throw new Exception("You require $cmd but it could not be found");
44 | }
45 | }
46 |
47 |
48 | /* Run wkhtmltoimage */
49 | $descriptors = array(
50 | 1 => array("pipe", "w"),
51 | 2 => array("pipe", "w"),
52 | );
53 | $process = proc_open($command, $descriptors, $fd);
54 | if (is_resource($process)) {
55 | /* Read stdout */
56 | $outputStr = stream_get_contents($fd[1]);
57 | fclose($fd[1]);
58 | /* Read stderr */
59 | $errorStr = stream_get_contents($fd[2]);
60 | fclose($fd[2]);
61 | /* Finish up */
62 | $retval = proc_close($process);
63 | if ($retval != 0) {
64 | throw new Exception("Command $cmd failed: $outputStr $errorStr");
65 | }
66 | } else {
67 | throw new Exception("Command '$cmd' failed to start.");
68 | }
69 |
70 | /* Load up the image */
71 | try {
72 | $img = new EscposImage($dest);
73 | } catch (Exception $e) {
74 | unlink($dest);
75 | throw $e;
76 | }
77 | unlink($dest);
78 |
79 | /* Print it */
80 | $printer -> bitImage($img); // bitImage() seems to allow larger images than graphics() on the TM-T20. bitImageColumnFormat() is another option.
81 | $printer -> cut();
82 | } catch (Exception $e) {
83 | echo $e -> getMessage();
84 | } finally {
85 | $printer -> close();
86 | }
87 |
--------------------------------------------------------------------------------
/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorJPG.php:
--------------------------------------------------------------------------------
1 | getBarcodeData($code, $type);
22 |
23 | // calculate image size
24 | $width = ($barcodeData['maxWidth'] * $widthFactor);
25 | $height = $totalHeight;
26 |
27 | if (function_exists('imagecreate')) {
28 | // GD library
29 | $imagick = false;
30 | $jpg = imagecreate($width, $height);
31 | $colorBackground = imagecolorallocate($jpg, 255, 255, 255);
32 | imagecolortransparent($jpg, $colorBackground);
33 | $colorForeground = imagecolorallocate($jpg, $color[0], $color[1], $color[2]);
34 | } elseif (extension_loaded('imagick')) {
35 | $imagick = true;
36 | $colorForeground = new \imagickpixel('rgb(' . $color[0] . ',' . $color[1] . ',' . $color[2] . ')');
37 | $jpg = new \Imagick();
38 | $jpg->newImage($width, $height, 'none', 'jpg');
39 | $imageMagickObject = new \imagickdraw();
40 | $imageMagickObject->setFillColor($colorForeground);
41 | } else {
42 | return false;
43 | }
44 |
45 | // print bars
46 | $positionHorizontal = 0;
47 | foreach ($barcodeData['bars'] as $bar) {
48 | $bw = round(($bar['width'] * $widthFactor), 3);
49 | $bh = round(($bar['height'] * $totalHeight / $barcodeData['maxHeight']), 3);
50 | if ($bar['drawBar']) {
51 | $y = round(($bar['positionVertical'] * $totalHeight / $barcodeData['maxHeight']), 3);
52 | // draw a vertical bar
53 | if ($imagick && isset($imageMagickObject)) {
54 | $imageMagickObject->rectangle($positionHorizontal, $y, ($positionHorizontal + $bw), ($y + $bh));
55 | } else {
56 | imagefilledrectangle($jpg, $positionHorizontal, $y, ($positionHorizontal + $bw) - 1, ($y + $bh),
57 | $colorForeground);
58 | }
59 | }
60 | $positionHorizontal += $bw;
61 | }
62 | ob_start();
63 | if ($imagick && isset($imageMagickObject)) {
64 | $jpg->drawImage($imageMagickObject);
65 | echo $jpg;
66 | } else {
67 | imagejpeg($jpg);
68 | imagedestroy($jpg);
69 | }
70 | $image = ob_get_clean();
71 |
72 | return $image;
73 | }
74 | }
--------------------------------------------------------------------------------
/vendor/picqer/php-barcode-generator/src/BarcodeGeneratorPNG.php:
--------------------------------------------------------------------------------
1 | getBarcodeData($code, $type);
22 |
23 | // calculate image size
24 | $width = ($barcodeData['maxWidth'] * $widthFactor);
25 | $height = $totalHeight;
26 |
27 | if (function_exists('imagecreate')) {
28 | // GD library
29 | $imagick = false;
30 | $png = imagecreate($width, $height);
31 | $colorBackground = imagecolorallocate($png, 255, 255, 255);
32 | imagecolortransparent($png, $colorBackground);
33 | $colorForeground = imagecolorallocate($png, $color[0], $color[1], $color[2]);
34 | } elseif (extension_loaded('imagick')) {
35 | $imagick = true;
36 | $colorForeground = new \imagickpixel('rgb(' . $color[0] . ',' . $color[1] . ',' . $color[2] . ')');
37 | $png = new \Imagick();
38 | $png->newImage($width, $height, 'none', 'png');
39 | $imageMagickObject = new \imagickdraw();
40 | $imageMagickObject->setFillColor($colorForeground);
41 | } else {
42 | return false;
43 | }
44 |
45 | // print bars
46 | $positionHorizontal = 0;
47 | foreach ($barcodeData['bars'] as $bar) {
48 | $bw = round(($bar['width'] * $widthFactor), 3);
49 | $bh = round(($bar['height'] * $totalHeight / $barcodeData['maxHeight']), 3);
50 | if ($bar['drawBar']) {
51 | $y = round(($bar['positionVertical'] * $totalHeight / $barcodeData['maxHeight']), 3);
52 | // draw a vertical bar
53 | if ($imagick && isset($imageMagickObject)) {
54 | $imageMagickObject->rectangle($positionHorizontal, $y, ($positionHorizontal + $bw), ($y + $bh));
55 | } else {
56 | imagefilledrectangle($png, $positionHorizontal, $y, ($positionHorizontal + $bw) - 1, ($y + $bh),
57 | $colorForeground);
58 | }
59 | }
60 | $positionHorizontal += $bw;
61 | }
62 | ob_start();
63 | if ($imagick && isset($imageMagickObject)) {
64 | $png->drawImage($imageMagickObject);
65 | echo $png;
66 | } else {
67 | imagepng($png);
68 | imagedestroy($png);
69 | }
70 | $image = ob_get_clean();
71 |
72 | return $image;
73 | }
74 | }
--------------------------------------------------------------------------------
/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php:
--------------------------------------------------------------------------------
1 | headers)) {
48 | throw new \RuntimeException('No headers have been received');
49 | }
50 |
51 | // HTTP-version SP status-code SP reason-phrase
52 | $startLine = explode(' ', array_shift($this->headers), 3);
53 | $headers = \GuzzleHttp\headers_from_lines($this->headers);
54 | $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
55 |
56 | if (!empty($this->options['decode_content'])
57 | && isset($normalizedKeys['content-encoding'])
58 | ) {
59 | $headers['x-encoded-content-encoding']
60 | = $headers[$normalizedKeys['content-encoding']];
61 | unset($headers[$normalizedKeys['content-encoding']]);
62 | if (isset($normalizedKeys['content-length'])) {
63 | $headers['x-encoded-content-length']
64 | = $headers[$normalizedKeys['content-length']];
65 |
66 | $bodyLength = (int) $this->sink->getSize();
67 | if ($bodyLength) {
68 | $headers[$normalizedKeys['content-length']] = $bodyLength;
69 | } else {
70 | unset($headers[$normalizedKeys['content-length']]);
71 | }
72 | }
73 | }
74 |
75 | // Attach a response to the easy handle with the parsed headers.
76 | $this->response = new Response(
77 | $startLine[1],
78 | $headers,
79 | $this->sink,
80 | substr($startLine[0], 5),
81 | isset($startLine[2]) ? (string) $startLine[2] : null
82 | );
83 | }
84 |
85 | public function __get($name)
86 | {
87 | $msg = $name === 'handle'
88 | ? 'The EasyHandle has been released'
89 | : 'Invalid property: ' . $name;
90 | throw new \BadMethodCallException($msg);
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/vendor/guzzlehttp/promises/src/PromiseInterface.php:
--------------------------------------------------------------------------------
1 | getSupportedCodePages();
30 | $first = true; // Print larger table for first code-page.
31 | foreach ($codePages as $table => $name) {
32 | /* Change printer code page */
33 | $printer -> selectCharacterTable(255);
34 | $printer -> selectCharacterTable($table);
35 | /* Select & print a label for it */
36 | $label = $name;
37 | if ($name === false) {
38 | $label= " (not matched to iconv table)";
39 | }
40 | $printer -> setEmphasis(true);
41 | $printer -> textRaw("Table $table: $label\n");
42 | $printer -> setEmphasis(false);
43 | if ($name === false && !$verbose) {
44 | continue; // Skip non-recognised
45 | }
46 | /* Print a table of available characters (first table is larger than subsequent ones */
47 | if ($first) {
48 | $first = false;
49 | compactCharTable($printer, 1, true);
50 | } else {
51 | compactCharTable($printer);
52 | }
53 | }
54 | $printer -> cut();
55 | $printer -> close();
56 |
57 | function compactCharTable($printer, $start = 4, $header = false)
58 | {
59 | /* Output a compact character table for the current encoding */
60 | $chars = str_repeat(' ', 256);
61 | for ($i = 0; $i < 255; $i++) {
62 | $chars[$i] = ($i > 32 && $i != 127) ? chr($i) : ' ';
63 | }
64 | if ($header) {
65 | $printer -> setEmphasis(true);
66 | $printer -> textRaw(" 0123456789ABCDEF0123456789ABCDEF\n");
67 | $printer -> setEmphasis(false);
68 | }
69 | for ($y = $start; $y < 8; $y++) {
70 | $printer -> setEmphasis(true);
71 | $printer -> textRaw(strtoupper(dechex($y * 2)) . " ");
72 | $printer -> setEmphasis(false);
73 | $printer -> textRaw(substr($chars, $y * 32, 32) . "\n");
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/src/Mike42/Escpos/GdEscposImage.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos;
14 |
15 | use Mike42\Escpos\EscposImage;
16 | use Exception;
17 |
18 | /**
19 | * Implementation of EscposImage using the GD PHP plugin.
20 | */
21 | class GdEscposImage extends EscposImage
22 | {
23 | /**
24 | * Load an image from disk, into memory, using GD.
25 | *
26 | * @param string $filename The filename to load from
27 | * @throws Exception if the image format is not supported,
28 | * or the file cannot be opened.
29 | */
30 | protected function loadImageData($filename = null)
31 | {
32 | if ($filename === null) {
33 | /* Set to blank image */
34 | return parent::loadImageData($filename);
35 | }
36 |
37 | $ext = pathinfo($filename, PATHINFO_EXTENSION);
38 | switch ($ext) {
39 | case "png":
40 | $im = @imagecreatefrompng($filename);
41 | break;
42 | case "jpg":
43 | $im = @imagecreatefromjpeg($filename);
44 | break;
45 | case "gif":
46 | $im = @imagecreatefromgif($filename);
47 | break;
48 | default:
49 | throw new Exception("Image format not supported in GD");
50 | }
51 | $this -> readImageFromGdResource($im);
52 | }
53 |
54 | /**
55 | * Load actual image pixels from GD resource.
56 | *
57 | * @param resource $im GD resource to use
58 | * @throws Exception Where the image can't be read.
59 | */
60 | public function readImageFromGdResource($im)
61 | {
62 | if (!is_resource($im)) {
63 | throw new Exception("Failed to load image.");
64 | } elseif (!EscposImage::isGdLoaded()) {
65 | throw new Exception(__FUNCTION__ . " requires 'gd' extension.");
66 | }
67 | /* Make a string of 1's and 0's */
68 | $imgHeight = imagesy($im);
69 | $imgWidth = imagesx($im);
70 | $imgData = str_repeat("\0", $imgHeight * $imgWidth);
71 | for ($y = 0; $y < $imgHeight; $y++) {
72 | for ($x = 0; $x < $imgWidth; $x++) {
73 | /* Faster to average channels, blend alpha and negate the image here than via filters (tested!) */
74 | $cols = imagecolorsforindex($im, imagecolorat($im, $x, $y));
75 | // 1 for white, 0 for black, ignoring transparency
76 | $greyness = (int)(($cols['red'] + $cols['green'] + $cols['blue']) / 3) >> 7;
77 | // 1 for black, 0 for white, taking into account transparency
78 | $black = (1 - $greyness) >> ($cols['alpha'] >> 6);
79 | $imgData[$y * $imgWidth + $x] = $black;
80 | }
81 | }
82 | $this -> setImgWidth($imgWidth);
83 | $this -> setImgHeight($imgHeight);
84 | $this -> setImgData($imgData);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/src/Mike42/Escpos/PrintBuffers/ImagePrintBuffer.php:
--------------------------------------------------------------------------------
1 | ,
7 | * incorporating modifications by others. See CONTRIBUTORS.md for a full list.
8 | *
9 | * This software is distributed under the terms of the MIT license. See LICENSE.md
10 | * for details.
11 | */
12 |
13 | namespace Mike42\Escpos\PrintBuffers;
14 |
15 | use Exception;
16 | use LogicException;
17 | use Mike42\Escpos\Printer;
18 | use Mike42\Escpos\EscposImage;
19 |
20 | /**
21 | * This class renders text to small images on-the-fly. It attempts to mimic the
22 | * behaviour of text output, whilst supporting any fonts & character encodings
23 | * which your system can handle. This class currently requires Imagick.
24 | */
25 | class ImagePrintBuffer implements PrintBuffer
26 | {
27 | private $printer;
28 |
29 | public function __construct()
30 | {
31 | if (!EscposImage::isImagickLoaded()) {
32 | throw new Exception("ImagePrintBuffer requires the imagick extension");
33 | }
34 | }
35 |
36 | public function flush()
37 | {
38 | if ($this -> printer == null) {
39 | throw new LogicException("Not attached to a printer.");
40 | }
41 | }
42 |
43 | public function getPrinter()
44 | {
45 | return $this -> printer;
46 | }
47 |
48 | public function setPrinter(Printer $printer = null)
49 | {
50 | $this -> printer = $printer;
51 | }
52 |
53 | public function writeText($text)
54 | {
55 | if ($this -> printer == null) {
56 | throw new LogicException("Not attached to a printer.");
57 | }
58 | if ($text == null) {
59 | return;
60 | }
61 | $text = trim($text, "\n");
62 | /* Create Imagick objects */
63 | $image = new \Imagick();
64 | $draw = new \ImagickDraw();
65 | $color = new \ImagickPixel('#000000');
66 | $background = new \ImagickPixel('white');
67 |
68 | /* Create annotation */
69 | //$draw -> setFont('Arial');// (not necessary?)
70 | $draw -> setFontSize(24); // Size 21 looks good for FONT B
71 | $draw -> setFillColor($color);
72 | $draw -> setStrokeAntialias(true);
73 | $draw -> setTextAntialias(true);
74 | $metrics = $image -> queryFontMetrics($draw, $text);
75 | $draw -> annotation(0, $metrics['ascender'], $text);
76 |
77 | /* Create image & draw annotation on it */
78 | $image -> newImage($metrics['textWidth'], $metrics['textHeight'], $background);
79 | $image -> setImageFormat('png');
80 | $image -> drawImage($draw);
81 | //$image -> writeImage("test.png");
82 |
83 | /* Save image */
84 | $escposImage = new EscposImage();
85 | $escposImage -> readImageFromImagick($image);
86 | $size = Printer::IMG_DEFAULT;
87 | $this -> printer -> bitImage($escposImage, $size);
88 | }
89 |
90 | public function writeTextRaw($text)
91 | {
92 | if ($this -> printer == null) {
93 | throw new LogicException("Not attached to a printer.");
94 | }
95 | $this -> printer -> getPrintConnector() -> write($data);
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/vendor/mike42/escpos-php/test/integration/resources/output/barcode.bin:
--------------------------------------------------------------------------------
1 | @!0Height and bar width
2 | ! Default look
3 | kEABC
4 | Height 1
5 | hkEABC
6 | Height 2
7 | hkEABC
8 | Height 4
9 | hkEABC
10 | Height 8
11 | hkEABC
12 | Height 16
13 | hkEABC
14 | Height 32
15 | h kEABC
16 | Width 1
17 | wkEABC
18 | Width 2
19 | wkEABC
20 | Width 3
21 | wkEABC
22 | Width 4
23 | wkEABC
24 | Width 5
25 | wkEABC
26 | Width 6
27 | wkEABC
28 | Width 7
29 | wkEABC
30 | Width 8
31 | wkEABC
32 | h(w!0Text position
33 | ! No text
34 | H kC012345678901
35 | Above
36 | HkC012345678901
37 | Below
38 | HkC012345678901
39 | Both
40 | HkC012345678901
41 | H!0UPC-A
42 | ! Fixed-length numeric product barcodes.
43 |
44 | E12 char numeric including (wrong) check digit.
45 | E Content: 012345678901
46 | kA012345678901
47 | ESend 11 chars to add check digit automatically.
48 | E Content: 01234567890
49 | kA01234567890
50 | !0UPC-E
51 | ! Fixed-length numeric compact product barcodes.
52 |
53 | E6 char numeric - auto check digit & NSC
54 | E Content: 123456
55 | kB123456
56 | E7 char numeric - auto check digit
57 | E Content: 0123456
58 | kB0123456
59 | E8 char numeric
60 | E Content: 01234567
61 | kB01234567
62 | E11 char numeric - auto check digit
63 | E Content: 01234567890
64 | kB01234567890
65 | E12 char numeric including (wrong) check digit
66 | E Content: 012345678901
67 | kB012345678901
68 | !0JAN13/EAN13
69 | ! Fixed-length numeric barcodes.
70 |
71 | E12 char numeric - auto check digit
72 | E Content: 012345678901
73 | kC012345678901
74 | E13 char numeric including (wrong) check digit
75 | E Content: 0123456789012
76 | kC
0123456789012
77 | !0JAN8/EAN8
78 | ! Fixed-length numeric barcodes.
79 |
80 | E7 char numeric - auto check digit
81 | E Content: 0123456
82 | kD0123456
83 | E8 char numeric including (wrong) check digit
84 | E Content: 01234567
85 | kD01234567
86 | !0Code39
87 | ! Variable length alphanumeric w/ some special chars.
88 |
89 | EText, numbers, spaces
90 | E Content: ABC 012
91 | kEABC 012
92 | ESpecial characters
93 | E Content: $%+-./
94 | kE$%+-./
95 | EExtra char (*) Used as start/stop
96 | E Content: *TEXT*
97 | kE*TEXT*
98 | !0ITF
99 | ! Variable length numeric w/even number of digits,
100 | as they are encoded in pairs.
101 |
102 | ENumeric- even number of digits
103 | E Content: 0123456789
104 | kF
105 | 0123456789
106 | !0Codabar
107 | ! Varaible length numeric with some allowable
108 | extra characters. ABCD/abcd must be used as
109 | start/stop characters (one at the start, one
110 | at the end) to distinguish between barcode
111 | applications.
112 |
113 | ENumeric w/ A A start/stop.
114 | E Content: A012345A
115 | kGA012345A
116 | EExtra allowable characters
117 | E Content: A012$+-./:A
118 | kGA012$+-./:A
119 | !0Code93
120 | ! Variable length- any ASCII is available
121 |
122 | EText
123 | E Content: 012abcd
124 | kH012abcd
125 | !0Code128
126 | ! Variable length- any ASCII is available
127 |
128 | ECode set A uppercase & symbols
129 | E Content: {A012ABCD
130 | kI {A012ABCD
131 | ECode set B general text
132 | E Content: {B012ABCDabcd
133 | kI
{B012ABCDabcd
134 | ECode set C compact numbers
135 | Sending chr(21) chr(32) chr(43)
136 | E Content: {C? +
137 | kI{C +
138 | VA
--------------------------------------------------------------------------------