[reportlab-users] [Fwd: bug (and patch) pdfbase.pdfdoc.PDFFormXObject.format()]
Tim Grant
tim at reportlab.com
Thu Jun 11 03:58:36 EDT 2009
-------- Original Message --------
Subject: bug (and patch) pdfbase.pdfdoc.PDFFormXObject.format()
Date: Wed, 10 Jun 2009 14:39:42 -0600
From: scottm at walkermowers.com
To: enquiries at reportlab.com
bug in (and patch for) pdfbase.pdfdoc.PDFFormXObject.format()
No response is requested. I just hope to see this minor fix in a future
version.
BUG: pdfbase.pdfdoc.PDFFormXObject.format() function will fail if
self.Resources is previously defined.
If self.Resources is already defined before .format() call it will raise
"resources" is not defined error.
if not self.Resources: # <-- what is the point of checking unless you
wish to support previously defined self.Resources
resources = PDFResourceDictionary()
...
self.Resources=resources # <--self.Resources should be set at the end
of this block
...
sdict["Resources"] = resources # <-- this should use self.Resources
instead of resources.
return ....
PATCH: patch -p1 <xobj.patch
Thanks. -Scott Meyer, Walker Manufacturing
--
ReportLab Europe Ltd.
Media House
3 Palmerston Road
London SW19 1PG
Tel +44-20-8545-1570
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xobj.patch
Url: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20090611/c958104d/attachment.ksh>
More information about the reportlab-users
mailing list