--- id: brazilfiscalreport version: "1.0.1" license: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) license_treatment: agpl maintenance: active --- # BrazilFiscalReport — Python library for generating Brazilian auxiliary fiscal documents in PDF from XML documents. License: agpl · Maintenance: active · Downloads: 85.5K/mo ## What it is and what it does BrazilFiscalReport is a Python library that transforms authorized Brazilian electronic invoice XML files into the official printable PDF documents required by Brazilian tax law. It handles four main document types—DANFE (goods invoice), DACTE (freight bill), DAMDFE (cargo manifest), and DANFSe (service invoice)—plus the DACCe correction-letter event. The library is built on fpdf2 and requires no external tools like wkhtmltopdf or headless browsers. The package provides three usage patterns: a Python API for programmatic control, a command-line tool (bfrep) for batch processing, and an online demo. It supports customization of issuer logos, margins, fonts, decimal precision, and watermarks. The library is actively maintained, supports Python 3.8 through 3.13, and carries no known security vulnerabilities. Use it for: - Generate DANFE PDFs from NF-e XML in ERP systems to print and attach to shipments - Batch-convert fiscal XML documents to PDFs for archival or compliance reporting - Customize fiscal document appearance with company logos and specific margin/font settings - Integrate fiscal document generation into web applications via the Python API - Process correction-letter events (CC-e) and output DACCe PDFs for tax adjustments ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts Brazilian electronic invoice XML files (NF-e, CT-e, MDF-e, NFS-e) into official printable PDF documents (DANFE, DACTE, DAMDFE, DANFSe) and generates correction-letter PDFs (DACCe). Yes, if you work with Brazilian electronic invoicing. The library solves a specific, regulated problem with low install friction, active maintenance, and no security issues. LGPL-3.0 licensing is permissive for most use cases. The Beta status and optional extras warrant verification of production readiness for your specific document types before deployment. ## Install pip install brazilfiscalreport uv add brazilfiscalreport poetry add brazilfiscalreport ## Installing BrazilFiscalReport Before you install: Low friction install with pure-Python dependencies (fpdf2, phonenumbers, python-barcode). Active maintenance with recent releases; last commit 2026-08-14. Tested across Python 3.8 through 3.13. License in practice: Licensed under LGPL-3.0, which permits commercial use and modification provided derivative works remain under the same license and source code is made available. Suitable for proprietary applications that link to the library. Quickstart: from brazilfiscalreport.danfe import Danfe with open('nfe.xml', 'r', encoding='utf8') as file: xml_content = file.read() danfe = Danfe(xml=xml_content) danfe.output('danfe.pdf') Requires authorized XML from SEFAZ (Brazilian tax authority) after invoice approval; raw XML alone is insufficient. Verify before relying: - Whether optional extras (dacte, damdfe, danfse, cli) are production-ready or still experimental given Beta status - Performance characteristics when processing large batches of fiscal documents - Compliance with current SEFAZ specifications and any recent regulatory changes ## Package facts - License: GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) (agpl) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 85.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags brazilian fiscal document pdf generation, nf-e danfe xml to pdf, brazilian invoice pdf converter, sefaz fiscal document renderer, ct-e dacte pdf from xml, mdf-e damdfe generator, nfs-e danfse pdf output, brazil-fiscal, pdf-generation, xml-processing [View on SkillFed](https://skillfed.io/packages/brazilfiscalreport) · [View on PyPI](https://pypi.org/project/brazilfiscalreport/)