You need ImageMagick
and GhostScript
<?php
$im = new imagick('file.pdf[0]');
$im->setImageFormat('jpg');
header('Content-Type: image/jpeg');
echo $im;
?>
The [0]
means page 1
.
More Related Contents:
- How to provide dynamic HTML in PHP?
- How to convert an image to Base64 encoding
- Output an Image in PHP
- Efficient JPEG Image Resizing in PHP
- Merge PDF files with PHP [closed]
- Creating a thumbnail from an uploaded image
- Multiple Image Upload PHP form with one input
- correct PHP headers for pdf file download
- Which one is the best PDF-API for PHP? [closed]
- Check whether image exists on remote URL
- Show a PDF files in users browser via PHP/Perl
- Compare 2 images in php
- Calculating image size ratio for resizing
- best way to determine if a URL is an image in PHP
- How to add text to an image with PHP GD library
- RGB to HSV in PHP
- php link to image file outside default web directory
- How to get the browser to cache images, with PHP?
- Resize images in PHP without using third-party libraries?
- How can one run multiple versions of PHP 5.x on a development LAMP server?
- Php : Convert a blob into an image file
- Converting HTML to PDF (not PDF to HTML) using PHP [closed]
- Generate PDF report from php
- Resize images with PHP
- How to convert all images to JPG format in PHP?
- Crop whitespace from image in PHP
- Cropping image in PHP
- PHP upload image
- Convert HTML to Image in PHP without shell
- DOMPDF – attach created PDF to email