-
Notifications
You must be signed in to change notification settings - Fork 215
Impressão do MDFe
Leonardo Gregianin edited this page Feb 25, 2025
·
1 revision
Instale a dependência da impressão do documentos fiscal:
pip install 'pynfe[impressao]'
ou diretamente:
pip install 'brazilfiscalreport[damdfe]'
from brazilfiscalreport.damdfe import Damdfe
# Path to the XML file
xml_file_path = 'damdfe.xml'
# Load XML Content
with open(xml_file_path, "r", encoding="utf8") as file:
xml_content = file.read()
# Instantiate the DAMDFE object with the loaded XML content
damdfe = Damdfe(xml=xml_content)
# Save the generated PDF to a file
damdfe.output('damdfe.pdf')