Skip to content

Commit

Permalink
Fixed overflow of address text
Browse files Browse the repository at this point in the history
  • Loading branch information
danimaribeiro committed Apr 9, 2020
1 parent 05472e5 commit ae1d57b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion pytrustnfe/nfe/danfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,13 @@ def destinatario(self, oXML=None, timezone=None):
tagtext(oNode=elem_dest, cTag="nro"),
tagtext(oNode=elem_dest, cTag="xCpl"),
)
self.string(self.nLeft + 1, self.nlin + 14.3, cEnd)
if len(cEnd) > 52:
self.canvas.setFont("NimbusSanL-Regu", 6)
self.string(self.nLeft + 1, self.nlin + 12.4, cEnd[:51])
self.string(self.nLeft + 1, self.nlin + 14.4, cEnd[51:])
self.canvas.setFont("NimbusSanL-Regu", 8)
else:
self.string(self.nLeft + 1, self.nlin + 14.3, cEnd)
self.string(
nMr - 98, self.nlin + 14.3, tagtext(oNode=elem_dest, cTag="xBairro")
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup, find_packages


VERSION = "1.0.52"
VERSION = "1.0.53"


setup(
Expand Down

0 comments on commit ae1d57b

Please sign in to comment.