$ 0 0 by Michael Haskell. Installing the latest version of ghostscript didn't resolve the problem (Ghostscript 9.15 Source ). Increasing PHP's max_execution time from 30 sec to 120 sec solved the problem.