generate functionMon, 02 Jan 2023

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);

Questions about programming?Chat with your personal AI assistant