LaravelPackages.net
Acme Inc.
Toggle sidebar
michaeld555/nfe-parser

A simple library to create fiscal danfe files

43
0
v1.0.3
About michaeld555/nfe-parser

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

DANFE File Generator

Installation

Run this composer command in your application:

composer require michaeld555/nfe-parser

Using

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');

Notes:

  • If you are using a linux system, make sure you have python3 and the package brazilfiscalreport installed on your system, and that your application is enabled to execute customs python scripts

Star History Chart