multiple pdf opening

multiple pdf opening

Forum member · Dec 8, 2005
Hi, I have 2 aspx page that generates pdf files. It is very strange , when I open report.aspx in new window everything is fine but when I open summary report (in new window) it opens multiple pdf files but only one contains data. Then, I copied and pasted everything(main code) from report.aspx to summaryreport.aspx. Again, report.aspx will show only one pdf file whereas summaryreport.aspx opens 2 pdf files. Can any one tell me why is it acting so weird? I debugged, everything is fine, as soon as it comes out of page_load event it creates/ displays 2 pdf files. I need to split report.aspx into report.aspx and summaryreport.aspx. My MainReport page contains several links for different kinds of report. All of them call Report.aspx but I want one link opens summaryreport.aspx. Appreciate any help. Junu

Re: multiple pdf opening

Support · Dec 8, 2005
Hello Junu, It looks like somewhere in your code, the summaryreport.aspx page is set to expire in 0 seconds and that’s causing double hits. The DrawToWeb method uses a default of 10 seconds for the cache. This is to get around the problem of the Page_Load firing twice. When you are testing the document you are probably not waiting tens seconds to see the result and are therefore seeing the cached document. I would suggest leaving the functionality as is and waiting ten seconds to test the reload. If you need to shorten the time you could try 5 or 3 seconds. Response.ExpiresAbsolute = DateTime.Now.AddSeconds( 5 ); If the expiration is set to 0 then the page will be loaded twice and you will have two hits for each page request. This is because IE first requests the page from the server and then the Acrobat plug-in requests the page form the server. Thanks, ceTe Software Support Team