Like many here I’ve had lots of 500 errors trying to view PDFs with nothing in the Laravel logs to give me a clue as to the issue. So I did some poking around and I think I’ve found a possible solution (well it worked for me!!)
It turned out, for me at least, that Chromium in SnapPDF is barfing silently due to missing libraries.
The solution is to drop into the Chromium folder and run ldd chrome | grep not, ie
cd /path_to_Invoice_Ninja/vendor/beganovich/snappdf/versions/858657-Linux_x64/chrome-linux
ldd chrome | grep not
The folder below /versions is likely to change when a new version of SnapPDF is available so edit the above cd … line to suit (at the time of writing I’m using v5.1.13).
I had 12 missing libraries on my clean Ubuntu 20.04 server installation when I ran this. Once they were installed, IN runs like a champ.
Hope it works for you too!