chrisglass/xhtml2pdf — Issue #33: Generated PDF is damaged and is unable to open
Author: dalanmiller
Created: 2011-12-27 19:58:11+00:00
State: open

Trying to narrow down why my PDFs that are created aren't able to be opened properly. Is this happening for anyone else? I'm using this same recipe below that is in test/simple.py but pdf.err returns "0" which I assume means that there are no errors, but when loading the .pdf file Adobe Acrobat say that it is damaged and not able to be opened.

pdf = pisa.CreatePDF(
cStringIO.StringIO(data),
file(dest, "wb")
)

if pdf.err:
dumpErrors(pdf)
else:
pisa.startViewer(dest)