Knowledgebase

Presales

Yes, the license allows you to use the product indefinitely on your WordPress site. The fee also entitles you to support and updates for 12 months from the date of purchase. After 12 months, the license will be renewed automatically (by subscription set up at the time of purchase) and you will continue to receive plugin updates and support access. If you choose to cancel the license, you are free to use the software; however, if you require support or updates after canceling, you would need to buy a new license at the full purchase price at that point. When you install the premium product and enter your license key, it will tell you when your support/updates license expires, but of course, you will still be welcome to use the product even with an expired support/updates license. We believe this situation is better than a one-time purchase since you will receive updates beyond the purchase date – at least for a year – and it offers a sustainable position for support and continued product development in the future. A one-off purchase could easily leave you exposed and in need of a new solution a few months down the line.

If you can't find the answers to your questions on these pages, please get in touch with us by email.

It's always helpful if you can send us a link to a page on your site showing any problem you're having so we can see it for ourselves. Other screenshots and as much information as possible is always appreciated.

Also let us know which version of the plugin you are using.

After purchase you will receive an email containing a link to download a ZIP file containing the plugin, and you will also receive a license key.

However, the link will expire after a week or so. If you need a new download link in the future, you can obtain this from our website as follows.

Go to the Login page of our website: https://wp-pdf.com/wp-login.php or by clicking on the My Account link in the main navigation.

Unless you have already set a password on your account, you will need to click Lost your password and enter the email address you used to purchase the plugin

Follow the link sent to your email address for setting a password and then logging in.

You should be taken to a page listing your purchases - click the 'My Purchases' link towards the top of the screen if not.

You can download the latest ZIP from there.

To view Upgrade options (e.g. to upgrade from 2-5 site license to an unlimited license) click 'View Licenses'.

Downloading with a Mac / Safari - installation error

Occasionally when trying to install a downloaded plugin using a Mac / Safari an error message is generated such as "The package could not be installed". This is due to the download being unzipped automatically when saved to your computer.

To fix the ZIP issue, you need to alter your Safari's default settings. You can do this by navigating Safari > Preferences > General and then uncheck "Open Safe Files After Downloading". This will prevent the download from being unzipped automatically.

You will then need to re-download the plugin ZIP file so it remains zipped. The plugin can now be uploaded the correct zipped format to your WP Admin > Plugins > Add New.


If your email address is not registered on our site

Please make sure you are trying to access the site using the email address you entered when you purchased the plugin.

If your most recent purchase was before 14 Feb 2017 then an account may not have been created automatically on our site.

In this case please get in touch via email asking us to create an account for you.

In the free version of the plugin, the only way to move between pages in a PDF Embedder embed is using the next/prev arrows in the toolbar.

The Premium (and Premium Secure) version now has functionality allowing the user to continuously scroll down through the document to all pages - using the mouse wheel, click-and-drag etc, or touch on a phone etc.

Please see the Premium demos.

It is possible to retain form fields inside an embedded PDF for users to fill in. Such PDFs should display without problems using PDF Embedder; however, there will be no way for the user to enter text into the fields and thereby save their responses.  The fields will still be intact for the user to fill offline but you would need another method for the user to submit their responses.

PDFs can be produced that are password-protected so need a password in order to be viewed. No version of the plugin supports this. The PDF Embedder Premium Secure version does allow you to embed a (non password protected) PDF in a WordPress page in such a way that it is difficult for the user to obtain the source PDF; it should also be possible to prevent access to that page without being logged in with an appropriate WordPress account, or to password-protect the whole page.

Troubleshooting Fields

If your fields are not being retained after embedding, it is likely due to how the PDF was initially created.

MS Office software seems to have problems exporting fields correctly in PDFs. If you believe that you have created proper fields in your Word document, but they just don't seem to be appearing in the exported PDF, please try the following workaround. In Word don't accept the default save as 'Word Document (*.docx)' - instead save the file as a 'Word 97-2003 Document (*.doc)' initially, and then select File > Export as PDF (*.pdf)'. This method also works for Excel Spreadsheets.

In the Premium (and Secure) version of the plugin, an optional Download button appears in the toolbar. Users can download the PDF to their computer, open it to browse using their default PDF viewer, and print from there.

However, no version of the plugin has a direct 'print' button in the embedded viewer's toolbar in your WordPress site.

Some users also ask if the Secure version allows a PDF to be printed but still make downloads difficult.

It can never be possible to allow printing but not downloading because most browsers will allow the user to "print as PDF". This has exactly the same effect as downloading the file - so you can't really have print functionality without download being just as easy.

Yes, if you purchase the PDF Embedder Premium Secure version then you can switch between 'secure' and normal modes. You should not also purchase the regular PDF Embedder Premium version.

In Settings -> PDF Embedder / Secure tab, there is an option "Send PDF media uploads to 'securepdfs' folder". If this is checked, subsequent PDF uploads will be uploaded as 'secure', and embedded as such when selected for inclusion in a page. If unchecked, uploads will go to the normal media uploads area (outside the special 'securepdfs' folder), and will be embedded as normal without 'secure' protection.

You can find out more by reading the Secure Instructions.

It is also possible to ensure your 'normal' PDFs have a download button available to your viewer, but your 'secure' PDFs do not. To do this, set the main Download Button checkbox to on or off depending on whether the bulk of your PDFs are likely to be secure or normal - do this in the 'Main Settings' tab of Settings -> PDF Embedder.

Then for individual embedded PDFs you can add a download attribute to the shortcode if you wish to override the global setting. This is described under shortcode parameters - you would insert download="on" or "off" before the end of the shortcode:

[pdf-embedder url="..." download="on"]

While it may be possible to use the PDF Embedder Free or PDF Embedder Premium version of the plugin on a paid account on a WordPress.com hosting site, it is problematic due to WordPress.com being a closed environment (i.e. you do not have access to security settings, htaccess, or other server tools). For this reason, it is not possible to use the PDF Embedded Secure version of the plugin on a WordPress.com hosted site.

It is recommended that any of the plugin versions only be used on a self-hosted WordPress(.org) website being hosted by someone other than WordPress.com.

No version of the plugin can be installed on a basic (free) WordPress.com site. To understand the difference between WordPress.com and self-hosted WordPress sites, see here.

The PDF Embedder plugin does not collect or save any personal user data. The plugin only provides the means to display an interactive PDF viewer on your site.

The Premium and Secure versions do record the number of times a document is viewed and/or downloaded if you enable that option within the plugin settings and this is stored in your database as part of the documents metadata, but it does not record any information (name, email address, IP address, location, etc.) of the user that viewed/downloaded the document.

If you require a formal invoice for accounting purposes, please send us an email here with the following information:

  • Invoice # (located on the emailed purchase receipt)
  • Buyer name
  • Company name
  • Billing address
  • VAT / Tax number, if applicable

Troubleshooting

When you click the link to download the ZIP file for a plugin you've purchased, you may find that it appears to be a folder of files instead of one ZIP file.

This is usually because Safari tries to be 'helpful' and unzips the ZIP immediately upon downloading. This isn't what you wanted - you need the ZIP intact.

You should normally still be able to find the original ZIP if you go to your Downloads folder, or you could try 'Compressing' the folder to recreate the ZIP for yourself.

Alternatively, you can change this behavior in Safari. Go to Preferences > General, and then uncheck the option "Open 'safe' files after downloading".

Go back to the original link and try to download the ZIP file again.

Using WP Super Cache, W3 Total Cache, WP Rocket, Autoptimize, or other plugins to minify and/or cache the scripts running on your site has been known to create issues with the plugin's function. Some themes also provided caching / minifying of JavaScript. The plugin scripts are already minified so you will not be losing any efficiency or load speed by excluding them from these tools.

This error often presents as PDFs failing to load, appearing as a link, or get stuck on loading. To rectify this error, you will need to exclude the following URIs for the plugin scripts from any caching and/or minifying tools:

Free version paths:

  • /wp-content/plugins/pdf-embedder/js/all-pdfemb-basic-4.6.4.min.js
  • /wp-content/plugins/pdf-embedder/js/pdfjs/pdf-4.6.4.min.js
  • /wp-content/plugins/pdf-embedder/js/pdfjs/pdf-4.6.4.worker.min.js

Premium version paths (v5.0.x):

  • /wp-content/plugins/PDFEmbedder-premium/js/all-pdfemb-premium-5.0.2.min.js
  • /wp-content/plugins/PDFEmbedder-premium/js/pdfjs/pdf-5.0.2.min.js
  • /wp-content/plugins/PDFEmbedder-premium/js/pdfjs/pdf-5.0.2.worker.min.js

Premium version paths (v5.1.x):

  • /wp-content/plugins/PDFEmbedder-premium/assets/js/all-pdfemb-premium.js
  • /wp-content/plugins/PDFEmbedder-premium/assets/js/min/pdf-viewer-min.js
  • /wp-content/plugins/PDFEmbedder-premium/assets/js/min/pdf-worker-min.js

Secure version paths (v5.0.x):

  • /wp-content/plugins/PDFEmbedder-premium-secure/js/all-pdfemb-premium-5.0.2.min.js
  • /wp-content/plugins/PDFEmbedder-premium-secure/js/pdfjs/pdf-5.0.2.min.js
  • /wp-content/plugins/PDFEmbedder-premium-secure/js/pdfjs/pdf-5.0.2.worker.min.js

Secure version paths (v5.1.x):

  • /wp-content/plugins/PDFEmbedder-premium-secure/assets/js/pdf-embedder.js
  • /wp-content/plugins/PDFEmbedder-premium-secure/assets/js/pdf-js-viewer.js
  • /wp-content/plugins/PDFEmbedder-premium-secure/assets/js/min/pdf-viewer-min.js
  • /wp-content/plugins/PDFEmbedder-premium-secure/assets/js/min/pdf-worker-min.js

Note: all caching and minifying plugins differ as to where exclusions can be added. Please refer to the caching/minifying plugin's documentation for specific instructions on where and how to add these script paths as these exclusions may be located in "hidden" Advanced settings options. The scripts should be excluded from aggregate / inline caching as well as general JS caching.

Be sure to flush any caches including ones specifically for JS after you exclude the scripts so that they can be loaded by the site again and the embed viewer should be displayed correctly once this has been done.

Caching and combining JS has been known to be an issue with other caching tools. If you do not require the extra performance of the SiteGround caching/optimization tools, you can:

  • Disable the option to combine JS files (front end optimization screen).
  • Disable / uncheck the option to "Remove Query Strings from Static Resources" option will resolve this error.
  • Flush the cache, and reload the site again

Make sure that mobile caching is not set differently from the desktop as this will result in the desktop version working and the mobile version fails.

If you are unable to disable the combine JS settings, the alternative would be the specifically exclude the PDF Embedder scripts and this would require that you dip into some PHP coding to do so. An example of the code you would need to add to the functions.php is as follows—you may require assistance from the SiteGround support to apply this to your site:

