How to Regenerate PDF Thumbnails in WordPress

Recently, one of readers users asked if it was possible to regenerate PDF thumbnails for old uploads in WordPress? In WordPress 4.7, you now have thumbnail previews for all new PDF files. However, this change does not affect older uploads. In this article, we will… Read More »

The post How to Regenerate PDF Thumbnails in WordPress appeared first on WPBeginner.

Recently, one of readers users asked if it was possible to regenerate PDF thumbnails for old uploads in WordPress? In WordPress 4.7, you now have thumbnail previews for all new PDF files. However, this change does not affect older uploads. In this article, we will show you how to regenerate PDF thumbnails in WordPress for older uploads.

Regenerate PDF thumbnails for old uploads in WordPress

Why and Who Needs to Regenerate PDF Thumbnails?

WordPress introduced PDF thumbnail previews in WordPress 4.7. This feature creates image previews of the first page of a PDF file uploaded using media uploader.

However, this feature only works on new PDF files that you uploaded after updating your site to WordPress 4.7.

All older PDF files will still appear as a generic icon in the media library, and you will still have to use a PDF plugin to show a thumbnail preview on attachment pages.

If you regularly upload PDF files, then you will need to regenerate thumbnail for your older PDF uploads.

It is similar to regenerating thumbnails for images after adding new image sizes to your WordPress theme. However, those plugins do not support PDF files at the moment.

Having said that, let’s take a look at how to regenerate PDF thumbnails for older uploads in WordPress.

Regenerate PDF Thumbnails in WordPress

Before you move on, please make sure that you are using WordPress 4.7 or higher. Also make sure that you have imagemagick extension installed on your server.

You can test imagemagick by simply uploading a PDF file to your WordPress site. If it shows a thumbnail preview for your PDF file, then you are good to go.

Please note, that the plugin we are going to use in this article, will regenerate thumbnails for all your older image files as well. As a precaution, backup your WordPress site or at least backup your /wp-content/uploads/ folder.

First thing you need to do is install and activate the Force Regenerate Thumbnails plugin.

The plugin is hosted on GitHub. If you haven’t installed plugins from GitHub before, then take a look at our guide on how to install WordPress plugins from GitHub.

Upon activation, you need to visit Tools » Force Regenerate Thumbnails page.

Regenerate all thumbnails

Here you can regenerate thumbnails for all images and PDF files you uploaded using WordPress media uploader. Click on ‘Regenerate All Thumbnails’ button to continue.

The plugin will now start processing all images on your website. It will take some time, depending on how many images and PDF files you have.

Once finished, you can visit Media » Library page and you will be able to see thumbnail previews for your old PDF uploads.

Media library

The plugin also allows you to regenerate thumbnails for individual files. If you do not have many PDF files, then it would be better to regenerate thumbnails individually.

You will need to visit Media » Library page and switch to the list view by clicking on the list view button.

After that take your mouse over to a PDF file, and you will be able to see ‘Force regenerate thumbnails’ link.

Generating thumbnail for a single PDF file in WordPress

Clicking on the link will regenerate thumbnails for that particular file.

Once you have regenerated thumbnails for all your old PDF uploads, you can safely deactivate and delete the plugin. Uninstalling or deleting the plugin will not delete the thumbnails regenerated by the plugin.

We hope this article helped you regenerate PDF thumbnails for old uploads in WordPress. You may also want to see our list of 24 must have WordPress plugins for business websites.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Regenerate PDF Thumbnails in WordPress appeared first on WPBeginner.

How to Disable PDF Thumbnail Previews in WordPress

Recently, one of our readers asked us how to disable PDF thumbnail previews in WordPress. Introduced in WordPress 4.7, this feature creates thumbnail images for all PDF files that you upload. In this article, we will show you how to easily disable PDF thumbnail previews… Read More »

The post How to Disable PDF Thumbnail Previews in WordPress appeared first on WPBeginner.

Recently, one of our readers asked us how to disable PDF thumbnail previews in WordPress. Introduced in WordPress 4.7, this feature creates thumbnail images for all PDF files that you upload. In this article, we will show you how to easily disable PDF thumbnail previews in WordPress.

Disable PDF thumbnail previews in WordPress

Why Disable PDF Thumbnail Previews in WordPress?

WordPress 4.7 started generating thumbnail previews of PDF files uploaded from WordPress media uploader.

PDF thumbnail preview in WordPress 4.7

This is a very useful feature for most WordPress sites.

However, some site owners may already be using PDF plugins that handle thumbnail previews and the overall display of the PDF downloads on their website.

If the new feature is conflicting with their existing PDF uploads, then they may want to disable PDF thumbnail previews in WordPress.

Having said that, let’s take a look at how to easily disable PDF thumbnail previews in WordPress 4.7 and later versions.

Disable PDF Thumbnail Previews in WordPress

This tutorial requires you to add a simple code snippet on your WordPress site. If you haven’t done this before, then you may want to see our guide on pasting code snippets from web into WordPress.

You will need to add this code to your theme’s functions.php file or a site-specific plugin.

