OCR
- open_in_new Tesseract OCR for PHP — a wrapper around the Tesseract OCR engine for extracting text from scanned documents/images.
PDF to image
$pdf = new Spatie\PdfToImage\Pdf(__DIR__ . '/document.pdf');
$pdf->setResolution(400);
// Required — the library doesn't infer it automatically.
$pdf->setOutputFormat('png');
$pdf->setCompressionQuality(100);
$png_file_path = __DIR__ . '/output.png';
$pdf->saveImage($png_file_path);
Andrew Dorokhov