add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' );
function js_combine_exclude( $exclude_list ) {
    $exclude_list[] = 'pdfemb_embed_pdf_js, pdfemb_pdf_js';

    return $exclude_list;
}

add_filter( 'sgo_js_minify_exclude', 'js_minify_exclude' );
function js_minify_exclude( $exclude_list ) {
    $exclude_list[] = 'pdfemb_embed_pdf_js, pdfemb_pdf_js';

    return $exclude_list;
}

add_filter( 'sgo_css_combine_exclude', 'css_combine_exclude' );
function css_combine_exclude( $exclude_list ) {
    // Add the style handle to exclude list.
    $exclude_list[] = 'pdfemb_embed_pdf_css';

    return $exclude_list;
}

add_filter( 'sgo_css_minify_exclude', 'css_minify_exclude' );
function css_minify_exclude( $exclude_list ) {
    // Add the style handle to exclude list.
    $exclude_list[] = 'pdfemb_embed_pdf_css';

    return $exclude_list;
}

Caching on WP.com uses the Page Optimize caching tool and requires a different configuration than other 3rd party caching plugin.

You must add the plugin's data-handle attribute value into the exclusions. This must be done for both the JS files and the CSS file. You can find these by viewing the source code of the page where you have an embed; however, they should be as follows:

  • pdfemb_embed_pdf_js and pdfemb_pdf_js for JavaScript
  • pdfemb_embed_pdf_css for CSS

Your Page Optimization settings should look similar to this:

Page Optimizer caching settings

Page Optimizer caching settings in WP.com

This error comes up if there is a caching and/or minifying plugin on the site that has cached the previous version of the plugin scripts and now does not match with the updated plugin. To rectify this error, you need to clear the cache and allow the site to reload the scripts.

Using WP Rocket, disable the option for "Remove Query Strings from static resources" (present in older versions of plugin):

W3 Total Cache has a similar setting that can be found here: W3 Total Cache > Browser Cache > Remove Query Strings From Static Resources. That should be unchecked when using that particular caching plugin.

Using Autoptimize: disable the option for "Aggregate JS-files":

For other caching plugins, first disable any options for aggregate/inline JS or other static resources,  flush the cache, and do a hard reload the browser. The error should now be gone.

If it persists, exclude the following paths from your site's cache and/or minifying plugin.

Free version paths:
/wp-content/plugins/pdf-embedder/js/all-pdfemb-basic-4.6.4.min.js,
/wp-content/plugins/pdf-embedder/js/pdfjs/pdf-4.6.4.min.js, and
/wp-content/plugins/pdf-embedder/js/pdfjs/pdf-4.6.4.worker.min.js

Premium version paths:
/wp-content/plugins/PDFEmbedder-premium/js/all-pdfemb-premium-5.1.4.min.js
/wp-content/plugins/PDFEmbedder-premium/js/pdfjs/pdf-5.1.4.min.js
/wp-content/plugins/PDFEmbedder-premium/js/pdfjs/pdf-5.1.4.worker.min.js

Secure version paths:
/wp-content/plugins/PDFEmbedder-premium-secure/js/all-pdfemb-premium-5.1.4.min.js,
/wp-content/plugins/PDFEmbedder-premium-secure/js/pdfjs/pdf-5.1.4.min.js, and
/wp-content/plugins/PDFEmbedder-premium-secure/js/pdfjs/pdf-5.1.4.worker.min.js

Once you have excluded these paths, again  flush the cache, and do a hard reload the browser.

If after following the above steps the error persists, make a note of the file URL presented in the error message. You will need to determine how that file is being generated by your caching tool in order to prevent/exclude it.

This error comes up if there is a caching and/or minifying plugin on the site that has cached the previous version of the plugin scripts and now does not match with the updated plugin. To rectify this error, you need to clear the cache and allow the site to reload the scripts.

To prevent this error from occurring again in the future, you would need to exclude the following paths from your site's cache and/or minifying plugin.

Free version paths:
/wp-content/plugins/pdf-embedder/js/all-pdfemb-basic-4.6.24.min.js,
/wp-content/plugins/pdf-embedder/js/pdfjs/pdf-4.6.4.min.js, and
/wp-content/plugins/pdf-embedder/js/pdfjs/pdf-4.6.4.worker.min.js

Premium version paths:
/wp-content/plugins/PDFEmbedder-premium/js/all-pdfemb-premium-5.0.2.min.js
/wp-content/plugins/PDFEmbedder-premium/js/pdfjs/pdf-5.0.2.min.js
/wp-content/plugins/PDFEmbedder-premium/js/pdfjs/pdf-5.0.2.worker.min.js

Secure version paths:
/wp-content/plugins/PDFEmbedder-premium-secure/js/all-pdfemb-premium-5.0.2.min.js,
/wp-content/plugins/PDFEmbedder-premium-secure/js/pdfjs/pdf-5.0.2.min.js, and
/wp-content/plugins/PDFEmbedder-premium-secure/js/pdfjs/pdf-5.0.2.worker.min.js

Once you have excluded these paths, flush the cache and do a hard reload the browser as well; the error should now be gone.

If you are not using a caching tool on your site but are still seeing the error, the scripts maybe caching in your browser and a hard reload is required.

Browser hard reload keystrokes:

  • Windows: Ctrl + F5
  • Mac/Apple: Apple + R or Cmd + R
  • Linux: F5

The Failed to Fetch error occurring on GoDaddy may be a recent problem for your site that had previously worked without issue. This is due to the new CDN that GoDaddy has implemented on their hosting packages.

The cause of the issue is that GoDaddy is trying to redirect the document loading through secureservercdn.net which is resulting in a "No Access-Control-Allow-Origin header" error. The first step would be to set up a CORS rule for the CDN. The following documentation has the required information needed to permit access for the document to be loaded from a CDN: https://wp-pdf.com/kb/hosting-pdfs-on-other-services-such-as-amazon-s3/.

Once you have the CORS set up correctly, this should resolve the Failed to Fetch error depending on how the CDN for your account is set up. If not, you should next have GoDaddy support create a Post Processing rule to stop anything going to .pdf to remain with the domain and URI path.

This procedure has worked successfully for other users hosting with CDNs.

Alternatively, if you do not need the CDN, you can simply disable that in your hosting settings:
GoDaddy_CDNdisable.jpg

You will usually see this error in your browser because your PDF does not sit on the same domain as the current page on your site.

For example, if you access the page http://www.mycompany.com/ and see the error message:
Failed to Fetch while retrieving PDF "http://mycompany.com/wp-content/uploads/mydoc.pdf"
this is because the shortcode for the embedded document references the URL on mycompany.com whereas the page is sitting on www.mycompany.com.

The "www" is important - it references a different domain to the PDF's URL that does not contain "www".

This error can also occur if an SSL certificate has been incorrectly installed where the admin side of the site is under HTTPS, but the front end of the site is under HTTP protocol or vice versa.

For security reasons, browsers are not allowed to load the PDF from a different domain. This error will also occur if you try to embed a PDF from another 3rd party site.

 

You will need to ensure all your PDF Embedder requires a url attribute shortcodes refer to the PDF's URL in the new preferred manner.

Sometimes, the problem might be that WordPress is configured to upload PDFs to media.mycompany.com, or something similar, perhaps due to a content-delivery plugin that is attempting to speed up your site. It may still be possible to load PDFs hosted on a different domain, at least if you have the ability to set up the configuration of that domain - see Hosting PDFs on other services such as Amazon S3.

It is also possible that a PDF URL is being prevented from loading by a browser Ad Blocker. In the browser console, this shows up as an error net::ERR_BLOCKED_BY_CLIENT. To fix this, be sure that the PDF file name does not contain any words such as advertisement, advert, ad, click, doubleclick which are trigger words for Ad Blockers.

There are a couple things that you can try if you are experiencing crashing or blank pages when the viewer is loaded on mobile devices:

  1. The first thing to would check is the formatting of the document when it was created as a PDF, in particular, look at how the images have been added and if there are any layers or transparencies. These should be flattened when the PDF is rendered as they can create blank pages or other discrepancies in the appearance from the original.
  2. The next thing to try is to decrease the file size of the original document as this can cause the file to timeout when requested from the server. We have seen some remarkable compression from this free service https://www.ilovepdf.com/compress_pdf that has helped other customers in the past. This will save data and decrease the loading time for your users in any case.
  3. You can also try the following to see if it makes a difference:
    • Open the PDF with Acrobat DC
    • Select "Save as another type", and Select PDF/A type.
    • Replace with the standard PDF file.

    About PDF/A type: https://helpx.adobe.com/acrobat/using/pdf-x-pdf-a-pdf.html

    Once you adjust the file format, upload it to your site (I would recommend altering the file name slightly so you know you are loading the revised document), and embed it again.

  4. Another possibility would be the fonts used within the PDF. Using a more universal font such as Arial / Helvetica may fix the issue.
  5. Finally, if you are seeing the issue in mobile devices, try enabling the option to "Disable Device Zoom" under the Mobile tab of the plugin settings. Often times, a mobile device will try to adjust the zoom level on the fly causing the page to reload and the document will fail to load completely as a result.

If the PDF doesn't display at all then please get in touch with our support team via email. Send a link to the page containing the 'broken' embedded PDF.

First, you may be able to diagnose the problem yourself - or at least find out some more information that could help the support team.

Most often, there is something else on your site (such as a plugin or theme) that is causing a conflict with PDF Embedder's Javascript code.

There are three possible approaches to diagnosing the problem.

1. Trial-and-error to find conflicting plugin/theme

In the WordPress Plugins page, try temporarily deactivating all plugins other than PDF Embedder, and switch to a simple Theme such as Twenty Seventeen.

Reload the problem page to see if the PDF now displays. If so, there must be a conflict with a Theme/Plugin. To find out which one, reactivate each one at a time and reload the page containing the PDF after each reactivation. When the PDF breaks again, you know which plugin/theme is at fault. Your next course of action may be to get in touch with us to explain your findings, or just switch plugins/themes if you are happy to do so.

If you are using a theme or plugin that enables you to create your posts using a drag & drop layout builder, such as Divi, Elementor, etc., please see the following tutorial: Using PDF Embedder with Drag & Drop Layout Builders

2. Javascript Console error messages

Sometimes the conflict causes an error message to be displayed. To look, open up the Javascript Console in your web browser's developer tools section. For example, in Chrome, go to View -> Developer -> Javascript Console.

You may need to reload the web page.

If there are any messages in red, what do they say, and do they point to a particular plugin? It may not be obvious why the error has occurred, but in any case you can send a screenshot to our support address to help our investigation.

3. Check the Javascript files are loading correctly

Also in Developer Tools (as above in 2), there is a Network tab that can show you which files are loaded into the page, and we need to make sure all the plugin's files are loading.

