[reportlab-users] Experimental early serializing pdfdoc.py for
reportlab
Robin Becker
robin at reportlab.com
Wed Apr 13 13:46:59 EDT 2005
Robin Becker wrote:
> Thomas Blatter wrote:
>
>> Memory footprint problem of the current implementation
.....
>
> Should be a win win. I'll take a look real soon.
Well the simple reportlab/test/runAll does as expected, but in our rml2pdf
product I got a failure generating the reference guide.
File "c:\code\rlextra\rml2pdf\rml2pdf.py", line 4006, in go
if done: doc.canv.save()
File "c:\code\reportlab\pdfgen\canvas.py", line 850, in save
self._doc.SaveToFile(self._filename, self)
File "c:\code\reportlab\pdfbase\pdfdoc.py", line 275, in SaveToFile
self.finalize(canvas)
File "c:\code\reportlab\pdfbase\pdfdoc.py", line 406, in finalize
self.Reference(self.info)
File "c:\code\reportlab\pdfbase\pdfdoc.py", line 500, in Reference
return object.Reference(self,name)
File "c:\code\reportlab\pdfbase\pdfdoc.py", line 725, in Reference
self._ref.serializeObject(document)
File "c:\code\reportlab\pdfbase\pdfdoc.py", line 627, in serializeObject
sdict["content"] = self.obj.inline(document,inline_type=REFERABLE_INLINE_NOREF)
File "c:\code\reportlab\pdfbase\pdfdoc.py", line 700, in inline
self._format(document)
File "c:\code\reportlab\pdfbase\pdfdoc.py", line 675, in _format
self.clean()
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.
The same error occurs in every one of the rml2pdf tests so it must be related to
some generic thing we're doing with the canvas here that doesn't happen with the
standard canvas based testing. My brain is a bit fried so I'll leave it till the
morning.
--
Robin Becker
More information about the reportlab-users
mailing list