Re: Redirect after pdf / file download

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yashesh Bhatia wrote:
What about doing it the other way ... submitting the page to a script
that calls on the pdf creation, yet doesnt leave this script - then
proceed to redirect when that script (pdf) has been completed?

S


steven:

     the steps u'r suggesting are
1 - submit form (1.html) to script (2.php)
2 - 2.php generates the pdf but does not give it for download
3 - after generating the pdf , 2.php then redirects to 3.html..

so where does the download happen ? in 3.html ?

thx.

yashesh


1.  Collect Information from client & submit data
2.  Process data and generate PDF, write PDF, display error/success message
3.  If successful, have a javascript or <meta ..> redirect to then download
	PDF generated in step 2.

I would do it this way so in case their were any problems generating the PDF, you would have a way to indicate that to the client. Rather then trying to force them to download a broken PDF document.

One suggestion to go along with this is that you will need to have a routine that will clean out all the generated PDF's every now and again.


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux