Test if a PDF is a valid file in PHP
Hi guys,
I have a system that manipulates PDFs in a workflow. Every now and then a corrupt PDF causes the script I have processing the PDFs from working.
Does anyone know of a way of determining if a PDF is corrupt or not? It could be an external script called from PHP if necessary (I'm running Centos 7 x64 and PHP 5.4.16).
cheers
Posted Jul 31, 2018, 1:31 PM UTC
23
Have you tried something like this?
https://stackoverflow.com/questions/42163605/verifiy-corrupted-pdf-using-php
Or this one,
https://stackoverflow.com/questions/23400586/determine-if-a-pdf-is-corrupt
Cheers, I'll take a look :)