Once the Network tab is open, reload the page, then you can enter the text 'pdfemb' to filter the list of loaded files to those that might be relevant.

You should see at least:

all-pdfemb-premium.min.js (or -basic.min.js)
compatibility.min.js (no longer included in plugin with version 3.1.8+)
pdf.min.js
pdf.worker.min.js

If some or all of these aren't listed - particularly the first one - then somehow your site is failing to respect the PDF Embedder plugin's request to include those files. Sometimes this happens if your Theme does not contain a wp_head or wp_footer section - which should mean something to your theme developer... As in 1 above, try switching to a simpler theme to see if that at least shows us that the theme was at fault.

Another possibility is that a caching plugin or 'Javascript optimizer/minifier' is behaving incorrectly, so you could try turning it off. Some themes offer such facilities built in. Please see https://wp-pdf.com/kb/using-caching-or-minifying-plugins/ for specific information on how to correct caching issues.

Seek Support

In all cases, please just get in touch if you have a problem with the plugin. Send a link to the page containing the broken PDF embed, and any information gleaned from the steps above. Just ignore the steps if they are outside your comfort zone. We have listed them so some more technically-minded users can potentially diagnose problems without assistance.

You will usually see this error in your browser because your PDF does not sit on the same domain as the current page on your site.

For example, if you access the page https://www.example.com/ and see this error message:

Error: URL to the PDF file must be on exactly the same domain as the current web page

or maybe this one:

Failed to Fetch

while retrieving the PDF file at this location: https://example.com/wp-content/uploads/2024/02/file.pdf - this is because the shortcode for the embedded document references the URL on example.com domain whereas the page is sitting on www.example.com.

The www part is important - it references a different domain to the PDF's URL that does not contain www.

For security reasons, browsers are not allowed to load the PDF from a different domain.

Let's say your site is available via both www.example.com and example.com. Then that's an inconsistency that is also confusing to search engines and users.

To fix this, ask your web hosting company to make it consistent - for example, to redirect users directly from www.example.com to example.com, so everyone is using the same domain.

Then, you will need to ensure all your PDF Embedder shortcodes refer to the PDF's URL in the new preferred manner. Various "search and replace" plugins (or the appropriate wp-cli command) may help you to make those changes all over your content.

Sometimes, the problem might be that WordPress is configured to upload PDFs to media.example.com, or something similar, perhaps due to a content-delivery plugin that is attempting to speed up your site. It may still be possible to load PDFs hosted on a different domain, at least if you can set up the configuration of that domain - see Hosting PDFs on other services such as Amazon S3.

It is also possible that a PDF URL is being prevented from loading by a browser Ad Blocker. In the browser console, this shows up as an error net::ERR_BLOCKED_BY_CLIENT. To fix this, be sure that the PDF file name does not contain any words such as advertisement, advert, ad, ads, click, double-click, and others - which are trigger words for Ad Blockers.

If you attempt to embed the PDF viewer within a tab that is controlled by Javascript, you may find that it does not display at the correct size when the tab is opened. If you resize the browser window slightly, it should jump to the correct size. This is because the size was calculated when the tab was closed, and wasn't updated for the size of the opened tab.

You could modify the tab opening code to force a window resize event after the tab is open:

window.dispatchEvent(new Event('resize'));

If you have AJAX-style 'smooth' page transitions, perhaps provided by your theme, then you may find that the PDF viewer only displays at all when you load the page directly. Clicking on to the PDF's page from a different page may miss out on the initialization code of the plugin.

You might need to ensure that all relevant plugin Javascript files are loaded, and then fire this event to initialize the plugin after the new page content has been loaded:

jQuery('.pdfemb-viewer').pdfEmbedder();

If that doesn't work, the following bit of code can be tried (edit the div.tab-title to whatever class the tab is actually labeled with):

jQuery(document).ready(function($){
	$(document).on('click', 'div.tab-title',function() {
		if (pdfemb_trans.cmap_url === "undefined") {
			var cmapURLis = '';
		}else{
			var cmapURLis = pdfemb_trans.cmap_url;
		}
		$('.pdfemb-viewer').pdfEmbedder(cmapURLis);
	});
});

To be honest, we don't really feel that 'smooth page transitions' make sense in a WordPress environment where different plugins will assume a particular initialization order, so our preference would be to disable these transitions. Please understand that we can't necessarily support custom coding solutions like these, but hopefully these notes will help developers.

To ensure the menu is behind the viewer when in full screen, you could try adding the following CSS to your theme's style.css or similar:

.pdfemb-fsp-wrapper {
   z-index: 999999 !important;
}

You might need to increase the number to something even higher to ensure it takes priority over the 'z-index' of your Theme's header.

Some Themes have Javascript code that automatically adds scrollbars or positions other features depending on the exact height of every item on the page. However, because PDF Embedder changes height after the PDF is fully loaded, the Theme really needs to recalculate everything after the PDF loads. But unfortunately some Themes fail to account for this possibility, and they can display the page as truncated or without scrollbars when they are needed.

If the Theme cannot be fixed, a simple workaround may be to 'reserve' extra space for the full-height PDF. To do this, add some CSS code under Appearance -> Customize -> Additional CSS.

.pdfemb-viewer {
  height: 2000px !important;
}

You may need to experiment with the number used (2000 above) for best results.

With any problems, please email a link to the problem page to us.

If you see this error message, do you have a download manager installed on your browser? This sometimes causes problems - maybe take a look at your extensions, and also try on a different browser to see if that works. If it does, it seems likely to be limited to your original browser.

Disabling the download manager should help, but if not please send us a link to the page containing the PDF.

You may also be able to configure the download manager not to intercept PDF downloads.

Typically, PDFs with a smaller file size will be rendered faster and it depends on how big a single page is. The amount of pages does not affect the performance because we are loading and rendering only those pages that are currently visible.

You must optimize your documents for the web for better and faster results. See Optimize a PDF from Adobe's website for more information.

There are more improvement techniques that we can suggest:

  1. Avoid using high-resolution images - 150 dpi resolution for scanned images should be more than enough for screens, especially for low-powered devices (phones).
  2. Try to use JPEG encoding for color images/photos in RGB colorspace when possible.
  3. Avoid using expensive compositions/effects such as transitions or masking - flatten the transparency.
  4. Avoid using PDF generators (or don't create content) that produce ineffective PDF output (e.g. LibreOffice creates a lot of tiny images for vector elements/pictures it does not understand).
  5. If there is such a setting, use web-optimized PDF output or use linearization.
  6. Fix or don't produce corrupted PDFs that do not conform to the PDF32000 specification.

Premium Troubleshooting

When you click the link to download the ZIP file for a plugin you've purchased, you may find that it appears to be a folder of files instead of one ZIP file.

This is usually because Safari tries to be 'helpful' and unzips the ZIP immediately upon downloading. This isn't what you wanted - you need the ZIP intact.

You should normally still be able to find the original ZIP if you go to your Downloads folder, or you could try 'Compressing' the folder to recreate the ZIP for yourself.

Alternatively, you can change this behavior in Safari. Go to Preferences > General, and then uncheck the option "Open 'safe' files after downloading".

Go back to the original link and try to download the ZIP file again.

Hyperlinks in your PDFs are only supported in the Premium and Secure versions of the plugin, so please make sure you are definitely using one of those versions.

If your links are all displayed as URLs e.g. http://mysite.com/... in the PDF text, then the most likely explanation is that the links in your document aren't 'real links' according to the PDF format.

I know that sounds daft given that some viewer software still converts them to working links, but they do that by guessing because it starts with 'www' or 'http' etc. As far as I understand, the PDF specification doesn't suggest that behavior so you'll find that it needs to be a real link in some viewers (including ours). At the moment, the URL is technically just some text rather than a working hyperlink.

What software you are using to create the PDF? Does the hyperlink work in that software before it's exported as a PDF?

Please get in touch, sending a copy of the broken PDF.

Users of Microsoft Word: this MS Office software seems to have problems exporting hyperlinks correctly in PDFs. If you believe that you have created proper hyperlinks in your Word document, but they just don't seem to be appearing in the exported PDF, please try the following workaround. In Word, don't accept the default save as 'Word Document (*.docx)' - instead save the file as a 'Word 97-2003 Document (*.doc)' initially, and then select File > Export as PDF (*.pdf)'. This method also works for Excel Spreadsheets (.xls) and PowerPoint (.ppt).

On Mac OS, use the Pages App to export the .doc file, then use the Save as PDF and select the "Electronic Distribution" option instead of the "Best for Printing" option. For Excel, converting the spreadsheet to a Word table works for keeping the links in the .pdf export alive. Making a table in Word also works to skip Excel altogether.

Hiding the Overlay

You see the 'View in Full Screen' message when the PDF is embedded in too narrow a column. This is designed so that on mobile devices, the user always has to open in full screen rather than trying to grapple with the inline PDF viewer which is difficult to use in a small screen.

You can remove this feature by going to Settings -> PDF Embedder, and clicking on the Mobile tab.

Set the 'Mobile Width' to 0. This should always display the viewer inline by default, without the 'View in Full Screen' overlay, and then the user can still click the full screen icon in the toolbar to open in full screen only if they want.

If you still want the overlay to appear for mobile users then use a non-zero (i.e. somewhere in the range of 250 - 320) number in the 'Mobile Width' setting.

Styling the Overlay

It is also possible to change the styling of the overlay and button using a bit of CSS added to your child theme's styles.css file or the Appearance » Customize » Additional CSS field (note that the values are the default and the !important attribute is needed for certain elements to override the plugin's default values):

