michaeld555/nfe-parser is a Laravel package for a simple library to create fiscal danfe files.
It currently has 0 GitHub stars and 43 downloads on Packagist (latest version v1.0.3).
Install it with composer require michaeld555/nfe-parser.
Discover more Laravel packages by michaeld555
or browse all Laravel packages to compare alternatives.
Last updated
Run this composer command in your application:
composer require michaeld555/nfe-parser
You can create a Danfe instance and pass the xml file path and output danfe file path. This will generate your document and save in your passed path.
use Michaeld555\Danfe;
Danfe::simple('path_to_file/nfe.xml', 'path_to_file/danfe.pdf');
if (file_exists('path_to_file/danfe.pdf')) {
echo "the file was generated successfully";
} else {
echo "an error occurred during the file generation";
}
If you want to add your logo to the document, you can use the custom method passing the logo path.
Danfe::custom('path_to_file/nfe.xml', 'path_to_file/danfe.pdf', 'path_to_logo/logo.png');