[reportlab-users] Clearing display page

Robin Becker robin at reportlab.com
Sun Aug 27 05:13:20 EDT 2006

David H wrote:
> Hi ReportLab List,
> I have an Zope application that uses ReportLab to generate acrobat 
> viewable reports.
> Heres the problem:
> I display an acrobat report (Firefox or IE 6) and say scroll down to 
> page 10.  I then use the <browser> back button to re-enter my Zope 
> application.
> Now, even if my users click various pages and then return to the Report 
> (which is always freshly generated) it will try to re-display at page 10 
> - instead of top of page.  This occurs even if the data being rewported 
> has changed.  This occurs even if a different report is generated!
> Note: that I use
> import tempfile and
> tmpFile2 = tempfile.mktemp() to keep pdfPath's unique.
> Anyway around this or suggestions?
> Thanks for any help,
> David H
> I'm using ReportLab 1.20, Zope 2.78 and an external python script + 
> ReportLab to generate the PDFs.  The Server is Linux Ubuntu 5.10.
Though I suspect this is more to do with the client than the server 
there's one thing you might check. Try randomising the URL that's used 
on the server. Instead of thing.pdf try thing.pdf?random=12345 where 
12345 should be a random number. That might inhibit the client caching 
anything. Alternatively persuade zope to puch all the right headers to 
force the client to belive the content is fresh each time. We do this 
sort of thing a lot, but the content url is almost always fairly random 
ie contains a date + some random string.
Robin Becker

More information about the reportlab-users mailing list