/* CHANGE COLOUR OF FS OVERLAY */
div.pdfemb-inner-div-wantmobile {
    background-color: lightgray !important;
    opacity: 0.5;
}
/* CHANGE STYLE OF VIEW IN FS BTN */
div.pdfemb-wantmobile-fsarea {
    -webkit-border-radius: 20px !important;
    -moz-border-radius: 20px !important;
    border-radius: 20px !important;
    border: 2px solid #363600 !important;
    background-color: #C5BDCF !important;
    -webkit-box-shadow: #B3B3B3 8px 8px 8px !important;
    -moz-box-shadow: #B3B3B3 8px 8px 8px !important;
    box-shadow: #B3B3B3 8px 8px 8px !important;
    color: black !important;
    font-family: sans-serif !important;
    letter-spacing: 2px !important;
    font-size: 16px !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

In Settings -> PDF Embedder within your WordPress site, there should be a License tab, and there you can enter the license key you received in your purchase email.

If there is no License tab, then you are almost certainly still using the free version of the plugin. In the Plugins page, Deactivate the free version and follow the instructions to install the Premium plugin you have purchased.

Sometimes mobile devices will cause problems:

  • Image quality is low - PDF appears pixellated and unreadable, or
  • The toolbar is difficult to locate - it keeps moving out of view
  • Reloading of page until the page fails

These can be caused by conflicts within your own site's settings, e.g. theme styles.

You can try an advanced setting to see if that helps. Go to Settings -> PDF Embedder, and click the Mobile tab.

Check the box labeled as "Enable if you are experiencing quality issues on mobiles", and then click the "Save Changes" button.

This will add the following HTML to the head section of every page on your site:

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />

This should have the effect on most mobile browsers of disabling the browser's own zoom feature, meaning all zooming is carried out by the plugin itself. Sometimes, conflicts between the browser and the plugin can cause complications.

Please note you may also need to remove any existing meta[name="viewport"]tags from your theme's header.

There are a couple things that you can try if you are experiencing crashing or blank pages when the viewer is loaded on mobile devices:

  1. The first thing to would check is the formatting of the document when it was created as a PDF, in particular, look at how the images have been added and if there are any layers or transparencies. These should be flattened when the PDF is rendered as they can create blank pages or other discrepancies in the appearance from the original.
  2. The next thing to try is to decrease the file size of the original document as this can cause the file to timeout when requested from the server. We have seen some remarkable compression from this free service https://www.ilovepdf.com/compress_pdf that has helped other customers in the past. This will save data and decrease the loading time for your users in any case.
  3. You can also try the following to see if it makes a difference:
    • Open the PDF with Acrobat DC
    • Select "Save as another type", and Select PDF/A type.
    • Replace with the standard PDF file.

    About PDF/A type: https://helpx.adobe.com/acrobat/using/pdf-x-pdf-a-pdf.html

    Once you adjust the file format, upload it to your site (I would recommend altering the file name slightly so you know you are loading the revised document), and embed it again.

  4. Another possibility would be the fonts used within the PDF. Using a more universal font such as Arial / Helvetica may fix the issue.
  5. Finally, if you are seeing the issue in mobile devices, try enabling the option to "Disable Device Zoom" under the Mobile tab of the plugin settings. Often times, a mobile device will try to adjust the zoom level on the fly causing the page to reload and the document will fail to load completely as a result.

In full screen mode (Premium versions only), the following keyboard shortcuts can be used:

Page Up / Down (Cmd + Up / Down on a Mac) - move to next/prev page

Arrow keys - pan around the current page of the PDF

Escape - exit full screen mode

You may find that when you click on the 'download' button within the PDF viewer, the PDF opens in a new tab instead of downloading.

This behavior normally happens in Chrome, and you might consider it annoying - when you download a file you want it to be downloaded to your hard drive, and then you can choose to view it from there!

It is possible to change the default behavior on Chrome so that this doesn't happen when you download PDFs. It is also possible to convince most browsers to download the file directly, so this will help all your users (not just you).

To disable this behavior just for your own Chrome installation, type chrome://plugins in the URL bar and then click the 'Disable' link underneath 'PDF Viewer'.

To force downloads of all PDFs on your WordPress site, the configuration may depend on your server so please ask your web hosting company for help. As a guideline, on Apache you could try adding the following text to the .htaccess file in your site's root folder (e.g. via FTP).

<FilesMatch "\.(?i:pdf)$">
  ForceType application/octet-stream
  Header set Content-Disposition attachment
</FilesMatch>

Details for why this works can be found in this article.

This is a strange issue, and really your web hosting company may have to investigate.

You may find that your web server sometimes redirects requests for the PDF file to your home page. If you enter the PDF URL directly into the Edge URL bar you will probably see that it sends you to the homepage...

So instead of sending the PDF to the viewer, it sends the home page of your site instead... of course that causes problems!

So this is not normally an issue with the PDF Embedder plugin per se - it (correctly) detects that the 'PDF' downloaded isn't really a PDF.

Hopefully your web hosting company will be able to help here. One other customer ran into this problem and their hosting company found that their 'hotlink protection' was causing this problem, and everything was fixed once that was disabled through cPanel. In fact, you may only need to check the option in cPanel to allow direct access via a URL entered directly into the browser.

Once the PDF is served correctly by your site, the plugin should have no problems at all.

Please just send us a link to the problem page on your site if this doesn't help you.

Secure Troubleshooting

When you click the link to download the ZIP file for a plugin you've purchased, you may find that it appears to be a folder of files instead of one ZIP file.

This is usually because Safari tries to be 'helpful' and unzips the ZIP immediately upon downloading. This isn't what you wanted - you need the ZIP intact.

You should normally still be able to find the original ZIP if you go to your Downloads folder, or you could try 'Compressing' the folder to recreate the ZIP for yourself.

Alternatively, you can change this behavior in Safari. Go to Preferences > General, and then uncheck the option "Open 'safe' files after downloading".

Go back to the original link and try to download the ZIP file again.

If you see 'Invalid PDF Structure' where you expected the PDF to display, this may be due to server configuration problems. Either the encrypted file isn't being streamed correctly to the browser (maybe due to gzip being applied incorrectly), or the decryption key in the browser is stale.

Reload the page to check it's not a one-off. Clear any cache (e.g. through a caching plugin), and ideally disable the cache for the page containing the secure PDF going forward. That should ensure the latest decryption key is used and may fix the problem.

In any case, please just get in touch for our help in diagnosing the problem.

This only applies if you are using the Secure version of PDF Embedder.

If you have the 'disable right click' option selected, but this doesn't seem to be effective, then most likely your PDF isn't uploaded in secure mode. Please see the instructions on how to turn on secure mode and upload the PDF again.

When you are logged in to the site as an admin and view the page containing the PDF, you should see a 'secure' marker in the toolbar if it is displaying in secure mode.

If you right-click on the embedded PDF and Inspect Element, maybe you can see the direct URL of the PDF file. This might be disconcerting since you expected the 'secure' PDF to be obscured.

However, take a look at the URL. If it does not contain 'securepdfs' then it has not uploaded in secure mode, so please see instructions above and try again.

If it does contain 'securepdfs', then copy the URL to the clipboard and try to access it directly. You should see a '403 unauthorized' message - which is great, since the PDF is supposed to be protected and only visible within the viewer. If you can downloaded the PDF direct then that's a problem, and indicates something is wrong. On non-Apache servers, extra work may be required to ensure the 'securepdfs' folders are protected against direct access. For example, see a typical configuration required for nginx.

The problem is the size of the file (in MB), unfortunately it just takes longer to process and transmit larger file sizes.

Non-secure version of the file loads more quickly because there isn't an encryption overhead and it is possible to transmit in chunks since it does not need to be encrypted.

The possible solutions are:

  • Optimize the PDF itself so that it is smaller. Perhaps try a service such as Smallpdf.
  • Fine-tune the web server (and/or upgrade it). It might be possible to upgrade the memory/processing capabilities of your server to ensure processing happens more efficiently. All of this would need your web host's involvement.
  • There is the option to cache the encrypted version of the PDF so only the first time the PDF is viewed will it be need to be encrypted. The 'Cache Encrypted PDFs' option can be checked on the Secure tab of the plugin settings.

Ultimately, if you find secure PDFs are too slow for your site, you may prefer to try uploading the PDFs in non-secure mode instead. It is a trade-off for how important you think the 'secure' functionality is in your case.

For users of our PDF Embedder Secure plugin.

If your web server is using the NGINX software at its heart (most WordPress installations run under Apache instead), then you will probably need to take extra steps to secure your /securepdfs/ folder so that the PDF Embedder Secure plugin can do its job fully.

For example, if your shortcodes show something like this:

[pdf-embedder url="https://example.com/wp-content/uploads/securepdfs/2015/01/Plan-Summary.pdf"]

Try entering the url in your web browser directly. You should not be allowed to download the PDF directly.

Your web host should be able to help protect the /securepdfs/ folder from direct access. An example configuration is as follows:

location ~ ^/(wp-content/uploads/securepdfs) {
    allow 127.0.0.1;
    deny all;
    proxy_pass http://127.0.0.1:6776;
}

A couple notes when upgrading from the Premium to the Secure plugin:

  1. You will receive a new plugin download and license (available on your Purchase History dashboard). You must deactivate the Premium version of the plugin before you activate the Secure, otherwise you will receive a fatal error (only one version can be activated at one time),
  2. Any PDFs that you had previously uploaded to your site will need to be re-uploaded in order to have them placed in the "securepdfs" folder located in wp-content/uploads of your site (folder will be created automatically with the first upload).
    • You can move existing PDFs either by uploading again via the Add Media, or using FTP / your webhost's File Manager to move the files.
    • Additional steps to register the media files in the database after using FTP must be completed before the PDFs will appear in the Media library (tutorial article).
    • Any shortcodes already added to your content will need to be updated with the new file path.
  3. There is a set up guide specific to the Secure version of the plugin here: https://wp-pdf.com/secure-instructions/

Tutorials

The PDF Embedder plugin v.4.0 for the free, Premium, and Secure versions work with WordPress v.5.0 and Gutenberg Editor plugin v.4.6.1.

Open the Common Blocks menu and select the PDF Embedder:

An element will be inserted into the page / post content. Click on the generated link to navigate to the Media Library:

Select or Upload your PDF and click the "Select" button. The element will now display the URL to the document you are embedding:

With the block element selected as per screenshot above, you can also customise the specific height, width, toolbar location and behavior from the menu to the right for that particular embed. If this is left blank, the defaults configured in the plugin Settings tab will be used instead.

The plugin also works with the Classic Editor block with the Add Media button to embed the PDF normally—this is also the best way to insert a thumbnail image and have it linked to the PDF's attachment page, or use the Shortcode block to copy and paste the PDF's URL into the shortcode added manually [pdf-embedder url="path-to-pdf"]:

When using a theme that has a module based layout builder such as Elementor, WPBakery, DIVI Builder, Beaver Builder, etc. the regular embed method will result in the PDF appearing as a link instead of the expected embedded viewer. Most of these drag and drop editors use their own propriety method to access the Media Gallery with breaks the automatic shortcode insertion by the PDF Embedder plugin.

A Text, HTML, Raw Code, or Shortcode module is required to insert the PDF successfully.  This will need to add this manually to the page or post content. It is suggested that the Media Gallery is kept open in another browser tab for convenience.

  1. With the layout editor, use a module that supports plain text, raw HTML, or code,
  2. Manually enter [pdf-embedder url=" "],
  3. From the Media Gallery tab, select the PDF to be embedded and copy the File URL (triple click to highlight, Ctrl+V / right-click copy),
  4. Paste the URL into the shortcode,
  5. Publish the page / post.

This method will add the required shortcode to embed the PDF so that the PDF will be displayed in the viewer on the front end of the site.

Elementor layout builder example

Divi theme builder example

It should be possible to override the border color by adding something like this to your Theme's styles:

/* CHANGE BORDER COLOUR */
div.pdfemb-viewer {
    border: 1px solid red !important;
}

To hide the border, you would use:

/* HIDE BORDER */
div.pdfemb-viewer { 
     border: none !important; 
}

To change the color of the toolbar, you would use:

/* CHANGE TOOLBAR COLOUR */
div.pdfemb-toolbar {
    background-color: red !important;
}

To hide the toolbar, you could try:

/* HIDE TOOLBAR */
div.pdfemb-toolbar {
   display: none !important;
}

Change the colour of important toolbar buttons:

/* CHANGE FS BUTTON TO MAKE IT MORE OBVIOUS TO MINIMIZE */
button.pdfemb-fs.pdfemb-toggled {
    background: red !important;
}
button.pdfemb-fs.pdfemb-toggled:hover {
   background: darkred !important;
}
/* CHANGE DOWNLOAD BUTTON COLOUR */
div.pdfemb-toolbar button.pdfemb-download {
	background-color: red !important;
}
div.pdfemb-toolbar button.pdfemb-download:hover {
	background-color: darkred !important;
}

Change the colour of links embedded in the PDF when interacted with (colours listed are defaults):

/* CHANGE COLOUR OF LINKS ON HOVER IN DOCUMENT */
.pdfembAnnotationLayer .linkAnnotation > a:hover {
    opacity: 0.5 !important;
    background: yellow !important;
    box-shadow: 0px 2px 10px yellow !important;
}

Change the style of the scrollbars (this has limited support across browsers):

/* Works on Firefox */
.pdfemb-pagescontainer {
  scrollbar-width: thin; /* "auto" or "thin" */
  scrollbar-color: blue orange; /* scroll thumb and track */
}

/* Works on Chrome, Edge, and Safari */
.pdfemb-pagescontainer::-webkit-scrollbar {
  width: 12px; /* width of the entire scrollbar */
}

.pdfemb-pagescontainer::-webkit-scrollbar-track {
  background: orange; /* color of the tracking area */
}

.pdfemb-pagescontainer::-webkit-scrollbar-thumb {
  background-color: blue; /* color of the scroll thumb */
  border-radius: 20px; /* roundness of the scroll thumb */
  border: 3px solid orange; /* creates padding around scroll thumb */
}

Of course, you might need to ask your web designer to help if you're not sure where to add that for your particular site. The best arrangement is to have a child theme and to add the above code to the style.css there, but the easiest method is to paste the code into Appearance -> Customize -> Additional CSS.

The default settings of the plugin will display your PDF at 'maximum width' to fit the area available to it.

If you specify a fixed width for your PDFs that is smaller than the width available, you will probably find the PDF is left-justified within the main area of your web page.

If you want to center the PDF, this depends on your theme's CSS styles, so you might need to ask your web designer to take a closer look, but one way or another you'd need to target the following CSS element in your theme's style.css file:

div.pdfemb-viewer {
    margin: 0px auto !important;
}

It is unlikely the above suggestion would work directly - again, it depends on the rest of your CSS and layout, but hopefully, this clarifies what your web designer needs to target in the CSS.

You can also add bespoke CSS through Appearance -> Customize -> Additional CSS if you are using a classic theme.

If you use the new themes that support Block Editor, you can wrap the block with a shortcode of a PDF Embedder block into a Group block, and configure it to center all the content inside of it.

By default, web browsers have security policies that do not allow Javascript code to fetch files from a different domain to the web page on which the code is already running.

However, it is possible to configure Amazon S3 and other storage services to permit this, and then you'd just have to change the shortcode URL to point to the PDF on S3. i.e. [pdf-embedder url="<url to pdf on S3>"]

To do this, you must "enable CORS on S3 Buckets". To ensure that browsers are able to access the files stored on S3, follow these steps:

  • Navigate to the AWS console and find the S3 configuration area
  • Select the bucket you are using to store your assets
  • Click the ‘Properties’ tab
  • Under ‘Permissions’ click ‘Add CORS Configuration’

AWS will provide a default XML configuration that should work correctly:

<CORSConfiguration>
  <CORSRule>
          <AllowedOrigin>*</AllowedOrigin>
          <AllowedMethod>GET</AllowedMethod>
          <MaxAgeSeconds>3000</MaxAgeSeconds>
          <AllowedHeader>Authorisation</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

However, you may prefer to limit access to your own WordPress site's domain, for security reasons:

<CORSConfiguration>
     <CORSRule>
          <AllowedOrigin>http://www.mysite.com</AllowedOrigin>
          <AllowedOrigin>https://www.mysite.com</AllowedOrigin>
          <AllowedMethod>GET</AllowedMethod>
          <AllowedMethod>HEAD</AllowedMethod>
          <MaxAgeSeconds>3000</MaxAgeSeconds>
          <AllowedHeader>Authorization</AllowedHeader>
     </CORSRule>
</CORSConfiguration>

Update December 2020
Newer accounts using S3 may require JSON instead of XML. In that instance, the code would be:

[
    {
        "AllowedHeaders": [],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]

Again, if you wish to limit access to your own WordPress domains, the JSON would look like:

[
    {
        "AllowedHeaders": [],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "http://domain.com"
        ],
        "ExposeHeaders": []
    },
    {
        "AllowedHeaders": [],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "https://domain.com"
        ],
        "ExposeHeaders": []
    }
]

