Closed juanborras closed 7 months ago
This is already possible if you use the Imagick driver class, as it can read all formats supported by Imagick itself. The 'toJpeg' can be omitted in this case.
use Intervention\Image\Drivers\Imagick\Driver as ImagickDriver;
// transform first page of pdf to jpeg with imagick driver
ImageManager::withDriver(ImagickDriver::class)
->read('test.pdf')
->save('test.jpg', quality: 100);
However, output is only possible with the formats supported by Intervention Image. Since the target format is JPEG in your case, this should not be a problem.
Official support for PDF is not planned at this time. The focus of this library is more on pixel-based images.
Describe the feature you'd like I would love to do this:
// Just for one page pdf $imgageManager = new ImageManager(Driver::class); $pdf= $imgageManager->read(storage_path('app/') . $pdfFile); $pdf->toJpeg(100)->save(storage_path('app/') . $pdfFile . '.JPG');
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]