I had a previous issue running PDF creation on my AMD64 system which was resolved by downloading a static binary and setting the path in .env
I’m running the production system on Raspberry Pi 4 which is flawless to date, until that is, we tried to export invoices as PDF. I searched for a static Armhf image but there doesn’t appear to be one.
On further investigation I found the following: “phantomjs -v” throws the error relating to QPA and I see an expected error code in laravel.log.
If I invoke with ‘QT_QPA_PLATFORM=”offscreen” phantomjs -v’ however I get the expected result “2.1.1”
So I thought – easy, find the PHP doing the render and modify the command. Oops, not so simple and beyond my pay grade for sure…
I trawled the code and am “reasonably” certain the logical place to do this (assuming possible) is in the RenderPDF function in CurlUtils.php, but this is outside my skills.
So my coding skills are as sad as I thought – multiple combinations and all failed – ah well.
So I googled yet again and found a different repository with various images for Pi. Again after multiple attempts I found one which seems (so far) to work. Compiled this year – “2020-02-09: Added a release with libicu57 included”