Support the ongoing development of Laravel.io →
Database Views Blade
Last updated 1 year ago.
0

It's just heavy.. You can do it in the background using queues to make the UI faster. You can also look at https://github.com/barryvdh/laravel-snappy which might be faster then dompdf

Last updated 1 year ago.
0

If you keep having problems, you can try https://www.inventivedesigners.com/document-generator This tool can do massive invoice generation in PDF or in other formats. It can do what you describe above. Good luck!

Last updated 1 year ago.
0

I did something similar long ago. I chose to have the invoice as a PDF form (define text fields in the PDF for all dynamic texts) and then generate an FDF file from PHP. The FDF file is basically a file saying stuff like "Field 1 should contain 'Company Inc', field 2 should contain 'John Doe'", and so on.

I then used "pdftk" on the server to combine the template pdf with the form data, and output a single file with all the fields correctly in place. This worked very well, and was quite fast too. You could probably generate a bunch of FDF files and then trigger some batch-job that converts all of them into separate invoices.

I know it's maybe not always possible to install server side software, but if you have that possibility maybe this could be an option.

Last updated 1 year ago.
0

ErikEklund said:

I did something similar long ago. I chose to have the invoice as a PDF form (define text fields in the PDF for all dynamic texts) and then generate an FDF file from PHP. The FDF file is basically a file saying stuff like "Field 1 should contain 'Company Inc', field 2 should contain 'John Doe'", and so on.

I then used "pdftk" on the server to combine the template pdf with the form data, and output a single file with all the fields correctly in place. This worked very well, and was quite fast too. You could probably generate a bunch of FDF files and then trigger some batch-job that converts all of them into separate invoices.

I know it's maybe not always possible to install server side software, but if you have that possibility maybe this could be an option.

https://github.com/mikehaertl/php-pdftk

Edit: oh wow, didn't look at the date before posting, still good for reference.

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

num3r06 num3r06 Joined 17 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.