=== Document Viewer – let visitors view files right in the browser === Contributors: bplugins, shehabulislam, taninrahman, freemius Tags: embed document, easy document embedder, pdf embedder, document viewer Tested up to: 7.0 Stable tag: 2.4.1 Requires PHP: 7.4 Requires at least: 6.2 Donate link: https://www.buymeacoffee.com/abuhayat License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html Embed Word, Excel, PowerPoint, and PDF files in WordPress. Visitors view documents in the browser via Google Doc Viewer or Microsoft Online Viewer. == Description == **Let visitors read your Word, Excel, and PowerPoint files right on the page – no Office installation, no downloads, no conversions.** [**Live Demo**](https://bplugins.com/products/document-viewer/#demos "Demo") | [**Pricing**](https://bplugins.com/products/document-viewer/pricing "Buy Pro version") ### Why Document Viewer? Do you have Office documents on your website that you want readers to view even if they don't have Office installed? Would you rather let them preview a document before downloading it? **Document Viewer** embeds Microsoft Word, Excel, PowerPoint, and more directly into your posts and pages using a simple shortcode or Gutenberg block. The plugin integrates two popular viewer engines – Google Doc Viewer and Microsoft Online Viewer – and lets you customize the width and height of every embed to match your design. There is no need to convert Office files to PDF or HTML for the web: anyone can view them from your site on computers, tablets, and mobile phones. Need more control? The Pro version adds cloud sources (Google Drive, OneDrive, Dropbox) plus user-experience and security toggles for pop-out, file name display, the download button, and right-click protection. ### Free Features - **Two Viewer Types:** Display documents with Google Doc Viewer or Microsoft Online Viewer. - **Custom Layout:** Set width and height to fit the document into your design. - **Works Everywhere:** Renders perfectly on computers, tablets, and mobile phones. - **No Conversion Needed:** Embed Office files as they are – no PDF or HTML export required. - **View Without Office:** Visitors can read your files even without Office installed. ### Pro Version [**Document Viewer Pro**](https://bplugins.com/products/document-viewer/pricing "Buy Pro version") unlocks cloud sources and fine-grained control: - **Choose Documents from Google Drive**, **OneDrive**, or **Dropbox**. - **View Documents via Google Doc Viewer** for enhanced compatibility. - **Enable/Disable Pop-out** for the embedded viewer. - **Show/Hide the File Name** at the top of the viewer. - **Show/Hide the Download Button** for easy access control. - **Enable/Disable Right Click** to enhance document security. ### How to Use 1. Install and activate the **Document Viewer** plugin. 2. Add a new document and configure the viewer (viewer type, width, height). 3. Copy the generated shortcode. 4. Paste the shortcode into any page, post, or widget – your document appears in the browser. ### Use Cases - **Schools & Trainers:** Share syllabi, worksheets, and slides students can read in place. - **Businesses:** Publish reports, price lists, and spreadsheets without forcing downloads. - **Teams & Communities:** Show schedules and documents in situ while still allowing downloads. - **Bloggers:** Let readers preview resources before they download them. ### User Feedback #### ⭐⭐⭐⭐⭐ [Impressively Stable](https://wordpress.org/support/topic/impressively-stable/) ❛❛***Nice wp plugin ever. I’ve use it for 4 years.***❜❜ ***-[aircess](https://wordpress.org/support/users/aircess/)*** #### ⭐⭐⭐⭐⭐ [Does the job well.](https://wordpress.org/support/topic/does-the-job-well-131/) ❛❛***This plugin works fine***❜❜ ***-[muhammadarooj](https://wordpress.org/support/users/muhammadarooj/)*** #### ⭐⭐⭐⭐⭐ [Exactly What I Need](https://wordpress.org/support/topic/exactly-what-i-need-161/) ❛❛***I am a theatre director and I use my website to communicate with my performers and technical crews. I wanted to SHOW them documents in situ as well as enable them to easily download them and, after looking at other solutions, this plugin is PERFECT for this. I am delighted with it and cannot recommend it highly enough.***❜❜ ***-[jfortune](https://wordpress.org/support/users/jfortune/)*** Did you like this plugin? Have a feature request? [Please share your feedback with us](mailto:support@bplugins.com 'Send feedback'). ### How It Works - Your Document will be embed in your site, blog via a iframe which is service of Office Web Viewer - This plugin use Office Web Viewer service of Microsoft [Read More About Office Web viewer](http://officewebviewer.com "Read More") - Terms Of Service : [Microsoft's Terms of service ](https://go.microsoft.com/fwlink/?LinkID=206977 "Terms") - Privacy Policy: [Microsoft's Privacy Policy ](https://go.microsoft.com/fwlink/?LinkId=521839 "Privacy") == Installation == **From your WordPress dashboard (recommended):** 1. Go to **Plugins → Add New**. 2. Search for **"Document Viewer"**. 3. Click **Install Now**, then **Activate**. 4. Add a document and place its shortcode in any page or post. **Manual installation:** 1. Upload the plugin folder to the `/wp-content/plugins/` directory. 2. Activate the plugin through the **Plugins** menu in WordPress. 3. Use the shortcode in any page, post, or widget. 4. To embed in theme PHP, place `` in your template. == Frequently Asked Questions == = Which types of documents can I embed with this plugin? = Microsoft Word, Excel, and PowerPoint documents. = Which file extensions work with this plugin? = '.ppt', '.pptx', '.doc', '.docx', '.xls', and '.xlsx'. = Do my visitors need Microsoft Office installed? = No. Documents are rendered in the browser through the viewer service, so anyone can view your files even without Office installed. = Can I embed documents from Google Drive, OneDrive, or Dropbox? = Yes, choosing documents directly from Google Drive, OneDrive, and Dropbox is available in the Pro version. = Can I hide the download button or disable right-click? = Yes. The Pro version lets you show or hide the download button and file name, enable or disable pop-out, and disable right-click for extra document security. = Does the viewer work on mobile devices? = Yes, embedded documents display correctly on computers, tablets, and mobile phones. = I would like to support your project. What is the best way? = Thanks for your interest. You can donate any amount by visiting [Here](https://gum.co/wpdonate "Donate Now"). = Where do I report security bugs found in this plugin? = Please report security bugs found in the source code of the Document Viewer for Office plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/9e5fb774-c5c5-4253-bec9-fd5a4210d09b). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. == Screenshots == 1. Sidebar menu 2. Add new Doc / Configure Viewer 3. ShortCode 4. Output / Frontend preview 5. Frontend preview of a excel File == Source Code == You can find the source code, report bugs, and contribute to the development of this plugin on our GitHub repository: [**Embed Office Viewer on GitHub**](https://github.com/bPlugins/embed-office-viewer-wp) == Third-Party Libraries == This plugin bundles the following third-party JavaScript/PHP libraries. = Codestar Framework = * **Source:** [http://codestarframework.com/](http://codestarframework.com/) * **GitHub:** [https://github.com/Codestar/codestar-framework](https://github.com/Codestar/codestar-framework) * **License:** GPLv2 or later – [https://github.com/Codestar/codestar-framework/blob/master/LICENSE.md](https://github.com/Codestar/codestar-framework/blob/master/LICENSE.md) * **Purpose:** Provides the options framework for the plugin's settings and shortcode generator. = Freemius SDK = * **Source:** [https://freemius.com/](https://freemius.com/) * **GitHub:** [https://github.com/Freemius/wordpress-sdk](https://github.com/Freemius/wordpress-sdk) * **License:** GPLv3 – [https://github.com/Freemius/wordpress-sdk/blob/master/LICENSE.txt](https://github.com/Freemius/wordpress-sdk/blob/master/LICENSE.txt) * **Purpose:** Provides opt-in usage tracking and analytics to help improve the plugin. = bpl-tools = * Source / GitHub: https://github.com/bPlugins/bpl-tools * License: GPL-2.0-or-later – https://www.gnu.org/licenses/gpl-2.0.html * Purpose: Shared utility library providing admin dashboard components and common Gutenberg editor controls. * External Services: The library may connect to bPlugins, WordPress.org, and Freemius services for product data and checkout functionality. See full details: https://github.com/bPlugins/bpl-tools#external-requests--why-they-are-made == Changelog == = 2.4.1 - 27 June 2026 = * Update: Redesigned and integrated the new standardized help & demos admin dashboard. = 2.4.0 - 3 June, 2026 = * New: Added 4 dedicated, modular settings panels (DocumentSource, ViewerEngine, DisplayDimensions, SecurityRestrictions) to group Gutenberg settings. * New: Added custom SVG icons inside the titles of the block settings panels. * Update: Redesigned Gutenberg block settings field titles to use friendly, concise terms for non-technical users. * Update: Consolidated admin assets enqueuing into a single class loader. * Update: Standardized core classes under `includes/core/` and helper files under lowercase `includes/helper/` to ensure namespace consistency. * Improvement: Integrated Composer autoloading to boot and resolve PHP dependencies dynamically. * Improvement: Unified the legacy shortcode rendering pipeline to run through the Gutenberg block rendering engine via the native `render_block()` API. * Improvement: Replaced the block settings TabPanel with separate, sequential settings panels. * Improvement: Applied a premium aesthetic theme color (#f1fdfe) for settings panel backgrounds and matching blue (#226df5) for panel header icons. * Improvement: Added detailed file format descriptions to simplify the document selector experience. * Improvement: Added a fixed height and smooth fade-in transition for the Upload Documents editor UI to prevent layout jumping on tab change. * Improvement: Reorganized metabox fields into two clean tabbed sections: "Document Settings" and "Security & Restrictions". * Fix: Resolved fatal error during plugins_loaded hook by replacing query loops with safe get_posts() in ImportMeta class. * Fix: Resolved cross-origin iframe console errors in block editor under content protection mode. * Fix: Resolved pop-out overlay alignment and responsiveness by using CSS container queries. * Fix: Resolved "Protect Content" text selection and keyboard shortcuts bypasses (Ctrl/Cmd + C, A, S, P). * Fix: Resolved "Disable Full Screen" and pop-out overlay styles targeting mismatches. * Fix: Resolved missing i18n translation wrappers on "Protect Content" toggle labels. = 2.3.3 - 8 November, 2025 = * Updated Block - Editor upload options = 2.3.2 - 10 October, 2025 = * Add Modern Dashboard and improved. = 2.3.1 - 12 July, 2025 = * Fixed issues = 2.3.0 - 10 May, 2025 = * Fixed textdomain issue & add powerfull Gutenberg block = 2.2.10 - 29 Jan, 2025 = * Update: WordPress SDK = 2.2.9 - 04/07/2024 = * Update: WordPress SDK = 2.2.7 = * Update Freemius WordPress SDK = 2.2.5 = * Update Freemius WordPress SDK = 2.2.4 = * Fixed Height issue = 2.2.3 = * Fixed Security issue * Imporved Performance = 2.0.9 = * PDF viewer support * Improved performance = 1.1 = * Added doc management screen * Improved performance. * Gutenberg block support = 1.0 = * Initial Release