<h2><?php_e('Generating PDF thumbnails...','pdf-thumbnail-generator')?></h2>
<divid="pdf-list"><?php
$generated_thumbs=0;
$pdfs=$wpdb->get_col("SELECT ID FROM {$wpdb->posts} WHERE {$wpdb->posts}.post_type = 'attachment' AND {$wpdb->posts}.post_mime_type = 'application/pdf'");
Generates thumbnail for PDF file automatically after file is uploaded to the Media library.
You can also generate thumbnails for old PDF files that are already in the Media library - you can generate missing thumbnails or regenerate all thumbnails.
<strong>Imagick library must be installed on your server, otherwise this plugin will not work</strong>
<ul>
<li>automated test after plugin activation to make sure it will work on your server</li>
<li>works with all types of WordPress installations: domain, subdomain, subdirectory, multisite/network</li>
<li>works on Apache and NGiNX</li>
<li>automatically generate thumbnail for new uploaded PDFs</li>
<li>(re)generate thumbnails for existing PDFs in Media library</li>
<li>set maximum width of PDF thumbnail</li>
<li>set maximum height of PDF thumbnail</li>
<li>set image quality of PDF thumbnail</li>
<li>set image file type of PDF thumbnail</li>
</ul>
## Shortcodes
### pdf_thumbnail
Maybe you want to display PDF thumbnail by using a shortcode
`[pdf_thumbnail id="123"]`
### pdf_thumbnail_url
Maybe you want to display PDF thumbnail url by using a shortcode
`[pdf_thumbnail_url id="123"]`
## Functions
### get_pdf_thumbnail_url
If you want to return PDF thumbnail URL you can use
`get_pdf_thumbnail_url( $pdf_id )`
it works similar to `wp_get_attachment_url` and it will return something like