IMPORTANT NOTE: when copy and pasting your site's URL into the JSON code, the browser will include the trailing slash "/" at the end of the address (i.e. http://domain.com/). This is incorrect and will result in an error. Make sure to delete the trailing slash (i.e. http://domain.com).

Using CloudFront with S3

If you also use CloudFront as a CDN to serve S3 media faster, you will also need to enable Header Forwarding in CloudFront. Select the CloudFront distribution that is paired with the S3 bucket. Under Distribution Settings go to the Behaviours tab, then click the behaviour (if you have more than one, you'll need to do the following for all of them) and click Edit. Change the Forward Headers dropdown to 'Whitelist'. Select 'Origin' in the left-hand list and click 'Add' to move it to the right-hand list. Click Yes, Edit to save and then wait for CloudFront to propagate the change (approx 30 mins).

Using CloudFront standalone

It is also possible to use CloudFront to directly serve your site's media by taking your files directly from your WordPress site (not via S3 at all). They call your website a 'Custom Origin'. In this case, please follow these steps:

  1. Include the header Access-Control-Allow-Origin: * when serving PDFs on your WordPress site.For example in your .htaccess file on Apache:
    <FilesMatch ".pdf">
    Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
    
  2. Edit your CloudFront distribution Behavior to Forward Headers and add Origin to the whitelist:

    (Image credit unsharptech.com)
  3. Invalidate the cache in the AWS console or just wait until CloudFront refreshes its cache automatically.

Secure Plugin

Please note that the Secure version of the plugin, when in secure mode, can only display PDFs that are stored on your WordPress server in its 'securepdfs' folder, and not easily via a CDN or similar.

CORS is already enabled on some Dropbox domains, so it can be possible to embed PDFs directly from Dropbox, although only if your site is running under HTTPS. Try the following. Obtain the 'share' link from Dropbox ('Copy Dropbox link' from the right-click menu in your file browser). It should be something like this:

https://www.dropbox.com/s/09ctqeg1hd9soi2/Example-PDF-Document.pdf?dl=0

You need to change the domain to dl.dropboxusercontent.com and set the dl=0 parameter to 1. So you end up with a shortcode as follows:

[pdf-embedder url="https://dl.dropboxusercontent.com/s/09ctqeg1hd9soi2/Example-PDF-Document.pdf?dl=1"]

If you obtain the link from a Public folder, you may only need to change the dl=0 to dl=1 for it to work.

The Thumbnails plugin generates images of the PDF for you. You can display the thumbnails as a grid on a page or post; however, this is something you would do as part of editing your content rather than a plugin setting or functionality.

With both plugins activated, selected the PDF you want to add to the page as a thumbnail in the grid. (If you are on WP5 and/or Gutenberg 4.6.1, use the Classic Editor block for this.)

Select Link To: Attachment Page.

Select Media: Thumbnail to use the thumbnail image. Set your Alignment to Left so that the thumbnails will "float" next to each other. See screenshot:

If done correctly, the code inserted into the page will look like:

<a href="http://domain.com/attachment-page-of-pdf-name/" rel="attachment wp-att-#" title="PDF Title" target="_blank">
   <img src="http://domain.com/wp-content/uploads/2017/09/pdf-name-pdf-image-150x150.jpg" alt="" width="150" height="150" />
</a>

The end result looks like:
PDFThumbnails_embedDirectly_example.jpg
Please note that depending on your theme, you may need to add some CSS to fix margins and or spacing to get a full grid layout.

This method will work with both the Premium and Secure versions of the PDF Embedder plugin. If you are using the PDF Secure Embedder, you must manually activate the automatic generation of attachment pages in the Secure settings.

Generally, you will use the plugin to embed a PDF in a WordPress page through the 'Add Media' button in the page editor, selecting the PDF you want in the page. You can add further content above and below the PDF, but sometimes you just want a basic page template to show only the PDF. And if you have many PDFs to embed, manually creating these 'container pages' is time consuming.

The Premium versions of the plugin allow you to automatically generate such pages using a WordPress feature called 'Attachment Pages'.

WordPress automatically generates a page corresponding to every item uploaded to the Media Library. PDF Embedder Premium (and Premium Secure) will insert an embedded version of the PDF in the Attachment Page corresponding to any PDF in the Media Library.

To find the Attachment Page for a PDF, click once on the PDF in Media Library and then you should see a link to 'Attachment Page' on the right. You will need to view the Media Library in grid (not table) format for this to be available.

Click the link to the Attachment Page and you should see an embedded version of the PDF. You could link directly to this Attachment Page directly elsewhere in the site.

Please note that by default, Attachment Pages are not generated for PDFs uploaded in 'secure mode'. You can enable secure Attachment Pages through a setting in the Secure tab in the plugin settings ("Auto-generate Attachment Pages for Secure PDFs").

PDF Embedder Secure Troubleshooting

Some SEO plugins have the option to redirect links to a file's URL; however, this is in direct conflict with the security permissions needed to prevent direct access to the file as protected by the PDF Embedder Secure plugin. To resolve this conflict, redirects must be disabled within the SEO plugin.

When you select a PDF from the Media Library to insert into your post, by default PDF Embedder will insert it as a shortcode: [pdf-embedder url="<url of PDF>"]. This will cause it to use the plugin's interactive viewer to display the PDF when the page is published.

You can also type the shortcode manually, and maybe you don't normally want the shortcode to be inserted automatically - perhaps most often you just want the WordPress default of a straight 'a href' link to the source PDF file. Another scenario is that some other plugins can break if they use the Media Library to select files for use elsewhere, and they just need WordPress' default link to be inserted - the pdf-embedder shortcode can break them.

To ensure the shortcode is not inserted automatically by default, you can add the following code to your Theme's functions.php or a functions plugin such as My Custom Functions or Functionality (please take backups first as incorrect editing can break your site).

add_filter('pdfemb_override_send_to_editor', 'my_pdfemb_override_send_to_editor', 10, 4);

function my_pdfemb_override_send_to_editor($shortcode, $html, $id, $attachment) {
    return $html;
}

This requires version 2.7.3+ to work.

With a little bit of HTML / CSS you can accomplish this. You will likely want to set a default max-width in the plugin settings or you can use the width attribute to the shortcode to limit the viewer width on specific embeds - I mention it just for future reference in case you want to set other documents at wider or narrower dimensions than your preset default (https://wp-pdf.com/premium-instructions/shortcodes/).

Create a new CSS class with the following rules (you may want to add other margins to suit your theme):

.left {
     float: left; 
     margin-right: 10px; /* set a right margin to push the wrapped text off the viewer box */
}

Then in the page / post content using the Text (HTML) tab, wrap the embedder shortcode in a div with the new class:

<div class="left">
     [pdf embedder shortcode]
</div>

The end result:

PDF Embedder doesn't provide a way to accept payment from users before they are allowed to view a PDF, but PDF Embedder Secure can be used in conjunction with other plugins to ensure PDFs are not available until users have paid to access them.

Pay before downloading

You don't really need any of our plugins to force users to pay for a PDF before they can download it directly to their computer. If you want to sell PDFs in this way, check out something like Easy Digital Downloads that can store your files securely and provide a download link only once the user has paid.

Preview before paying to download

Some sites want users to be able to preview a PDF, but then not download fully until they pay for the PDF. To do this, use a combination of a 'digital sales' system (such as Easy Digital Downloads suggested in the previous section) and our PDF Embedder Secure plugin.

The easiest thing will be to maintain two copies of your PDF: one uploaded directly to a 'Download' for sale, and secured by the digital sales plugin; the other to be uploaded to your Media Library as a secure PDF. The 'secure PDF' means that it is difficult for users to obtain the original PDF directly, but they will be allowed to view it within any WordPress page on which you embed it.

So you can embed the 'secure PDF' on your public-facing website through the 'Add Media' button, perhaps with an option beneath the embedded preview PDF to 'buy the full download' through your sales plugin. You might even choose to upload a shortened version of the PDF and embed that as your preview to tempt visitors to buy the full download.

Pay to view the PDF

Membership sites might only want paying users to be able to view the PDF at all - and not be able to download it to their computer either (although it can never be possible to completely prevent a determined user from doing so). To do this, you would set up a membership site using a plugin such as s2Member. A free version of this is available in the WordPress plugin directory.

Set up s2Member on your site, integrating with PayPal so people can pay to become members. Then, with PDF Embedder Secure active on your site, you would upload your PDF to your Media Library. Create a new WordPress Page and embed your PDF there through 'Add Media' in the page editor.

For your new page, change the s2Member page level restrictions to 'level #1' or higher to ensure only paid members can view the entire page (and therefore the embedded PDF too):

Check your 'secure' PDF is not directly accessible

In either case above, if you want viewers of your PDF to be unable to obtain the PDF directly, you should check the PDF is definitely embedded in 'secure mode'. Sometimes, web server configuration can require extra steps before this is working correctly.

The URL to the PDF in the pdf-embedder shortcode should contain 'securepdfs' in it somewhere. Copy and paste the full URL to the PDF in a new browser tab. It should not be directly accessible, so you should see an 'unauthorized' or 'not found' message. If you do get to see the PDF through its URL, check the instructions to understand the plugin settings, or get in touch with us.

You can set most settings in the Settings -> PDF Embedder page in WordPress. These apply to all embeds by default, but you can override the settings of individual embeds by manually adding shortcode parameters to the individual [pdf-embedder] shortcodes - see details here.

It is also possible to override the global defaults by writing PHP code, using a filter named 'pdfemb_filter_shortcode_attrs'.

For example, to add the 'pagetextbox' option to every embed so you don't have to add it to every shortcode manually (there is no global setting available for this parameter), you could add the following code to your Theme's functions.php or similar:

add_filter('pdfemb_filter_shortcode_attrs', 'mypdfshortcodes', 10, 1);

function mypdfshortcodes($atts) {
   $atts['pagetextbox'] = 'on';
   return $atts;
}

You could inspect the value of $atts['url'] if you want to vary the attributes based on the specific PDF file being displayed.

There is no option to automatically open up in full screen mode.

The best alternative is to create a 'full page' template in your theme that doesn't have many of the features of most pages (e.g. header menu and sidebars) and allows the content to take up most of the width of the page.

Note: this code will only work with the Premium and Secure versions of the plugin and only with files served from the /wp-content/uploads directory on your server.

You will need to write a bit of PHP for this feature. The code can be added to a custom or child theme's functions.php file or by using a plugin that inserts PHP code into your site such as My Custom Functions or Functionality*.

The PHP code:

// Code for PDF Embedder Counts

function pdfemb_get_attachment_id($url, $invertscheme=false) {
   global $wpdb;

   if ($invertscheme) {
      $url = set_url_scheme($url, preg_match('#^https://#i', $url) ? 'http' : 'https');
   }

   $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $url));
   if (is_array($attachment) && isset($attachment[0]) && $attachment[0] > 0) {
      return $attachment[0];
   }
   return false;
}

