A powerful PDF viewer plugin that opens documents in a sleek embedded viewer with full control over download, print, and document security.
| Feature | Description |
|---|---|
| Zero Configuration | Automatically detects all PDF links — no shortcodes needed |
| Gorgeous Modal Viewer | Modern, dark-themed viewer with smooth animations |
| Document Security | Hide download/print buttons, block right-click & Ctrl+S |
| Page Navigation | Prev/Next, direct page input, scroll-synced tracking |
| Smooth Zoom | Toolbar buttons & keyboard shortcuts (+/-) |
| Fully Responsive | Optimized for desktop, tablet, and mobile |
| Elementor Compatible | Works with Elementor & all major page builders |
| Customizable | Toolbar colors, button accents, viewer height |
| Powered by PDF.js | Mozilla's open-source PDF rendering engine |
| Lightweight | No bloat — PDF.js loaded from CDN |
When a visitor clicks any PDF link, document opens in a beautiful full-screen modal viewer with toolbar controls.
Configure download/print visibility, toolbar colors, and viewer dimensions from Settings → PDF Embedder.
- Download the latest release as a
.zipfile - Go to WordPress Admin → Plugins → Add New → Upload Plugin
- Upload the
.zipfile and click Install Now - Activate the plugin
- Download or clone this repository
- Upload the
pdf-embedderfolder to/wp-content/plugins/ - Activate through Plugins menu in WordPress
cd /path/to/wordpress/wp-content/plugins/
git clone https://github.com/prangishviliAbe/PDF-Embeder-PRO-for-WP.git pdf-embedderAfter activation, go to Settings → PDF Embedder to configure:
| Setting | Description | Default |
|---|---|---|
| Hide Download Button | Remove download button from toolbar | ✅ On |
| Hide Print Button | Remove print button from toolbar | ❌ Off |
| Viewer Height | Height as % of viewport (30–100) | 85vh |
| Toolbar Color | Background color of the toolbar | #2c2c2c |
| Button Accent Color | Accent color for toolbar buttons | #4a90d9 |
When download protection is enabled:
- ❌ Download button — Hidden from toolbar
- ❌ Right-click — Context menu disabled on PDF viewer
- ❌ Ctrl+S — Save shortcut blocked
- ❌ Ctrl+P — Print shortcut blocked (when print is hidden)
Note: This provides a strong deterrent but cannot guarantee 100% protection, as determined users may still find ways to capture content through browser developer tools or screen capture.
- 📄 Protecting premium PDF content and digital products
- 🎨 Showcasing design portfolios, brochures, and catalogs
- 📚 Embedding educational materials and course documents
- ⚖️ Displaying legal documents, reports, and whitepapers
- 📎 Any WordPress site with PDF attachments
pdf-embedder/
├── pdf-embedder.php # Main plugin file (settings, hooks, enqueue)
├── admin/
│ └── settings-page.php # Admin settings page UI
├── assets/
│ ├── css/
│ │ └── pdf-viewer.css # Modal viewer styles
│ └── js/
│ └── pdf-viewer.js # PDF.js viewer logic
└── readme.txt # WordPress plugin readme
- PDF Rendering: PDF.js 3.11.174 by Mozilla (loaded from CDN)
- No jQuery dependency — Pure vanilla JavaScript
- Dynamic content support — MutationObserver watches for dynamically loaded PDF links
- HiDPI/Retina support — Canvas rendering accounts for
devicePixelRatio - Keyboard shortcuts:
ESC(close),+/-(zoom), Arrow keys (page navigation)
- Initial release
- Modal PDF viewer with PDF.js
- Download/Print button toggle
- Right-click and keyboard shortcut protection
- Customizable toolbar appearance
- Elementor and dynamic content support
This plugin is licensed under the GPL v2 or later.
Abe Prangishvili
Made with ❤️ for WordPress
