Browse Source

Fixed overflow of address text

fix-endereco
Danimar Ribeiro 6 years ago
parent
commit
2751b36907
  1. 6
      pytrustnfe/nfe/danfe.py
  2. 2
      setup.py

6
pytrustnfe/nfe/danfe.py

@ -477,6 +477,12 @@ class danfe(object):
tagtext(oNode=elem_dest, cTag="nro"), tagtext(oNode=elem_dest, cTag="nro"),
tagtext(oNode=elem_dest, cTag="xCpl"), tagtext(oNode=elem_dest, cTag="xCpl"),
) )
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(self.nLeft + 1, self.nlin + 14.3, cEnd)
self.string( self.string(
nMr - 98, self.nlin + 14.3, tagtext(oNode=elem_dest, cTag="xBairro") nMr - 98, self.nlin + 14.3, tagtext(oNode=elem_dest, cTag="xBairro")

2
setup.py

@ -2,7 +2,7 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
VERSION = "1.0.52"
VERSION = "1.0.53"
setup( setup(

Loading…
Cancel
Save