function pdf_embedder_counts($atts, $content = "") {
   if (!isset($atts['url'])) {
      return '<b>PDF Embedder counts requires a url attribute</b>';
   }
   $url = $atts['url'];
   $post_id = pdfemb_get_attachment_id($url);
   if (!$post_id) {
      $post_id = pdfemb_get_attachment_id($url, true);
   }
   if ($post_id) {
      $count_views = get_post_meta($post_id, 'pdfemb-views', true);
      $count_downloads = get_post_meta($post_id, 'pdfemb-downloads', true);
      if (is_numeric($count_views)) {
         $content .= 'Views: '.$count_views;
      }
      if (is_numeric($count_downloads)) {
         $content .= ' Downloads: '.$count_downloads;
      }
   }
   return $content;
}

add_shortcode('pdf-embedder-counts', 'pdf_embedder_counts');

You will need to use the Classic editor block if using the blocks editor or a Text/HTML/Code module with a drag and drop editor. In the page or post content, use the following shortcode replacing the path-to-pdf.pdf with your document's file path:

[pdf-embedder-counts url="path-to-pdf.pdf"]

Add the document title, thumbnail, or a link to the embed page and the end result will be something similar to this (the stats will update whenever the page is loaded):

* WP-PDF.com has no affiliation with either of these plugins

​If you want to change the icons for the buttons, you would need to upload new images and point the CSS to those images. The icons are located in the /img/ directory of the plugin and the CSS to call those images:

/* DOWNLOAD BUTTON IMAGE CSS */ 
​div.pdfemb-toolbar button.pdfemb-download::before {
​     content: url(../img/toolbarButton-download.png); 
​}  

/* ZOOM OUT BUTTON IMAGE CSS */ 
​div.pdfemb-toolbar button.pdfemb-zoomout::before {
​     content: url(../img/toolbarButton-zoomOut.png); 
​}  

/* ZOOM IN BUTTON IMAGE CSS */ 
​div.pdfemb-toolbar button.pdfemb-zoomin::before {
​     content: url(../img/toolbarButton-zoomIn.png); 
​}  

/* PREV PAGE BUTTON IMAGE CSS */ 
​div.pdfemb-toolbar button.pdfemb-prev::before {
​     content: url(../img/toolbarButton-pageUp.png); 
​}  

/* NEXT PAGE BUTTON IMAGE CSS */ 
​div.pdfemb-toolbar button.pdfemb-next::before {
​     content: url(../img/toolbarButton-pageDown.png); 
​}  

/* FULLSCREEN BUTTON IMAGE CSS */ 
​div.pdfemb-toolbar button.pdfemb-fs::before {
​     content: url(../img/toolbarButton-presentationMode.png); 
​}

To include the attachment page of your embedded PDFs in the search results, add a small PHP snippet to your theme's functions.php file (if using a child theme or theme that has option to add custom functions without altering the original theme code), or add the snippet to a custom code plugin such as My Custom Functions or Functionality.

The code to add is as follows and will instruct your site to include attachment page URLs to the search results:

function attachment_search( $query ) {
    if ( $query->is_search ) {
       $query->set( 'post_type', array( 'post', 'attachment' ) );
       $query->set( 'post_status', array( 'publish', 'inherit' ) );
    }
   return $query;
}

add_filter( 'pre_get_posts', 'attachment_search' );

The PDF Embedder plugin has a translation template file located in the /lang/ folder within the plugin directory. You can use the pdf-embedder.pot to translate the plugin to another language.

You will want to use a program such as POEdit (free) to open the template file (pdf-embedder.pot) and create your translation.

filedirectory.png

Location of lang folder in plugin heirarchy

You will save your translated file as pdf-embedder-xx_XX.po where xx_XX is the language code for your translation (this corresponds to the language selected in your WordPress installation under Settings > Site Language).

Upload both the PO and compiled MO files back into the /lang/ folder. Both files must be uploaded for the translation to work: the PO file tells the plugin what text strings are translated and the MO file applies the new words.

Flush any caches on your site and reload the page where the PDF has been embedded. The translated text should now appear on the embedded viewer.

Release Notes

= 5.1.4 =

  • Fix: Clicking PDF links not opening.
  • Fix: Toolbar defaults not being respected.
  • Fix: Some characters not displaying in PDFs.

= 5.1.3 =

  • Fix: Prevent plugins from injecting content into the PDF frame.

= 5.1.2 =

  • Fix: Theme Conflicts preventing PDF loading.
  • Fix: Theme styling conflict.
  • Fix: PDF scaling incorrectly.
  • Fix: Cases that removed the admin bar.

= 5.1.1 =

  • Added: PDF Text Search.
  • Added: Upgrade the pdfjs library version.

= 5.0.2 =

  • Hotfix: wrong extract folder name fix added.

= 5.0.1 =

  • Roll back scripts

= 5.0.0 =

  • Update scripts for new features

= 4.4.3 =

  • Wrong extract folder name fix added

= 4.4.2 =

  • Added support for the Italian language
  • Added compatibility for WordPress 5.7

= 4.4.1 =

  • Fix language compatibility issue in the viewer
  • Fixes JS and CSS files cache issue
  • Added compatibility for WordPress 5.3.2

= 4.4 =

  • Added compatibility for WordPress 5.3
  • Fixes multiple PDF rendering issues in the viewer (i.e. jumping pages, etc.)

= 4.3 =

  • Fixed Scrollbar issues with Firefox and iOS devices. Improved compatibility

= 4.2 =

  • Fixed script problems on some Gutenberg editor installations. Improved compatibility

= 4.1 =

  • Added compatibility for WordPress 5.2.1
    Fixed CSS problems for Mac Devices

= 4.0 =

  • Added compatibility for WordPress 5.0

