PHP code example of reginaldoas / nfse

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

    

reginaldoas / nfse example snippets


use Reginaldoas\Nfse\Common\Danfe;

$xml = file_get_contents('nfse-autorizada.xml');
$danfe = new Danfe($xml);
$pdf = $danfe->render(); // ou passe a logo: $danfe->render(__DIR__.'/logo.jpg');

file_put_contents('danfse.pdf', $pdf);