From 7f465e12151f73245a3ea2f45a46ee8704f9e7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B4nio=20Neto?= Date: Fri, 3 May 2024 15:49:51 -0300 Subject: [PATCH] update readme --- README.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bd3c51a..aa91878 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,27 @@ danfe.output('danfe.pdf') ``` ### DACCe -TODO +```python +from brazilfiscalreport.dacce import DaCCe + +# Path to the XML file +xml_file_path = 'cce.xml' + +# Load XML Content +with open(xml_file_path, "r", encoding="utf8") as file: + xml_content = file.read() + +# Instantiate the CC-e PDF object with the loaded XML content +cce = DaCCe(xml=xml_content) + +# Save the generated PDF to a file +cce.output('cce.pdf') +``` + +## Samples -## Demostration +Some sample PDFs generated by our unit tests are available for viewing in the [tests/generated](https://github.com/Engenere/BrazilFiscalReport/tree/main/tests/generated) directory. -Some sample DANFEs generated by our unit tests can be viewed in the [tests/generated](https://github.com/Engenere/BrazilFiscalReport/tree/main/tests/generated) directory. ## Customizing DANFE This section describes how to customize the PDF output of the DANFE using the ``DanfeConfig`` class. You can adjust various settings such as margins, fonts, and tax configurations according to your needs.