= 3.2 =

  • Added Compatibility for Gutenberg Editor

= 3.1.8 =

  • Updated to use the latest rendering library pdf.js. Fixes some 'strange character' issues amongst other improvements.
  • No longer needs a standalone compatbility.js file so this is not loaded in your site anymore.
  • Translation files added for HU locale.

= 3.1.6 =

  • Recalculates fresh viewer size more often in response to resize events. Previous versions attempted to increase performance by only recalculating viewer size when it had changed, but this missed some required resizing after Javascript-based tabs were clicked.

= 3.1.5 =

  • Fixed some issues with the zoom appearance.
  • In full-screen mode, when continuous page scrolling is off, now jumps to the start of a page when next/prev is clicked.

= 3.1.4 =

  • The mouse scroll wheel is now more consistent across all browsers (in terms of scroll speed).
  • No longer jumps to the start of the doc on window resize.
  • The view in the Full Screen button no longer scrolls underneath the large button.
  • When scrollbars are always visible, they no longer cut off the edge of the PDF underneath.

= 3.1.2 =

  • Updated for compatibility with the upcoming WordPress 4.8 release.
  • The new mouse wheel fix for Firefox wasn't working with some themes.

= 3.1.1 =

  • Updated to the latest version of pdf.js, the underlying library which is used to render the PDFs.
  • Fix for mouse wheel issue on Firefox - window was sometimes scrolling when only the document was supposed to.
  • Minor CSS additions to prevent conflicts with a particular theme.

= 3.0.1 =

  • PLEASE NOTE PAGE TURNERS have been removed from the plugin - the large left/right arrows that can appear at the edge of the PDF on mouse hover. They are considered redundant now continuous page scrolling is available (see below).
  • Continuous page scrolling. Use the mouse or touch to scroll straight onto the next page without having to click the next/prev buttons anymore.
  • Option to switch off the new 'Continous Page Scrolling' feature so the user has to click the next/prev buttons to change pages as in previous versions.
  • Options to add vertical and/or horizontal scrollbars. Shortcode version is scrollbar = 'vertical', 'horizontal', 'both', or 'none'. Default is none.
  • Fix to tidy up the HTML generated by the plugin which was being removed by the W3 Total Cache plugin leading to functionality being restricted.
  • Scrolling by touch or mouse will now defer to the browser when at the very top or bottom of the PDF. This means that when you already scrolled to the very bottom of the PDF, further scrolling will cause the whole web page to scroll down instead of nothing happening. Previously, it was sometimes difficult to navigate to the section of the web page below the embedded PDF.
  • The plugin now respects the SCRIPT_DEBUG flag in the wp-config.php file and displays non-minified versions of the JS files if this is set to true. Helps debug any issues.
  • No longer displays 'opt-in to beta updates' to new installs.
  • Added NL language.

= 2.9.2 =

  • You can now opt-in to receive early beta releases of the plugin - change this setting in the License tab of the plugin settings.
  • Multisite enhancements - it is now possible to either Network Activate the plugin (recommended) or allow individual sub-sites to Activate on a per-site basis. This was always possible, but the plugin settings could not be accessed in per-site mode. It may still be necessary to set the license on the Network admin version of the plugin settings, so you would try network activating to set the license key only, then revert to per-site activation if desired.

= 2.8 =

  • 'Page Turner' arrows appear when hovering over the left/right edges of the PDF for easier navigation. This can be turned off in settings or by individual shortcodes.
  • Toolbar position now has an option 'No Toolbar' to completely remove the toolbar (and presumably rely on the new page-turners for page navigation).

= 2.7.5 =

  • Fixed display (and touch screen zoom) on high-resolution screens under certain browsers/devices.
  • The latest ZIP is now available through a link in the License tab, so it can be obtained in cases where the automatic update fails on the Plugins page.

= 2.7.3 =

  • Tested up to WordPress 4.6.
  • Title parameter only inserted into shortcode if needed, to keep things tidy.
  • Added filter my_pdfemb_override_send_to_editor so you can turn off the shortcode generation.

= 2.7 =

  • Improved support for high-resolution displays (retina).
  • Reduced 'flicker' when moving around documents on mobiles.
  • Uses the latest version of the pdf.js library for rendering PDFs.
  • Improvements to help with SEO ranking through embedded PDFs: the PDF embed initially appears as a link to the PDF file, through the link text provided in a new 'title' shortcode parameter (or the base filename if no 'title' is specified). This should be visible to search engine crawlers, and also to viewers in the case of Javascript failure or delay.
  • Toolbar buttons have an type="button" attribute to avoid conflicts with some other plugins.
  • Spanish translation contributed by Armando Landois.
  • pdfemb_filter_shortcode_attrs filter so developers can change default shortcode parameters through code.

= 2.5.5 =

  • Added keyboard shortcuts in fullscreen mode. Cursor keys to move about the current page, +/- to zoom in/out, Page Up or Page Down to move to the next/prev page (Use Fn + Down/Up Arrow on a Mac).
  • New zoom="x" shortcode parameter to start display on a specified zoom percentage.
  • Fix for Right-to-Left languages.

= 2.5.4 =

  • Added French translation.
  • Confirmed to work with WP4.5 including resolving a layout conflict with the new Twentysixteen theme.

= 2.5.3 =

  • New shortcode parameter: pagetextbox="on" to ensure the 'page number' text box is always visible for the user to enter a page number to jump to. If omitted or "off", the user needs to click on the page number display for it to change into a text box, as before.

= 2.5.1 =

  • Displays error message if the user attempts to Activate when the free version of the plugin is already Active.

= 2.5 =

  • Uses the latest version of underlying pdf.js technology to render PDFs.
  • New option 'Scroll to top of the page when user clicks next/prev'.
  • 'Attachment Pages' for PDFs now use the PDF Embedder viewer to display them - WordPress default is just a link to the PDF file.

= 2.4.7 =

  • Some settings were difficult to change under a WordPress multisite install.

= 2.4.4 =

  • Hyperlinks are fixed for certain mobile devices.
  • New option to improve mobile zooming on some sites.

= 2.4.3 =

  • Option in Settings to open hyperlinks in new tab/window - can be overridden in shortcode using newwindow="on|off".
  • Now supports internal hyperlinks.

= 2.4.1 =

  • Track the number of views and downloads - displays next to the PDF's other info in the Media Library.

= 2.4 =

  • Hyperlinks are now supported - both internal within PDF and external to other web pages.
  • Jump straight to page number by clicking on Page and typing the number.
  • The new shortcode parameter page="x" opens up a document on a specified page number.
  • Translation-ready! Please contribute your translations.
  • Compatibility with WordPress 4.4.

= 2.2.5 =

  • Better explanation of some error messages (e.g. attempt to access PDF on a different domain).
  • Forced white background by default - some Theme's CSS would override.

= 2.2.4 =

  • Option to add 'Download PDF' button to toolbar.

= 2.2.3 =

  • No longer complains of invalid license in some cases where it shouldn't.

= 2.2.2 =

  • Redesigned toolbar buttons

= 2.2 =

  • The new version of PDF.js fixes some PDF rendering bugs.

= 2.1.7 =

  • Fixed a bug with full-screen height calculation which left the toolbar invisible in full-screen mode.

= 2.1.6 =

  • Height can be specified in global Settings -> PDF Embedder and pulls through correctly as a default in any shortcode that doesn't already have its height specified.

= 2.1.4 =

  • Obtains PDF over same transport (https/http) as host page, regardless of that specified in the shortcode url parameter. This avoids conflicts and failure to display PDF if the two don't match.

= 2.1.3 =

  • Fixes to workaround iPhone Safari bugs.

= 2.1.1 =

  • ESC to exit full-screen mode. Automatic plugin updates. Settings now contain site-wide defaults for appearance (width/toolbar) - and can be overridden by shortcodes.

= 5.1.4 =

  • Fix: Clicking PDF links not opening
  • Fix: Toolbar defaults not being respected
  • Fix: Some characters not displaying in PDFs

= 5.1.3 =

  • Fix: Prevent plugins from injecting content in pdf frame

= 5.1.2 =

  • Fix: Theme Conflicts preventing pdf loading
  • Fix: Theme styling conflict
  • Fix: PDF scaling incorrectly
  • Fix: Cases that removed admin bar
  • Fix: Cases where download link wasnt working on secured pdfs

= 5.1.1 =

  • Added: Fix cases where secure PDF doesn't load.

= 5.1.0 =

  • Added: PDF Text Search
  • Added: Upgrade pdfjs versions

= 5.0.2 =

  • Hotfix: wrong extract folder name fix added

= 5.0.1 =

  • Roll back scripts

= 5.0.0 =

  • Update scripts for new features

= 4.4.5 =

  • Added support for the Italian language
  • Added compatibility for WordPress 5.7

= 4.4.4 =

  • Bug fixing for denying direct file access for different Apache versions
  • Added compatibility for WordPress 5.5.3

= 4.4.3 =

  • Added compatibility for Windows server users
  • Added compatibility for un-minified JS users
  • Fixes added for the cache plugins

= 4.4.2 =

  • Added fixes for denying direct file access for different Apache versions
  • Added compatibility for WordPress 5.5.1

= 4.4.1 =

  • Fix language compatibility issue in the viewer
  • Fixes JS and CSS files cache issue
  • Added compatibility for WordPress 5.3.2

= 4.4 =

  • Added compatibility for WordPress 5.3
  • Fixes multiple PDF rendering issues in the viewer (jumping pages, etc.)

= 4.3.2 =

  • Fixed version update issue

= 4.3.1 =

  • Fixed compatibility with other plugins

= 4.3 =

  • Fixed Scrollbar issues with Firefox and iOS devices. Improved compatibility

= 4.2 =

  • Fixed script problems on some Gutenberg editor installations. Improved compatibility

= 4.1 =

  • Added compatibility for WordPress 5.2.1
  • Fixed CSS problems for Mac Devices

= 4.0 =

  • Added compatibility for WordPress 5.0

= 3.2 =

  • Added Gutenberg Compatibility

= 3.1.8 =

  • Updated to use the latest rendering library pdf.js. Fixes some 'strange character' issues amongst other improvements.
  • No longer needs a standalone compatbility.js file so this is not loaded in your site anymore.
  • Translation files added for HU locale.

= 3.1.6 =

  • Recalculates fresh viewer size more often in response to resize events. Previous versions attempted to increase performance by only recalculating viewer size when it had changed, but this missed some required resizing after Javascript-based tabs were clicked.

= 3.1.5 =

  • Fixed some issues with the zoom appearance.
  • In full-screen mode, when continuous page scrolling is off, now jumps to the start of a page when next/prev is clicked.

