[reportlab-users] [Fwd: bug (and patch) pdfbase.pdfdoc.PDFFormXObject.format()]

Robin Becker robin at reportlab.com
Thu Jun 11 04:51:26 EDT 2009


Thanks Scott, I'll take a look real soon now.

Tim Grant wrote:

>

>

> -------- 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

man/listinfo/reportlab-users


--
Robin Becker


More information about the reportlab-users mailing list