-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] No reader found for type Mpdf. (same when try export with DomPDF in ShouldQueue) #2531
Comments
Can you help me please...? Export PDF with queue not working... |
Have you already tried explicitly defining |
@GlennM , Yes I've tried this also, i've got the same error My export code after update with Excel::MPDF, (Line 20) My laravel.log after update:
|
Please, anyone can help me ? |
I am having this exact issue (with Dompdf) and also can't find a solution. Could this be looked into?
or when trying to chain jobs
It seems there's something wrong with the way the package handles queue's specifically with Dompdf. Replacing the pdf with an xlsx does the job just fine. |
@RobbeReygel Yes you're right. I think also this package seems stable only for "xlsx" exportation but not for PDF process. So PDF exportation should have another process. I suggest this package for PDF "mikehaertl/phpwkhtmltopdf". It works perfectly ! just read the docs and follow step ! |
@RobbeReygel @gordios the issue is that PhpSpreadsheet cannot re-open the spreadsheet if it's exported as Pdf. There's no reader for Pdf. When you use queue and the query gets chunked into multiple jobs, it indeed won't work. You can prevent multiple queued chunks by using the Alternatively you could drop the ShouldQueue interface and wrap the As someone mentioned on the WIP 3.2 release, this issue is solved in 3.2 all together. #2575 (comment) |
This bug report has been automatically closed because it has not had recent activity. If this is still an active bug, please comment to reopen. Thank you for your contributions. |
2 years later and it still doesn't work with same error "No reader found for type Dompdf". Also there is no 3.2 version which, allegedly, solves this issue. |
3 years later and still same problem with DOMPDF |
4 years later, someone else still experiencing this issue. |
Prerequisites
Versions
Description
I try to store large PDF file with arround 5000 rows with Export class implementing ShouldQueue interface. when job start it failed on "AppendQueryToSheet" step and in laravel.log file i see "No reader found for type Mpdf". Also i try to use DomPDF instead and i've seen same error. "No reader found for type DomPDF".
To reproduce this issue just try to store PDF file with ShouldQueue on Export. I've used for PDF driver Mpdf in config file. ("mpdf/mpdf": "^8.0.4" installed)
Additional Information
My config/excel.php (PDF driver)
My controller:
My export generated using custom query:
My export shared service:
My terminal when job in queue start:
My laravel.log file:
"[2020-02-02 18:03:52] local.ERROR: No reader found for type Mpdf {"exception":"[object] (PhpOffice\PhpSpreadsheet\Reader\Exception(code: 0): No reader found for type Mpdf at /home/vagrant/archive/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/IOFactory.php:71)
[stacktrace]
#0 /home/vagrant/archive/vendor/maatwebsite/excel/src/Writer.php(110): PhpOffice\PhpSpreadsheet\IOFactory::createReader('Mpdf')
#1 /home/vagrant/archive/vendor/maatwebsite/excel/src/Jobs/AppendQueryToSheet.php(88): Maatwebsite\Excel\Writer->reopen(Object(Maatwebsite\Excel\Files\RemoteTemporaryFile), 'Mpdf')
#2 [internal function]: Maatwebsite\Excel\Jobs\AppendQueryToSheet->handle(Object(Maatwebsite\Excel\Writer))"
The text was updated successfully, but these errors were encountered: