Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Embeder PRO for WordPress

PDF Embeder PRO for WordPress

A powerful PDF viewer plugin that opens documents in a sleek embedded viewer with full control over download, print, and document security.

WordPress 5.6+ PHP 7.4+ Elementor Compatible GPLv2 Version 1.0.0


🔥 Features

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

📸 Screenshots

PDF Modal Viewer

When a visitor clicks any PDF link, document opens in a beautiful full-screen modal viewer with toolbar controls.

Admin Settings

Configure download/print visibility, toolbar colors, and viewer dimensions from Settings → PDF Embedder.


🚀 Installation

Method 1: Upload via WordPress Admin

  1. Download the latest release as a .zip file
  2. Go to WordPress Admin → Plugins → Add New → Upload Plugin
  3. Upload the .zip file and click Install Now
  4. Activate the plugin

Method 2: Manual Upload

  1. Download or clone this repository
  2. Upload the pdf-embedder folder to /wp-content/plugins/
  3. Activate through Plugins menu in WordPress

Method 3: Git Clone

cd /path/to/wordpress/wp-content/plugins/
git clone https://github.com/prangishviliAbe/PDF-Embeder-PRO-for-WP.git pdf-embedder

⚙️ Configuration

After 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

🛡️ Security Features

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.


🎯 Perfect For

  • 📄 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

🏗️ Plugin Structure

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

🔧 Technical Details

  • 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)

📝 Changelog

1.0.0

  • 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

📄 License

This plugin is licensed under the GPL v2 or later.


👤 Author

Abe Prangishvili


Made with ❤️ for WordPress

About

PDF viewer plugin that opens PDF files in a sleek, modern embedded viewer — right on your site. Control document security by hiding download and print buttons

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages