I am currently using mPDF to handle a couple of things. The problem I'm facing however is that mPDF uses a version of FPDI that is unable to handle files over PDF version 1.4. There is a (paid) commercial addon that makes handling newer PDF files possible though. The problem is:
I installed mPDF through composer.
I am unable to change the FPDI package, since mPDF is a package in and of itself, that uses another package.
My question is: How can I change mPDF to use the commercial (v2) version of FPDI?
Thanks in advance.
~Brendan
There's this pull request, that adds compatibility for FPDI v2. Because of BC breaks it will be merged in mPDF 8.
Until that just use the legacy version of the parser add-on. This can also be installed with composer.
Related
I'm using WAMP and I would need to create PDF from php/html pages.
I had some trouble with DOMPDF since it seems unable to manage tables longer than a page, and I'm considering to use TCPDF.
I saw that I could install TCPDF with COMPOSER but I would prefer,if possible, to avoid a further installation.
Any chances to install TCPDF without composer?
thanks
I am working on a website with PHP 7.4.15 and CI 4.1.1.
I need to use phpspreadsheet library so I installed it by composer.
but when I try to use that class , the below error shows.
Class 'PhpOffice\\PhpSpreadsheet\\Spreadsheet' not found
According to CI4 documents, CI4 find Composer Auto Load files.
Do I need to set other things?
Any ideas can be helpful for me.
I'm currently using mpdf to merge together a few pdf files the users uploaded. I found myself to face the issue of mpdf using the free version of FPDI which gives a mPDF error: Unable to find xref table - Maybe a Problem with 'auto_detect_line_endings' error when trying to operate on files whose PDF version is higher than 1.4.
I don't have ssh access but just CPanel, so I can't install GhostScript. Having to tell users to manually re-save and downgrade their own PDFs before uploading them surely isn't the way to go at it.
tl;dr Is there some way to downgrade PDFs to 1.4, using PHP, without ssh access/relying on an external server to convert?
I use dompdf to make pdfs from html.
It works great apart from the fact that you cannot show svgs.
Apparently dompdf 0.7.0 has the ability to show svgs, but you need a special library called php-svg-lib. I know I have to use the img tags to show an svg in pdf which is fine, but it keeps saying "unknown image"
So I downloaded the php-svg-lib library from the github, but I have no idea how to install it.
My question is how do I install php-svg-lib into dompdf so that I can use svgs in my pdf documents?
The answer is that php-svg-lib comes with version 0.1 of dompdf.
You can update it via composer. Once composer is installed:
Open a cmd prompt window.
Enter the dompdf folder and type composer show. This shows you what version of the libraries are installed.
Type either composer update or composer install to update all libraries.
How to use mPDF with latest version of PHP ( Codeigniter 3.x)?
I am using PHP 7.0.4 and codeigniter 3.x. I include the mPDF in my project but getting following error
Methods with the same name as their class will not be constructors in a future version of PHP; mPDF has a deprecated constructor
I tried by replacing function name with __construct but it is not working.
Do anyone have any idea?
Replace your mpdf by mPDF 5.7 library for PHP7
You can try development version of mPDF which can be obtained on GitHub or via composer with
$ composer require mpdf/mpdf#dev-development
You will have to set your minimum-stability accordingly.
There are some backwards incompatible changes - mainly namespaces and different constructor parameters.
WIP documentation can be read on GitHub at https://github.com/mpdf/mpdf.github.io/blob/development/configuration/configuration-v7-x.md