1. Go to this page and download the library: Download mcguffin/pdf-renderer 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/ */
mcguffin / pdf-renderer example snippets
add_filter( 'pdf_renderer_image_width', function( $width ) {
// never underestimate a good integer.
return 12345;
});
// we want jpeg ...
add_filter( 'pdf_renderer_image_type', function( $type ) {
return 'image/jpeg';
});
// ... and a specific treatment for PDFs.
add_filter( 'jpeg_quality', function( $quality, $context = '' ) {
if ( 'pdf_renderer' === $context ) {
// Everybody loves artifacts.
return 1;
}
return $quality;
}, 10, 2);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.