views:

582

answers:

1

Hi,

I'm working on a project in Python/Django which uses ReportLab's SimpleDocTemplate to generate PDF documents.

All the documents generated have the current date/time printed in the top right corner. I can't see that it's being done anywhere in my code, is this a default behaviour in the SimpleDocTemplate object?

How do I get rid of this?

Regards, Haukur

A: 

I've just tried to reproduce the behavior you described, but unfortunately I cant. So I don't think it's a default behavior. Maybe it would be a good idea if you post a small example where the production date/time in the header is visible.

But if it's any help to you, here is what I've done: I used the following example from the user guide, which looks like this. But even when I call doc.build() without the additional arguments, I get no header at all.

tux21b
Thanks for your input. I took one more look at this code (I didn't write it originally, so I don't know it very well), I noticed that the doc.build method was taking in a parameter called onFirstpage which was pointing to a custom method I had not noticed before. In that method, the document was being initialized and there it was: The date/time being output in the top right corner.So, even though you did not answer my question directly, at least your comment made me take a good second look at the code :-)Thanks!
HaukurHaf
He did answer your question. It is not the default behavior.
Jeff