PHP code example of leongrdic / pdf417-hub3

1. Go to this page and download the library: Download leongrdic/pdf417-hub3 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/ */

    

leongrdic / pdf417-hub3 example snippets


$data = new \Le\PaymentBarcodeGenerator\Data(
    payer: new \Le\PaymentBarcodeGenerator\Party(
        name: 'Marko Markić',
        address: 'Zagrebačka cesta 1',
        city: 'Zagreb',
    ),
    payee: new \Le\PaymentBarcodeGenerator\Party(
        name: 'Tvrtka d.o.o.',
        address: 'Zagrebačka avenija 1', 
        city: 'Zagreb',
    ),
    iban: 'HR1234567890123456789',
    currency: 'EUR',
    amount: 999, // 9.99
    model: 'HR00',
    reference: '123-4567',
    code: 'COST',
    description: 'Uplata',
);

$generator = new \Le\PaymentBarcodeGenerator\Generator(
    pdf417: new \Le\PDF417\PDF417(),
    renderer: new \Le\PDF417\Renderer\SvgRenderer([
        'color' => 'black',
        'scale' => 5,
    ]),
);

$generator->render($data);