Skip to content
Advertisement

Tag: pdf

Spatie/pdf-to-image get number of images always returns 0

I’m using the spatie/pdf-to-image with laravel to create thumbnails of uploaded pdf files. What is weird is that the code was working at one point now it isn’t. $pdf->getNumberOfPages(); always returns 0 no matter how many pages the pdf contains. This is the constructor in the Spatie Pdf class. As you can see it is just using imagick’s getNumberImages(); This

How can I omit Helvetica with TCPDF?

I’m making a PDF with TCPDF, and I’m trying to make the file as small as possible. The font I’m using is Open Sans. I’m not (intentionally, at least) using Helvetica anywhere in the PDF. When I view the included fonts with Adobe Reader in my outputted PDF file, both Open Sans and Helvetica are listed. I have noticed that

Verifiy corrupted PDF using PHP

I would like to detect corrupted PDF using PHP. I have been able to determine that on not corrupted pdf I have the tag “%%EOF” at the end of the file. I also checked for this tag on corrupted and it not appear. I had the idea to automatically checked the validty of my PDF file before uploading it to

Advertisement