PHP code example of nataniel / bsxprinter

1. Go to this page and download the library: Download nataniel/bsxprinter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nataniel / bsxprinter example snippets


use Nataniel\BsxPrinter;

$receipt = new BsxPrinter\Receipt($id, 'ZS-12345');
$receipt->setNIP('5422485927');
$receipt->addItem('Osadnicy z Catanu', 99, 1, 23)
         ->addItem('Dobble', 59.95, 2, 23);
echo $receipt->toXML()->asXml();

$export = new BsxPrinter\Export();
$export->addReceipt($receipt);
echo $export->toXML()->asXml();