pombreda / xhtml2pdf

Automatically exported from code.google.com/p/xhtml2pdf
GNU General Public License v2.0
0 stars 0 forks source link

ZeroDivisionError #69

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
*  Input data was not saved that generated this output.  We are working on 
getting some input data that causes the problem.

What is the expected output? What do you see instead?
*  No exception

What version of the product are you using? On what operating system?
3.0.33

Please provide any additional information below.
Traceback (most recent call last):

 File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 100, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/releases/tsa.env/tsa/pdfconverter/views.py", line 37, in convertPDF
   pdf = pisa.pisaDocument(StringIO.StringIO(html.encode('UTF-8')),  result)

 File "/releases/tsa.env/lib/python2.6/site-packages/sx/pisa3/pisa_document.py", line 172, in pisaDocument
   doc.build(c.story)

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 877, in build
   self.handle_flowable(flowables)

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/doctemplate.py", line 762, in handle_flowable
   if frame.add(f, canv, trySplit=self.allowSplitting):

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/frames.py", line 174, in _add
   flowable.drawOn(canv, self._x + self._leftExtraIndent, y, _sW=aW-w)

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/flowables.py", line 106, in drawOn
   self._drawOn(canvas)

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/flowables.py", line 87, in _drawOn
   self.draw()#this is the bit you overload

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/tables.py", line 1283, in draw
   self._drawCell(cellval, cellstyle, (x, y), (width, height))

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/tables.py", line 1361, in _drawCell
   w, h = self._listCellGeom(cellval,colwidth,cellstyle,W=W, H=H,aH=rowheight)

 File "/releases/tsa.env/lib/python2.6/site-packages/sx/pisa3/pisa_reportlab.py", line 637, in _listCellGeom
   return Table._listCellGeom(self, V, w, s, W=W, H=H, aH=aH)

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/tables.py", line 366, in _listCellGeom
   vw, vh = v.wrapOn(canv, aW, aH)

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/flowables.py", line 117, in wrapOn
   w, h = self.wrap(aW,aH)

 File "/releases/tsa.env/lib/python2.6/site-packages/sx/pisa3/pisa_reportlab.py", line 621, in wrap
   return KeepInFrame.wrap(self, availWidth, availHeight)

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/flowables.py", line 944, in wrap
   W, H = func(s1)

 File "/releases/tsa.env/lib/python2.6/site-packages/reportlab/platypus/flowables.py", line 925, in func
   W /= x

ZeroDivisionError: float division

Original issue reported on code.google.com by ristrett...@gmail.com on 13 Aug 2010 at 9:05

GoogleCodeExporter commented 9 years ago
Some time ago Pisa AKA XHTML2PDF has been rereleased under the completely free 
Apache License. Since I personally don't have the time and resources to 
continue the project like before I would kindly ask you to fork the project on 
GitHub and add your patches etc. Maybe someone likes to create a new unified 
version and publish it on PyPI. If you need more help on this get in contact 
with me or write to the XHTML2PDF mailing list. Thank you all very much for 
your effort!

Project on GitHub:
http://github.com/holtwick/xhtml2pdf

Original comment by dirk.holtwick on 23 Aug 2010 at 5:27