[reportlab-users] Experimental early serializing pdfdoc.py for
bebabo at swissonline.ch
Thu Apr 14 05:38:01 EDT 2005
>Robin Becker wrote:
> File "c:\code\rlextra\rml2pdf\rml2pdf.py", line 4006, in go
> if done: doc.canv.save()
> File "c:\code\reportlab\pdfbase\pdfdoc.py", line 675, in _format
> File "c:\code\reportlab\pdfbase\pdfdoc.py", line 833, in clean
> del self.dict
>AttributeError: PDFInfoL instance has no attribute 'dict'
>I don't understand the error. The implication is that this object has already
>been cleaned (to get rid of its internal state & memory); to get more concrete I
>guess I would have to abstract the structure that's going wrong here and make it
>into a canvas based problem.
PDFInfoL is a PDF object class which is not defined pdfdoc.py but seems to be subclassed (indirectly: propably PDFDictionary) from my new PDFObjectReferable class. The semantics for PDF objects has changed so you might need to adapt to the new semantics. In particular objects which might have forward references need a obj.setForwardReference() call.
Nevertheless this problem could be fixed now, since actually clean() is not needed (it was a left-over from earlier tries), without clean() i get in the 500 gadflypaper run in all only 80 "garbage" objects more than with the clean() call.
I posted the new pdfdoc.py w/o clean() as well as a fixed gfe.py without white-pages which produces the expected 5000 pages instead of 19000 (it was an additional Spacer inserted before each iteration).
More information about the reportlab-users