[reportlab-users] Problems Printing Dates & Times -- FIXED
Rich Shepard
rshepard at appl-ecosys.com
Thu Nov 1 19:20:57 EDT 2007
On Thu, 1 Nov 2007, Rich Shepard wrote:
> I want to print the date and time a report is printed using the python
> datetime() module. It's not working as expected.
> pg.drawCentredString(306,748,now)
> Python apparently can't calculate the string width:
It wasn't Python, but ReportLab. The latter was expecting a UTF8 formatted
string, not an ASCII string.
I solved the problem by explicitly casting now to str().
Rich
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerators(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
More information about the reportlab-users
mailing list