How can i download multiple pdf in a loop using dompdf ????..please help its urgent..

4,938 views
Skip to first unread message

Ananta Padhi

unread,
Dec 17, 2014, 1:27:53 AM12/17/14
to dom...@googlegroups.com
How can i download multiple pdf in a loop using dompdf ????..please help its urgent..

BrianS

unread,
Dec 22, 2014, 5:59:29 PM12/22/14
to dom...@googlegroups.com
You can only serve up a single file at a time. To download multiple PDFs you'll need to render the documents, save them to the server, zip the files together, and serve the zip file to the user.

BrianS

unread,
Dec 22, 2014, 6:06:35 PM12/22/14
to dom...@googlegroups.com
Asked with more detail here: http://stackoverflow.com/q/27519852/264628

Michael Beveridge

unread,
May 1, 2015, 3:58:38 PM5/1/15
to dom...@googlegroups.com
Hi Brian,

I'm calling the DOMPDF, creating a PDF then sending the PDF through SwiftMailer as an attachment.

Basically, I am creating HTML from MySQL, passing it to a PHP function which then attaching the PDF using your SwiftMailer example. Works fine on ONE iteration through the process, but if I have multiple PDF's and emails to send it sends the email but the PDF doesn't get generated after the first one.

Any ideas on how I can do this...it's critical.

Michael Beveridge

unread,
May 1, 2015, 4:14:34 PM5/1/15
to dom...@googlegroups.com
Thanks... I figured it out.

In the code instead of require_once('pdf.php') I changed it to include('pdf.php') and when my function calls the DOMPDF process it generates a PDF for each order.

Michael 



Sent from my iPhone
--
You received this message because you are subscribed to a topic in the Google Groups "dompdf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dompdf/O2nFiveNM_Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dompdf+un...@googlegroups.com.
To post to this group, send email to dom...@googlegroups.com.
Visit this group at http://groups.google.com/group/dompdf.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages