Closed jannes-io closed 7 years ago
mpdf 7.0 is in beta and not in stable release yet.
It's a lot more stable than using PHP 7.1 with yii2-mpdf..
So what is the solution for people who are stuck using PHP 7+?
It's a lot more stable than using PHP 7.1 with yii2-mpdf..
Based on above will need to figure out release and dependencies here... as it cannot be just addressed in context of PHP 7.1
I removed the yii2-mpdf package, updated mpdf to 7.0.0-beta2, then changed my code and I am running it perfectly on my test xampp (PHP 7.1.1) and on my production server (PHP 7.1.3).
Still I am not sure of the support of mpdf-7.0beta for other lesser versions of PHP < 7.x...
give me some time will need to create another release specific for 7.1 -
The only issue I encounter now is that the yii2-gridview can not export to PDF, but that is a different github project. Fixed it by just changing the export options to not include PDF since it still uses the yii2-mpdf. If you need any code or need anything tested on PHP7 let me know I'd be willing to help out.
Any update on this?
I did some work already adopting last version of PHP and mPdf. There's already opened issue on this problem https://github.com/kartik-v/yii2-mpdf/issues/45#issuecomment-291846586. @mhoogstraten you could give a try to my forked version until author will figure something out.
@kartik-v anything I can do to help speed up yii2-mpdf with mPDF 7.0?
Code worked fine in my app, wondering if its just the v1.0.2 tag that's missing.
@juanisorondo I released 1.0.2 tag... can you check and update if anything... thanks
Steps to reproduce the issue
Expected behavior and actual behavior
When I follow those steps, I see a whole bunch of errors because mpdf 6 does not support PHP 7.1.X and yii-mpdf does not support a higher version of mpdf. It works fine if I just use the mpdf library to export simple pages but when used in combination of other elements (such as the GridView widget it throws an error.
`Invalid Configuration – yii\base\InvalidConfigException
The class '\kartik\mpdf\Pdf' was not found and is required for PDF export functionality. To include PDF export, follow the install steps below. If you do not need PDF export functionality, do not include 'PDF' as a format in the 'export' property. You can otherwise set 'export' to 'false' to disable all export functionality.
Please ensure you have installed the 'yii2-mpdf' extension. To install, you can run this console command from your application root:
php composer.phar require kartik-v/yii2-mpdf: "@dev"`
Your wrapper should be updated to support the new PHP versions as well as the latest Mpdf version. Please update.
Environment
Xampp, PHP 7.1.1
Browsers
Operating System
Libraries
Isolating the problem