PHP code example of arleyoliveira / extrato-cfe

1. Go to this page and download the library: Download arleyoliveira/extrato-cfe 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/ */

    

arleyoliveira / extrato-cfe example snippets


use ArleyOliveira\CFe\Extrato;

$xml = __DIR__ . 'path_to_xml';

$logo = __DIR__ . 'path_to_logo';


$infoConsultaAplicativo = "Informação para consulta do QrCode via aplicativo utilizado no estado";

$extrato = new Extrato($xml, $logo, $infoConsultaAplicativo);

//Obtêm extrato em HTML
$html = $extrato->html();

//Obtêm extrato em PDF 
$pdf = $extrato->pdf();

//Realiza download do extrato em PDF
$extrato->pdf(true);