WordPress OSINT, maintenance or security needs? Reach out!
TLDWP

Plugin: pdfjs-viewer-shortcode (Used by 2,502 domains)

PDF.js Viewer

πŸ‘€ Ben Lawson πŸ“¦ v3.0.4 πŸ”— Plugin Homepage

Incorporate Mozilla’s PDF.js viewer into your pages and posts via a Gutenberg block or a simple shortcode. PDF.js is a javascript library for displaying pdf pages within browsers.

Features:

  • Gutenberg Block and Shortcode
  • Translation Support (plugin only): Spanish and French included, ready for more languages
  • Elegant Theme that adapts to dark and light mode (if browser supports dynamic CSS)
  • Customizable buttons
  • Page navigation drawer
  • Search functionality
  • Protected PDF password entry
  • Loading bar & displays partially loaded PDF (great for huge PDFs!)
  • Document outline
  • Classic Editor: Easy to use editor media button that generates the shortcode for you
  • Support for mobile devices

Shortcode Syntax:

[pdfjs-viewer attachment_id=123 viewer_width=600px viewer_height=700px fullscreen=true download=true print=true]

Or use a direct URL:

[pdfjs-viewer url=http://www.website.com/test.pdf viewer_width=600px viewer_height=700px fullscreen=true download=true print=true]

Shortcode Parameters:

  • attachment_id (recommended): ID of the media file in WordPress media library
  • url (alternative): Direct URL to PDF file. Use attachment_id when possible for better security.
  • viewer_width (optional): Width of the viewer (default: 100%)
  • viewer_height (optional): Height of the viewer (default: 800px)
  • fullscreen (optional): true/false, displays fullscreen link above viewer (default: true)
  • fullscreen_text (optional): Text for the fullscreen link (default: View Fullscreen)
    • Spaces not allowed. Use %20 in place of spaces.
  • fullscreen_target (optional): true/false, open the fullscreen link in a new tab (default: false)
  • download (optional): true/false, enables or disables download button (default: true)
  • print (optional): true/false, enables or disables print button (default: true)
  • openfile (optional): true/false, show open file button (default: false)
  • zoom (optional): Initial zoom level – auto, page-actual, page-fit, page-width, or percentage like 75, 100, 150 (default: auto)

Want to help develop the plugin? Found a bug? Find us on GitHub. For build instructions and contribution guidelines see the developer guide in DEVELOPER.md.

Admin Notice After Updates / Invalid Block

When you update the plugin, editors may see an admin banner explaining that Gutenberg could show an β€œAttempt Block Recovery” prompt when editing older posts with PDFs. Clicking it updates the block format; it does not affect what visitors see. You can dismiss the banner, and it won’t reappear until a future release enables it again.

License

This WordPress plugin is licensed under GPLv2 or later.

PDF.js (included in this plugin) is developed by Mozilla and licensed under the Apache License 2.0. See the PDF.js repository for details.

3.0.4

  • Cache busting for PDF.js files to prevent caching issues after updates

3.0.3.1

  • URL Encoding fix

3.0.3

  • PDFjs 5.5.207
  • Improved URL encoding for PDF files with special characters in filenames/URLs
  • Enhanced security with better sanitization of file parameters

3.0.2

  • Added cache busing to PDFjs files to prevent caching issues after updates

3.0.1

  • Fixed an issue with mjs files on servers that don’t support the mime type

3.0.0

  • Now requires WordPress 5.0 and PHP 7.4
  • Upgraded PDFjs to PDF.js 5.4.456
  • Added PDF preview in Gutenberg block
  • Admin notice for block recovery after updates
  • Accessibility improvements.
  • Reworked the block editor PDF embed code
  • Options Page improvements.
  • Added message so if the user is trying to load external PDFs, they’ll get a warning
  • Translation Support: Added internationalization support
    • Included Spanish (es_ES) and French (fr_FR) translations
    • Added translation template (POT file) for additional languages
    • Added load_plugin_textdomain() for automatic translation loading
    • Created translation guide in languages/README.md
  • Fixed window.pdfjs_options undefined errors in block editor
  • Added safe fallback to prevent JavaScript errors when options not loaded
  • Improved attribute default handling in Gutenberg block
  • Added PDF preview in Gutenberg block editor
  • Consolidated rendering logic with new pdfjs_render_viewer() function
  • Created pdfjs_get_options() helper for consistent option retrieval
  • Added proper input sanitization with pdfjs_sanitize_option()
  • Fixed pdfjs_viewer_scale default from 0 to auto
  • Updated build toolchain (Sass, webpack, Node 18+ requirement)
  • Removed unused code and improved code organization
  • Added .nvmrc for Node version management
  • Fixed PHP Warning: Undefined array key β€œeditButtons” thanks to retroflexer
  • Fixed issue where iFrames could break the layout on smaller screens

2.2.3

  • Updated PDFjs to PDF.js 5.3.93
  • Merged β€˜Add toggle to disable editing buttons’ PR
  • Merged β€˜Fix PHP Warnings: Undefined array key’ PR
  • Package security updates / rebuild

2.2.2

  • PDFjs with legacy browser support

2.2.1

  • .mjs workaround
  • Updated to PDFjs 4.5.136

2.2

  • Updated to PDFjs 4.3.136
  • Renamed β€˜Download’ to β€˜Save’ based on PDFjs change.
  • Removed the zoom feature to hopefully fix Edge issues.
  • Disabling the Alternative PDF Loading version

2.1.8

  • Preventing users from adding JS to shortcodes.
  • Bumping version numbers

2.1.7

  • Fixed the fullscreen settings for new PDFs
  • Fixing a bug where, on fresh installs, the fullscreen text would be β€˜on’
  • Tested with WordPress 6.0-beta3-53297

2.1.6

  • Added testing up to WordPress 5.9.
  • Added a few more variables into the Alternative PDF Loading version.
  • Moved the Alternative PDF Loading to beta.

2.1.5

  • Detect ACF before running ACF code.
  • Beta: Added a feature flag to load the PDF in full screen view differently.

2.1.4

  • Decoding PDF urls when other plugins encode them in the classic editor.

2.1.3

  • Adding a version number to some JS files to break caches
  • Fixing an issue where the fullscreen text didn’t have spaces
  • Updating the shortcode in the read me

2.1.2

  • Reverting to the file in the URL

2.1.1

  • Updating how we call the WordPress plugin directory.
  • Updating function names.
  • More sanitization.

2.1.0

  • Added the file ID to the URL.
  • Hooked WordPress into the viewer to pull the URL in. Should fix some possible security concerns.
  • Removed the file URL from the URL.
  • Removed the pdfjs_set_custom_edits filter.
  • Removed the pdfjs_set_custom_domain filter.
  • Sanitizing inputs
  • Removing search term.

2.0.2

  • Preventing XSS with the search term

2.0.1

  • Now works with ACF fields! Thanks @imj13

2.0.0

  • Major PDFjs Upgrade to version 2.6.347
  • Changing the insert PDF button to fire on a class not ID.
  • Updated the minimum version of WordPress supported.
  • Maybe Edge is happy now?

1.5.9

  • Fixing the issue that made Edge unhappy. fingers crossed

1.5.8

  • Starting to hook up options page to the shortcode.
  • Fixing a potential code injection problem
  • Fix for WordPress 2021 Theme

1.5.7

  • Fix for those not running WordPress 5+ where a fatal error would show because a function I called didn’t exist.

1.5.6

  • New options page to set the default settings.
  • Only showing the β€˜Add PDF’ media button to posts using the classic editor as it only works in the classic editor.
  • Added a filter to pass in a custom domain if URLs are proxied. pdfjs_set_custom_domain
  • Added a filter if you want to edit the PDF URL. pdfjs_set_custom_edits
  • Ability to hide Search via setting on options page.
  • Ability to show Sidebar via setting on options page.
  • Ability to highlight a search term on PDF load.

v1.5.5

  • High Five πŸ–

v1.5.4

  • Reworking way we make the PDF url relative.

v1.5.3

  • Remove only the first instance of the domain name from the URL. Leave it if it’s in a directory or file name.

v1.5.2

  • Making the PDF URL relative so that maybe Microsoft Defender won’t complain.
  • Allowing the viewer to be called directly.
  • Hiding the Open button.
  • Checking for register_block_type function before calling it to better support WordPress 4.x. Thanks @Now-Italy-Demo @octoxan
  • Made the PDF URL relative to hopefully fix Windows Defender security issues.
  • Adding option to open the fullscreen link in a new tab.

v1.5.1

  • Reverting the update to Mozilla PDF.JS library as it broke older browsers and some other setups.

v1.5

  • Updated Plugin Name
  • Updated Plugin Icon
  • Gutenberg Block
  • Updating Mozilla PDF.JS library.
  • Adding a class to the fullscreen link.
  • Ability to customize fullscreen link text.
  • Ability to customize default zoom level.
  • Classes so you can style things easier.
  • Shorter default height.

v1.4.6

  • Renaming URL variables to prevent a possible Edge security message.

v1.4.5

  • Fixes a version number issue that was introduced in the last version.

v1.4.4

  • Brings back the ability to hide print and download.
  • Adds version numbers to URLs to hopefully break caches and prevent weirdness.

v1.4.3

  • Fixes an issue where PDFs wouldn’t load on production sites due to a setLanguage error.

v1.4.2

  • Added title to iFrame for accessibility.
  • Cleaning up code per WordPress standards.

v1.4.1

  • Updating the Readme

v1.4

  • Updating to PDF.JS version v2.3.200
  • Updating the Readme
  • Adding Gutenberg Callout

v1.0 – 1.3

  • The birth of the plugin and first few versions.
DomainExposuresHeadersLast Checked
v*d*l*v*r*.com (WP 6.9.4) βœ… F 2026-05-06 19:27:18
h*g*.gr βœ… F 2026-05-06 19:22:11
k*s*v*m*k*r*.net (WP 6.2.9) ⚠️ F 2026-05-06 19:14:33
e*g*e*o*k*t*d*o*a*l*n*a.com πŸ”“ F 2026-05-06 18:52:03
e*g*e*o*k*t*d*o*a*l.com πŸ”“ F 2026-05-06 18:52:03
a*e*t*h*u*e.com (WP 6.9.4) βœ… F 2026-05-06 18:40:03
a*e*t*h*u*.com (WP 6.9.4) βœ… F 2026-05-06 18:40:03
l*m*b*b.no (WP 6.5.8) βœ… F 2026-05-06 18:16:15
l*g*c*g*l*m*n*s.com βœ… F 2026-05-06 18:06:39
e*g*e*o*n*.com (WP 6.9) βœ… A 2026-05-06 17:43:31
u*-*h*e*i*g*n.de βœ… F 2026-05-06 17:27:30
c*c*n*i*a*e*.com (WP 6.2.8) ⚠️ F 2026-05-06 17:23:50
s*n*r*y*a*.com (WP 6.9.4) βœ… D 2026-05-06 17:03:48
n*p*.e*u.ua βœ… F 2026-05-06 16:47:51
p*o*l*a*e*i*e*o*l*p*p*.com (WP 6.9.4) βœ… D 2026-05-06 16:35:18
b*m*.events (WP 6.9.4) βœ… F 2026-05-04 13:16:05
z*s*s.si (WP 6.6.5) βœ… F 2026-05-04 11:50:21
w*s*e*n*i*e*n*w*.in (WP 6.8.5) βœ… F 2026-05-04 11:45:57
c*l*t*a*.com (WP 6.9.4) βœ… D 2026-05-04 11:27:47
j*w*t*d*n*.de (WP 6.9.4) βœ… F 2026-05-04 11:21:07
v*l*u*-*g*l*.com (WP 6.8.5) βœ… F 2026-05-04 11:15:42
m*c*r*e*.com (WP 6.8.5) βœ… F 2026-05-04 11:06:28
c*l*n*e*.com βœ… A 2026-05-04 11:06:11
3*m*r*h.org (WP 5.7.15) ⚠️ F 2026-05-04 10:54:13
b*c*a.o*g.ar (WP 6.9.4) βœ… F 2026-05-04 10:42:14
s*t*a*g*o.com (WP 6.6.5) βœ… F 2026-05-04 10:05:38
c*l*k*e*m*k*n*.com βœ… F 2026-05-04 09:45:17
s*g*r*n*j*p*n.com (WP 6.9.4) βœ… F 2026-05-04 09:44:11
m*g*c*r*r*m*.com (WP 6.8.5) βœ… C 2026-05-04 09:44:04
m*g*c*l*o*t*f*i*y*e*t*r*.com (WP 6.9) βœ… B 2026-05-04 09:33:54
s*r*n*n*r*y*o*u*i*n*.com βœ… D 2026-05-04 09:32:24
s*r*n*n*r*y.com βœ… D 2026-05-04 09:32:24
w*r*d*e.pl βœ… F 2026-05-04 09:20:31
g*o*d*w*n*i*r*u*.c*m.au (WP 6.8.3) βœ… F 2026-05-04 09:18:18
b*c*a.c*m.ar (WP 6.9.4) βœ… F 2026-05-04 08:46:30
d*l*e*o*c*r.com (WP 6.8.5) βœ… D 2026-05-04 08:26:46
k*n*r*.club βœ… F 2026-05-04 07:57:53
r*t*i*v*r*c*u*-*u*o*a.de (WP 6.7.5) βœ… F 2026-05-04 07:34:37
p*a*e*i*n.com βœ… F 2026-05-04 07:23:59
p*y*m*s*.ir βœ… D 2026-05-04 07:12:21
i*r*m.org (WP 6.8.5) βœ… F 2026-05-04 07:00:15
i*e*t*f*c*.es (WP 6.9.4) βœ… F 2026-05-04 06:46:03
i*e*l*m*r*i*e*.de (WP 6.2.9) ⚠️ F 2026-05-04 06:35:16
i*u*-*o*i*t*.org βœ… F 2026-05-04 06:22:01
s*a*c*.v*i*p*o*e*t*b*o*e*a*e.com (WP 4.7.19) ⚠️ F 2026-05-04 06:21:38
p*a*y*t*m*.com βœ… F 2026-05-04 05:07:39
p*a*y*t*m.com βœ… F 2026-05-04 05:07:39
u*i*i*.e*u.al (WP 6.6.5) βœ… F 2026-05-04 04:31:20
w*s*i*g*o*o*e*m*i.com βœ… F 2026-05-04 04:11:06
c*j*i*e.com (WP 6.9.4) βœ… F 2026-05-04 04:06:37
c*i*s*s*o*e*v*l*e*.com πŸ”“ F 2026-05-04 04:01:30
c*i*s*s*o*e*.com πŸ”“ F 2026-05-04 04:01:30
c*i*s*n*a*u*a*i*.com πŸ”“ F 2026-05-04 04:01:29
v*t*r*.co (WP 6.8.1) βœ… F 2026-05-04 03:57:29
c*i*p*d*a*i*a.com πŸ”“ F 2026-05-04 03:57:09
c*i*p*r*b*r*o*e*p*u.com πŸ”“ F 2026-05-04 03:57:09
c*i*n*r*i.com πŸ”“ F 2026-05-04 03:57:09
c*i*m*s*r*p*r*g*r*u.com πŸ”“ F 2026-05-04 03:57:09
c*i*j*u*e*.com πŸ”“ F 2026-05-04 03:57:08
c*i*e*p*i*s*l*e*.com πŸ”“ F 2026-05-04 03:57:08
c*i*e*t*r*e*o.com πŸ”“ F 2026-05-04 03:57:08
c*i*c*l*n*e.com πŸ”“ F 2026-05-04 03:57:07
c*i*a*n*m*l*.com πŸ”“ F 2026-05-04 03:57:07
c*e*n*a*e*s*s*.com (WP 6.9.4) βœ… F 2026-05-04 03:51:42
d*c*a*.it βœ… F 2026-05-04 03:51:05
c*n*a*t*m*s*e.de (WP 6.8.2) βœ… F 2026-05-04 03:49:13
l*s*y*u*-*u*m*n*e.fr (WP 6.1.10) ⚠️ F 2026-05-04 03:42:21
9*8*i*e*i*e*c.com (WP 6.8.3) βœ… F 2026-05-04 03:29:10
b*l*e*i*.i*m.i*l*n*i*.edu (WP 6.8.5) βœ… F 2026-05-04 03:15:11
c*u*t*y*l*b.do (WP 6.8.5) βœ… B 2026-05-04 03:12:42
p*y*u*m*g.com (WP 6.8.5) βœ… F 2026-05-04 03:07:31
a*s*0*.e*l*p*u*f*e*h*i*.de (WP 6.9.4) βœ… F 2026-05-04 02:59:33
s*v*n*a*s*c*o*l.o*g.in (WP 6.9.4) βœ… F 2026-05-04 02:43:28
d*c*s*e*n*u*t*i*l.com (WP 6.8.5) βœ… F 2026-05-04 02:21:31
h*k*u*a*.lt (WP 6.9.4) βœ… F 2026-05-04 02:18:43
b*o*e*o*g*o*n*2*.com (WP 5.2.21) ⚠️ F 2026-05-04 02:04:43
i*m*n*t*o*s.de (WP 6.9.4) βœ… F 2026-05-04 01:57:09
v*c*u*t*b*a*c*i*e.com (WP 6.5.2) βœ… F 2026-05-04 01:56:29
c*d*r*c*.com (WP 6.3.2) ⚠️ F 2026-05-04 01:50:54
m*r*o*m*s.com (WP 6.7.1) βœ… F 2026-05-04 01:10:23
m*r*i*.com (WP 6.7.1) βœ… F 2026-05-04 01:10:21
g*o*e*p*a*.com (WP 5.5.18) ⚠️ F 2026-05-04 00:58:57
d*r*n*o*a*i*o.org (WP 6.9.4) βœ… A 2026-05-04 00:32:45
f*l*s*f*a*t*y*a.ru (WP 6.6.5) βœ… F 2026-05-04 00:28:14
c*e*t*o*n*t*o*.org (WP 6.9.4) βœ… F 2026-05-04 00:21:51
g*o*g*a*o*n*a*n*e*e*b*l*.com βœ… F 2026-05-03 23:35:31
m*s*.g*v*u.org (WP 6.9) βœ… A 2026-05-03 23:29:37
a*v*o*i*c.com (WP 5.9.13) ⚠️ F 2026-05-03 23:17:57
a*r*n*v*l*.org (WP 6.9.4) πŸ”“ πŸ“„ D 2026-05-03 23:15:46
c*c*p*l*a*v*d*r.com (WP 6.8.5) βœ… F 2026-05-03 23:09:29
c*u*t*y*o*t*s*o*i.org βœ… F 2026-05-03 23:04:58
i*c*n*e*w*r*.org (WP 6.9.4) πŸ”“ F 2026-05-03 23:03:37
s*r*g*r*.com βœ… F 2026-05-03 22:56:21
s*b*t*n*e*a*t*v*s.com βœ… D 2026-05-03 22:52:02
d*a*t*m*r*l.com (WP 6.9.4) πŸ”“ F 2026-05-03 22:30:53
c*i*d*e*s*o*e*t.earth βœ… F 2026-05-03 22:17:29
p*p*r*a*k*t*a*k*t*n*.com βœ… F 2026-05-03 21:48:39
f*o*.eu (WP 6.5.8) βœ… F 2026-05-03 21:39:52
p*p*r*j*c*e*.com βœ… F 2026-05-03 21:12:07
e*e*.c*m.tr (WP 6.9.4) βœ… F 2026-05-03 20:55:11

Top 50 Plugins

Plugin Count
elementor 1,952,883
contact-form-7 1,834,236
elementor-pro 1,115,090
woocommerce 905,543
revslider 669,564
jetpack 455,323
js_composer 451,579
wp-rocket 337,578
essential-addons-for-elementor-lite 302,217
gravityforms 260,848
header-footer-elementor 241,647
complianz-gdpr 237,217
instagram-feed 235,352
google-analytics-for-wordpress 230,220
gutenberg-core 227,821
elementskit-lite 226,777
cookie-law-info 226,293
google-site-kit 225,450
sitepress-multilingual-cms 210,080
bluehost-wordpress-plugin 201,331
wpforms-lite 161,792
astra-sites 154,513
gutenberg 153,690
litespeed-cache 142,755
cookie-notice 134,730
gtranslate 132,470
coblocks 125,426
the-events-calendar 124,415
popup-maker 117,182
woocommerce-payments 99,929
astra-addon 99,208
tablepress 99,084
bb-plugin 98,816
LayerSlider 97,311
wp-smushit 96,651
premium-addons-for-elementor 94,192
mailchimp-for-wp 92,399
duracelltomi-google-tag-manager 90,248
honeypot 89,300
cleantalk-spam-protect 87,809
akismet 87,548
woocommerce-gateway-stripe 85,707
megamenu 83,317
all-in-one-seo-pack 82,828
fusion-builder 81,482
formidable 79,568
smart-slider-3 79,400
creative-mail-by-constant-contact 78,230
creame-whatsapp-me 78,105
ewww-image-optimizer 76,846

Top 50 Themes

Theme Count
hello-elementor 647,191
Divi 540,528
astra 490,862
pub 154,843
Avada 126,205
flatsome 122,474
generatepress 121,902
oceanwp 88,879
h4 85,197
kadence 81,234
enfold 71,703
salient 68,882
bb-theme 61,424
twentytwentyfour 60,739
twentyseventeen 56,908
cocoon-master 56,102
blocksy 55,399
betheme 54,185
twentytwentyfive 52,850
dt-the7 46,384
neve 40,396
woodmart 38,939
Avada-Child-Theme 35,645
twentytwentyone 35,050
bridge 34,210
gox 33,503
twentytwenty 31,088
lightning 30,329
swell 29,457
twentytwentythree 27,891
Impreza 25,524
bricks 25,490
Newspaper 22,916
twentytwentytwo 22,453
epik-redesign 20,773
pro 18,852
storefront 18,648
uncode 18,623
twentysixteen 18,609
extendable 18,575
sydney 16,948
yith-wonder 16,512
Total 14,992
themify-ultra 14,988
twentyfifteen 13,251
hestia 13,171
porto 12,878
twentynineteen 12,823
yootheme 12,536
thrive-theme 12,469