= 3.1.4 =

  • The mouse scroll wheel is now more consistent across all browsers (in terms of scroll speed). The new mouse wheel fix for Firefox wasn't working with some themes.
  • No longer jumps to the start of the doc on window resize.
  • The view in the Full-Screen button no longer scrolls underneath the large button.
  • When scrollbars are always visible, they no longer cut off the edge of the PDF file underneath.
  • New shortcode Text to provide a direct link to a secure file download, to be used by PDF Thumbnails 1.4.

= 3.1.1 =

  • Fix for mouse wheel issue on Firefox - window was sometimes scrolling when only the document was supposed to.

= 3.1 =

  • Attachment Pages are no longer generated by default for Secure PDFs. You can enable secure Attachment Pages through a new checkbox setting in the Secure tab of the plugin settings.
  • Updated to the latest version of pdf.js, the underlying library which is used to render the PDFs.
  • Allow Secure PDF filenames with double periods in them (..)
  • Minor CSS additions to prevent conflicts with a particular theme.

= 3.0.1 =

  • Fix to tidy up the HTML generated by the plugin which was being removed by the W3 Total Cache plugin leading to functionality being restricted.
  • Scrolling by touch or mouse will now defer to the browser when at the very top or bottom of the PDF. This means that when you already scrolled to the very bottom of the PDF, further scrolling will cause the whole web page to scroll down instead of nothing happening. Previously, it was sometimes difficult to navigate to the section of the web page below the embedded PDF.

= 3.0 =

  • PLEASE NOTE PAGE TURNERS have been removed from the plugin - the large left/right arrows that can appear at the edge of the PDF on mouse hover. They are considered redundant now continuous page scrolling is available (see below).
  • Continuous page scrolling. Use the mouse or touch to scroll straight onto the next page without having to click the next/prev buttons anymore.
  • Option to switch off the new 'Continous Page Scrolling' feature so the user has to click the next/prev buttons to change pages as in previous versions.
  • Options to add vertical and/or horizontal scrollbars. The shortcode version is scrollbar = 'vertical', 'horizontal', 'both', or 'none'. The default is none.
  • Caches encrypted secure PDFs (including an option to turn this off, either to save disk space on the server or in case of any problems). This should speed up the time it takes to view secure PDFs (the second time it is viewed onwards).
  • Secure PDFs should no longer display the 'Invalid PDF Structure' error message which happened in some server setups previously.
  • The plugin now respects the SCRIPT_DEBUG flag in the wp-config.php file and displays non-minified versions of the JS files if this is set to true. Helps debug any issues.
  • New watermark filters: pdfemb_watermark_var_names and pdfemb_watermark_var_values to add your own 'variables' alongside {username}, {email}, etc.
  • No longer displays 'opt-in to beta updates' to new installs.
  • Added NL language.

= 2.9.2 =

  • You can now opt-in to receive early beta releases of the plugin - change this setting in the License tab of the plugin settings.
  • Multisite enhancements - it is now possible to either Network Activate the plugin (recommended) or allow individual sub-sites to Activate on a per-site basis. This was always possible, but the plugin settings could not be accessed in per-site mode. It may still be necessary to set the license on the Network admin version of the plugin settings, so you would try network activating to set the license key only, then revert to per-site activation if desired.

= 2.8 =

  • 'Page Turner' arrows appear when hovering over the left/right edges of the PDF for easier navigation. This can be turned off in settings or by individual shortcodes.
  • Toolbar position now has an option 'No Toolbar' to completely remove the toolbar (and presumably rely on the new page-turners for page navigation).

= 2.7.7 =

  • Workaround for an obscure configuration on some servers which resulted in 'Invalid PDF Structure' errors. The 'Unicode BOM' characters were being inserted unexpectedly.

= 2.7.5 =

  • Fixed display (and touch screen zoom) on high-resolution screens under certain browsers/devices.
  • Watermarks are now much more consistent across different devices and zoom levels - previously, the location of the watermark could vary relative to the rest of the PDF. You may want to tweak any existing watermark settings to ensure you are still happy with the appearance.
  • The latest ZIP is now available through a link in the License tab, so it can be obtained in cases where the automatic update fails on the Plugins page.

= 2.7.3 =

  • Tested up to WordPress 4.6.
  • Title parameter only inserted into shortcode if needed, to keep things tidy.
  • Fixed conflict with other plugins that output too many warnings - was corrupting some secure downloads in obscure circumstances.
  • Added filter my_pdfemb_override_send_to_editor so you can turn off the shortcode generation.

= 2.7 =

  • Improved support for high-resolution displays (retina).
  • Reduced 'flicker' when moving around documents on mobiles.

= 2.6.6 =

  • New 'watermark' feature so you can add transparent text (including the logged-in user's name, username, or email) on top of secure PDF rendering to discourage sharing of screenshots.
  • Uses the latest version of the pdf.js library for rendering PDFs.
  • Improvements to help with SEO ranking through embedded PDFs: the PDF embed initially appears as a link to the PDF file, through the link text provided in a new 'title' shortcode parameter (or the base filename if no 'title' is specified). This should be visible to search engine crawlers, and also to viewers in the case of Javascript failure or delay.
  • Toolbar buttons have type="button" attributes to avoid conflicts with some other plugins.
  • Spanish translation contributed by Armando Landois.
  • pdfemb_filter_shortcode_attrs filter so developers can change default shortcode parameters through code.

= 2.5.5 =

  • Added keyboard shortcuts in fullscreen mode. Cursor keys to move about the current page, +/- to zoom in/out, Page Up or Page Down to move to the next/prev page (Use Fn + Down/Up Arrow on a Mac).
  • New zoom="x" shortcode parameter to start display on a specified zoom percentage.
  • Fixes for Right-to-Left languages.

= 2.5.4 =

  • Added French translation.
  • Confirmed to work with WP4.5 including resolving a layout conflict with the new Twentysixteen theme.

= 2.5.3 =

  • New shortcode parameter: pagetextbox="on" to ensure the 'page number' text box is always visible for the user to enter a page number to jump to. If omitted or "off", the user needs to click on the page number display for it to change into a text box, as before.
  • Fixed a potential timing problem that could have arisen if the browser chose to optimize script loading.

= 2.5.1 =

  • Displays error message if the user attempts to Activate when the free version of the plugin is already Active.

= 2.5 =

  • Uses the latest version of underlying pdf.js technology to render PDFs.
  • New option 'Scroll to top of the page when user clicks next/prev'.
  • 'Attachment Pages' for PDFs now use the PDF Embedder viewer to display them - WordPress default is just a link to the PDF file.

= 2.4.7 =

  • Some settings were difficult to change under a WordPress multisite install.

= 2.4.6 =

  • The download button now works when in Secure mode and Disable Right Click is enabled. There was a conflict between these two features in the previous version.

= 2.4.5 =

  • New option to disable right-click mouse menu over secure PDF embeds (to obscure 'save image as' functionality in browsers).

= 2.4.4 =

  • Hyperlinks are fixed for certain mobile devices.
  • New option to improve mobile zooming on some sites.

= 2.4.3 =

  • Option in Settings to open hyperlinks in new tab/window - can be overridden in shortcode using newwindow="on|off".
  • Now supports internal hyperlinks.

= 2.4.1 =

  • Track the number of views and downloads - displays next to the PDF's other info in the Media Library.

= 2.4 =

  • Hyperlinks are now supported - both internal within PDF and external to other web pages.
  • Jump straight to page number by clicking on Page and typing the number.
  • The new shortcode parameter page="x" opens up a document on a specified page number.
  • Translation-ready! Please contribute your translations.
  • Compatibility with WordPress 4.4.

= 2.2.5 =

  • Option to toggle 'Secure' uploads on/off within the Settings page.
  • The download button can now work with Secure PDFs.
  • Forced white background by default - some Theme's CSS would override.
  • Better explanation of some error messages (e.g. attempt to access PDF on a different domain).

= 2.2.4 =

  • Option to add 'Download PDF' button to toolbar. This isn't normally suitable for the Secure version but is provided for compatibility in case you are displaying some PDFs outside the /securepdfs/ folder.

= 2.2.3 =

  • No longer complains of invalid license in some cases where it shouldn't.

= 2.2.2 =

  • Redesigned toolbar buttons

= 2.2 =

  • The new version of PDF.js fixes some PDF rendering bugs.

= 2.1.7 =

  • Fixed a bug with full-screen height calculation which left the toolbar invisible in full-screen mode.

= 2.1.6 =

  • Height can be specified in global Settings -> PDF Embedder and pulls through correctly as a default in any shortcode that doesn't already have its height specified.

= 2.1.5 =

  • Workaround to fix 'Invalid PDF Structure' errors on some sites where WordPress had been corrupted into the wrong Unicode encoding.

= 2.1.4 =

  • Obtains PDF over same transport (https/http) as host page, regardless of that specified in the shortcode url parameter. This avoids conflicts and failure to display PDF if the two don't match.

= 2.1.3 =

  • Fixes to workaround iPhone Safari bugs.

= 2.1.1 =

  • ESC to exit full-screen mode. Automatic plugin updates. Site-wide settings for appearance (width/toolbar) can now be set - and overridden by shortcodes if desired.

= 1.4.3 =

  • Bug fixing of thumbnail generation at the time of uploading the PDF
  • Added the WordPress 5.6 compatibility

= 1.4.2 =

  • Updated to use the latest rendering library pdf.js. Fixes some 'strange character' issues amongst other improvements.
  • No longer needs a standalone compatbility.js file so this is not loaded in your site anymore.

= 1.4 =

  • Improved integration with PDF Embedder Premium Secure - can now embed 'Link to Media File' thumbnail images that link to a direct download of the PDF. This is achieved through the new pdf-direct-link requires a url attribute shortcode in version 3.1.4 of PDF Embedder Premium Secure.
  • Now also allows you to opt-in to beta updates of the plugin. Check the 'beta' box on the License tab to participate.

= 1.3 =

  • Support for JPEG as well as PNG - offers higher speed and lower filesize versus higher quality for PNG.
  • Added a hook that is called whenever a thumbnail is generated. Developers can react to this, for example, by adding metadata to the thumbnail
  • Hook details: pdfemb_thumbnail_created($attachment_post_id, $thumbnail_post_id)
  • This supplies the WordPress post IDs of the original PDF ($attachment_post_id) and the media item of the new thumbnail image ($thumbnail_post_id).

= 1.2 =

  • Uses the latest version of pdf.js to draw PDFs into thumbnails.
  • Display of PDF titles when bulk-generating multiple thumbnails is now clearer - sometimes filenames weren't displaying fully.

= 1.1.4 =

  • More explicit error messages when Thumbnail generation fails.

= 1.1.2 =

  • Added a Max Width setting to avoid unusually large images being created. The default is 2000 pixels in width.

= 1.1.1 =

  • Fixes for Firefox and some WordPress setups.

= 1.1 =

  • Option to regenerate thumbnails only for PDFs that don't already have a thumbnail associated with them.

= 1.0 =

  • First version.
Top