Hi I am making an online shopping site where in the admin control panel I need to generate the invoices. I have done it successfully using dompdf and PDF files are being generated successfully and are downloaded in download folder. Now I have one problem. After generating the PDF file, I want to redirect to another page. Below is my code. This code is generating the PDF file bbut not redirecting to the specified page. Please help on this issue that how can I redirect ? All your help will be highly appreciated.
Have you enabled PHP error reporting? If you try to redirect to a different page, does it make any difference? I’ve read in some places you have to specify the complete url, not just the page - does that make any difference?
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\shopping\admin\dompdf\lib\class.pdf.php on line 4332
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\shopping\admin\dompdf\lib\class.pdf.php on line 4348
Unable to stream pdf: headers already sent
Thanks for the answer… I have managed this issue some how…But am facing another challenge.
The PDF’s are being generated perfectly and are downloaded in download folder, where as I want to download all these PDF files in specific folder d:\invoices.
How can I do that ? Can I set the path of download folder ?
I’d suspect that was a function of the browser, not something you can change in your PHP code. Sounds like a security issue to have the server deciding where the client stores a download.