$pdftoppm->execute();
$tmp .= '.ppm';
-// $output = $pdftoppm->getOutput();
-// $errors = ['end of file inside dictionary',
-// 'leftover args in content stream',
-// 'document stream is empty',
-// 'premature end of data segment',
-// 'corrupt jpeg data',
-// 'couldn\'t find trailer dictionary',
-// 'invalid xref entry',
-// 'incorrect stream length',
-// 'try to reconstruct',
-// 'error opening pdf file',
-// ];
-//
-// foreach ($errors as $error) {
-// if (stristr($output, $error)) {
-// unlink($tmp);
-// $pdftoppm->debug();
-// return;
-// }
-// }
+ $output = $pdftoppm->getOutput();
+ $errors = [
+ //'end of file inside dictionary',
+ 'leftover args in content stream',
+ 'document stream is empty',
+ //'premature end of data segment',
+ //'corrupt jpeg data',
+ //'couldn\'t find trailer dictionary',
+ //'invalid xref entry',
+ //'incorrect stream length',
+ //'try to reconstruct',
+ //'error opening pdf file',
+ ];
+
+ foreach ($errors as $error) {
+ if (stristr($output, $error)) {
+ unlink($tmp);
+ $pdftoppm->debug();
+ return;
+ }
+ }
if (file_exists($tmp)) {