Problem/Motivation
I am unable to install this with php 7.4 due to the mPDF dependency required as ^7.0.0.
Steps to reproduce
composer require drupal/pdf_using_mpdf
mpdf/mpdf[v7.1.7, ..., v7.1.9] require php ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 -> your php version (7.4.16) does not satisfy that requirement.
Proposed resolution
Update module code to work with mPDF 8.
Remaining tasks
TBD
User interface changes
None
API changes
Not sure
Data model changes
Not sure
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 0001-mPDF8-support-both-PHP7.3-PHP7.4.patch | 290 bytes | jasminewu |
| #9 | pdf_using_mpdf-php-issue.PNG | 22.45 KB | poorva |
Issue fork pdf_using_mpdf-3205270
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mortona2k commentedSo far I can create a pdf without issues. I searched the code for functions mentioned in the changelog, but don't see any in use. https://github.com/mpdf/mpdf/blob/development/CHANGELOG.md
Comment #4
bryandenijsHi,
I posted a comment on your MR: https://git.drupalcode.org/project/pdf_using_mpdf/-/merge_requests/1#not...
Comment #6
aleixPushed in MR the change Bryan said, it works as it should then.
Comment #7
luongosb commentedHey all, thanks for updating the code. Any idea when this will be available?
Comment #8
mortona2k commentedI believe for ^7.0.0, composer will allow 7.0.x, but no higher (IE not 7.1.0).
^7 means 7 or above, so 7.4 or 8.0.4.
^8.0.4 would mean 8.0.4 or above, and under 8.1.0 is required.
Comment #9
poorva commentedSince Drupal 9 is supporting PHP 7.4 there is no point to make this compatible with only PHP 8. Right now stable version of module is getting error due to this.
Comment #10
jasminewu commentedIt's urgent for me to fix the issue. And I generate a patch from pdf_using_mpdf-3205270
Comment #11
jasminewu commentedComment #12
jasminewu commentedAnyway, patch for php7.3 and php7.4
Comment #13
jasminewu commentedComment #14
hiralthaker commentedHello All,
I am using Drupal8.9.18, PHP 7.4.22 and mPdf 8 on my server.
It is generating PDF with text properly while not adding images into PDF.
Can any one help?
Thanks
Comment #15
gilmordHi, updating priority as Acquia will switch soon to PHP 7.4
Hee is a workaround while this is not merged:
1.
composer remove drupal/pdf_using_mpdf2. add this to the "repositories" section of your composer.json:
3.
composer require drupal_git/pdf_using_mpdfNot the best solution but I was forced to switch to PHP 7.4 and this was the only thing blocking me.
Comment #16
jds1#15 was the only way I was able to get out of dependency hell. A new release of this module that considers PHP 7.4 would be greatly appreciated.
Comment #17
bakulahluwalia#15 works, thanks @gilmord
Tested successfully.
Comment #18
spuky commented+1 for releasing this to help ease d9 uprgades...
Comment #19
ribelWould be good to release a new version with updated mpdf asap.
We have tested that there are no regressions after the update.
Comment #20
pgshehata commented+1 for releasing this to help php7.4 uprgades...
Comment #21
jsbalsera#15 worked great, +1 for a new release.
Comment #22
ronaldtebrake commentedThink it's safe to say it's RTBC'ed :) we're also actively using this patch
Comment #23
rdplessis commented# 15 works for me, +1 for new release as soon as possible
Comment #24
emil stoianov commented+1 works for me
Release it !
Comment #25
gilmordComment #26
gilmordThanks, @all
merged into the latest dev.
Comment #27
gilmordComment #28
honyik commentedHello, I can't see a dev version available on this module's page and trying to download 2.x from github only redirects me back here, therefore I still can't add this via composer and the only thing I can do is to download the 2.2 version and fix it manually, what am I missing here? Thank you
Comment #29
gilmordHi @honyik looks like some bug (or feature) of git.drupalcode.org
I tried a couple of other projects - download leads to the project page on drupal.org.
You can use git to download the files like this:
After that, you can switch the branch to the latest dev and use the files however you need.
Also, I am not sure you will be able to fix anything manually, as the required library does not work with the packages of the fresh Drupal installation, and the maintainer of the library is not willing to fix that.
Better look at the alternatives like dompdf, also modules like entity_print can work with various alternatives of the mpdf (if I remember correctly).
Comment #30
viniciusosouza commentedIs there any way to this feature be merged on a new release?