php 5.6 imagemagick (8: 6.8.9.9-7ubuntu5.4). php5.6-imagick (3.4.3 ~ rc2-2 + deb.sury.org ~ xenial + 1).
In general, such a task is to divide pdf documents into png by pages. The script works, but there are some pdf files that are not loaded via readImage (); However, I do not praise any exceptions. At startup, I say set_time_limit (0). Normal files can be converted for unlimited time.
php5,6-pfm does not output anything to the logs. Still working.
At first I thought that the files are too large, although this happens with pdf size and 100 + MB, and with small 200Kb for example. Found nothing in common between these strange PDFkami.
So, how to control the work of the script, and make sure that if there is such a pdf file, then move on to another?