PHP code example of baraja-core / php-pdf-to-image

1. Go to this page and download the library: Download baraja-core/php-pdf-to-image library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

baraja-core / php-pdf-to-image example snippets


$configuration = new Configuration(
	pdfPath: __DIR__ . '/example.pdf',
	savePath: __DIR__ . '/example.jpg',
	format: 'jpg'
);

// Render PDF to image and save to disk.
\Baraja\PdfToImage\Convertor::convert($configuration);