function wpb_disable_pdf_previews() { 
$fallbacksizes = array(); 
return $fallbacksizes; 
} 
add_filter('fallback_intermediate_image_sizes', 'wpb_disable_pdf_previews');

Don’t forget to save your changes.

This code simply gives WordPress an empty array for PDF thumbnail sizes and stops WordPress from generating thumbnail previews.

You can now try uploading a PDF file to your WordPress site using the media uploader. You will notice that WordPress will not generate any thumbnail previews for your PDF file.

No thumbnail preview

We hope this tutorial helped you learn how to disable PDF thumbnail previews in WordPress. You may also want to see our list of 24 must have WordPress plugins for business websites.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Disable PDF Thumbnail Previews in WordPress appeared first on WPBeginner.

9 Best PDF Plugins for WordPress

Do you want to add PDF files to your WordPress site? By default, WordPress cannot generate or embed PDF files in posts or pages. In this article, we have hand-picked some of the best PDF plugins for WordPress. 1. PDF Viewer The PDF Viewer allows… Read More »

The post 9 Best PDF Plugins for WordPress appeared first on WPBeginner.

Do you want to add PDF files to your WordPress site? By default, WordPress cannot generate or embed PDF files in posts or pages. In this article, we have hand-picked some of the best PDF plugins for WordPress.

Best PDF plugins for WordPress

1. PDF Viewer

PDF Viewer

The PDF Viewer allows you to display PDF files inside your WordPress posts and pages. It uses Mozilla’s PDF.js script to render PDF documents beautifully with tools to scroll, search, jump between pages, print, and download PDF files.

For detailed instructions, see our guide on how to add a PDF viewer in WordPress.

2. WP Advanced PDF

WP Advanced PDF

WP Advanced PDF plugin allows your users to download your posts and pages in PDF format. You can enable the PDF download for all users or just for registered users. You can use custom fonts, logo, and even add a watermark to your PDF files.

3. PDF & Print by BestWebSoft

PDF and Print

As the name suggests, this plugin adds a PDF download and print button to your WordPress posts, pages, and custom post types. You can add your website title, featured image, custom styles, and fonts. The plugin can also execute shortcodes when generating PDFs or creating a printer friendly version.

4. PDF Image Generator

PDF Image Generator

PDF Image Generator creates a cover image for PDF Files you add in WordPress posts for download. The plugin can generate this cover image by either using the first page in the PDF or featured image. The download icon will then display the thumbnail image linked to PDF file.

For this plugin to work your WordPress hosting provider should have ImageMagick and GhostScript installed on their server.

5. PDF Thumbnails

PDF Thumbnails

Similar to the previous plugin, PDF thumbnail also generates a thumbnail of the first page of your PDF file during the upload. However, your PDF file and the thumbnail image remain as two separate files. You will need to manually insert the generated thumbnail and then link it to the PDF file.

6. DK PDF

DK PDF

This powerful plugin allows users to download your posts and pages in PDF format by clicking on a button. It comes with an easy interface to setup the placement of the PDF download button and create your own custom header and footer for PDF downloads.

The plugin also comes with shortcodes that allow you to control what content goes inside the PDF. You can also hide the content you don’t want to be included into PDF download.

7. PDF Embedder

PDF Embedder

As the name suggests, PDF Embedder plugin allows you to embed PDF files in WordPress posts and pages. The plugin uses JavaScript to embed files with a fully functional toolbar allowing users to zoom, navigate, and even download the PDF file.

8. WordPress PDF Light Viewer Plugin

PDF Lite Viewer

WordPress PDF Lite Viewer plugin is particularly good at embedding very large PDF files. It uses Turn.js JavaScript library to display PDF files as flipbooks with thumbnail navigation. The PDF viewer comes with zoom, navigation, and fullscreen buttons. It is also fully responsive and can work on different device sizes.

9. BSK PDF Manager

BSK PDF Manager

BSK PDF Manager is a file manager for PDF files on a WordPress site. If you upload PDF files often, then you may want to categorize them, display them as lists, or a single download. This plugin makes it easier to manage PDF files in WordPress.

Bonus Plugins

These plugins do not offer a way generate or embed PDF files. However, if you serve PDF files on your WordPress site, then you may find them helpful.

10. SearchWP

SearchWP

SearchWP is a paid WordPress plugin. It allows you to add a better search experience to your WordPress site. One of the features of this plugin is the ability to search the text inside PDF files. However, it cannot search PDF files that are encrypted, stored outside media library, or have images as text. See our guide on how to improve WordPress search with SearchWP

11. OptinMonster

OptinMonster

OptinMonster is a powerful tool that helps you grow your email list. You can convert abandoning visitors into subscribers by using OptinMonster. You can ask users to signup for your email list in exchange for free download PDF resource.

You can also use it to offer content upgrades. See this list of 30 content upgrade ideas to 10X your subscribers.

We hope this article helped you find the best PDF plugins for WordPress. You may also want to see our list of 24 must have WordPress plugins for business websites.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post 9 Best PDF Plugins for WordPress appeared first on WPBeginner.