WordPress.org

Plugin Reviews

PDF.js Viewer Shortcode

Insert a PDF viewer into pages with a simple shortcode.

20 reviews
Average Rating
4 out of 5 stars
Aun funcionando
By , for WP 4.4.1

aun funciona correctamente para chrome 47.0.2 y firefox 42
agregando a presentation_mode.js

document.onselectstart = function() {return false;}
document.onmousedown = function() {return false;}
document.oncontextmenu = function(){return false}

podremos agregar un poco de protección al pdf

Code not removed after deleting plug-in
By , for WP 4.2.2

I've tested this plug-in on one of my websites and decided to go with another one to show PDF's which is better maintained.

However, after deleting the plug-in I wanted to add a regular link to download a PDF file and the automated shortcode from this plug-in still showed up.

I found the source of this in the theme's function.php file, so in case you have the same problem, you know where to find it! Just delete the following code over there:

add_filter('the_content', 'addpdfviewer', 1);
function addpdfviewer ($content)
{
global $post;
$pattern = "/<a(.*?)href=('|\")([^>]*).pdf('|\")(.*?)>(.*?)<\/a>/i";
$replacement = '[pdfjs-viewer url=$3.pdf viewer_width=330px viewer_height=350px fullscreen=true download=true print=true openfile=false]';
$content = preg_replace($pattern, $replacement, $content);
return $content;
}
Hard coded plugin directory is a big issue
By , for WP 4.2.2

Plugin works OK but had to be hacked around to do so: the plugin directory has been hard-coded into the plugin, which breaks the plugin if using anything other than wp-content as a directory name.

To fix, amend line 33 to read:

$viewer_base_url= plugin_dir_path( __FILE__ ) . '/web/viewer.php';

Otherwise, still working in WP 4.2.2, which is useful.

Superb!
By , for WP 4.1.1

I've tried a few pdf viewers but this was far and away the best. It does everything I could want.. except (and maybe I'm just missing something), after going to full screen, I see no button to minimize back to original size and always have to amend the url to go back to a page. Just a slight annoyance but still a 5-star job!

Still not working for explorer
By ,

After 1 year still no working for explorer.
I found a other solution for this and works with explorer
http://viewerjs.org/getit/

Beautiful, great functionality
By , for WP 4.0.1

On 4.1, love the ease of use and final result.

Simply works
By , for WP 4.0.1

In FIAF (www.fiaf.net) we use 30+ wp installation and any help is welcom'd. Thanks

Very Good
By , for WP 4.0

Very Good

Awesome
By , for WP 3.9.2

Works great, especially with FOOBox.

Thank you so much.

unexpected error
By , for WP 3.4

i am getting this problem,
PDF.js v? (build: ?)
Message: Unexpected server response (204) while retrieving PDF "http://genebank-narc.gov.np/wp-content/uploads/2014/06/Prospectus-1.pdf".

You must log in to submit a review. You can also log in or register using the form near the top of this page.