get pdf file path, return pdf first page preview
function getPdfPreView($pdfPath) { $pdf = new \Zend_Pdf(); $pdf->load($pdfPath); $pdf->saveImage($pdfPath . '.jpg', 0); return $pdfPath . '.jpg'; } $pdfPath = './test.pdf'; $preViewPath = getPdfPreView($pdfPath);