<?php require '../vendor/autoload.php'; use EuMatheusGomes\Barcode\InterleavedTwoOfFive; if (isset($_POST) && count($_POST) == 6) { $itf = new InterleavedTwoOfFive($_POST['narrow'], $_POST['wide'], $_POST['height']); if ($_POST['bar'] != '' && $_POST['space']) { $itf->setImages(['bar' => $_POST['bar'], 'space' => $_POST['space']]); } $barcode = $itf->render($_POST['number']); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Interleaved Two of Five</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <br> <div class="panel panel-default"> <div class="panel-body"> <form method="post">
<?php require '../vendor/autoload.php'; use EuMatheusGomes\Barcode\InterleavedTwoOfFive; use EuMatheusGomes\Febraban\Boleto\Bradesco; use EuMatheusGomes\Febraban\Boleto\Sacado; use EuMatheusGomes\Febraban\Boleto\Cedente; $itf = new InterleavedTwoOfFive(); $itf->setImages(['bar' => 'img/bar.png', 'space' => 'img/space.png']); $sacado = new Sacado(); $sacado->setNome('Consectetur Adipisicing Elit')->setEndereco('Tempor Incididunt Ut Labore')->setCidade('Nostrud Exercitation')->setUf('AZ')->setCep('99999-999')->setCpfCnpj('999.999.999-99'); $cedente = new Cedente(); $cedente->setNome('Consectetur Adipisicing Elit')->setCpfCnpj('999.999.999-99'); $bradesco = new Bradesco($itf); $bradesco->setBanco(Bradesco::CODIGO_BANCO)->setMoeda('9')->setCarteira('09')->setAgencia('999')->setAgenciaDv('9')->setConta('9999')->setContaDv('9')->setVencimento(date('Y-m-d', strtotime('+9 days')))->setValor('999.99')->setDataDocumento(date('Y-m-d'))->setNumeroDocumento('99999999')->setEspecieDoc('DM')->setEspecie('R$')->setAceite('N')->setDataProcessamento(date('Y-m-d'))->setNossoNumero('00000009999')->setDemonstrativo(['Ut enim ad minim veniam', 'Cillum dolore eu fugiat nulla pariatur', '', 'Excepteur sint occaecat cupidatat non'])->setInstrucoes(['Sunt in culpa qui officia deserunt mollit', 'Exercitation ullamco laboris nisi dolore eu fugiat nulla pariatur', '', 'Quis nostrud ut aliquip ex ea commodo consequat velit esse'])->setSacado($sacado)->setCedente($cedente); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bradesco</title> <style type="text/css"> table { font-family: sans-serif; width: 100% } td { line-height: 1; font-size: 14px; padding: 2px; }