Title: Wonder PDF Embed
Author: WonderPlugin
Published: <strong>2017 年 6 月 3 日</strong>
Last modified: 2026 年 2 月 18 日

---

搜索插件

![](https://ps.w.org/wonderplugin-pdf-embed/assets/banner-772x250.jpg?rev=1670085)

![](https://ps.w.org/wonderplugin-pdf-embed/assets/icon-128x128.png?rev=1669953)

# Wonder PDF Embed

 作者：[WonderPlugin](https://profiles.wordpress.org/wonderplugin/)

[下载](https://downloads.wordpress.org/plugin/wonderplugin-pdf-embed.zip)

 * [详情](https://cn.wordpress.org/plugins/wonderplugin-pdf-embed/#description)
 * [评价](https://cn.wordpress.org/plugins/wonderplugin-pdf-embed/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wonderplugin-pdf-embed/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wonderplugin-pdf-embed/#developers)

 [支持](https://wordpress.org/support/plugin/wonderplugin-pdf-embed/)

## 描述

**Wonder PDF Embed**

WonderPlugin PDF Embed is a plugin to embed and display PDF files on your WordPres
website by using Mozilla’s PDF.js.

**Features**

 * Easy to use
 * Responsive PDF viewer
 * Using [Mozilla’s PDF.js](https://mozilla.github.io/pdf.js/)
 * Embed and display PDF files in WordPress posts or pages – [click to see the online demo](https://www.wonderplugin.com/wordpress-pdf-embed/#tutorial).
 * Works with the premium plugin Wonder Lightbox to [open a PDF file in a lightbox popup](https://www.wonderplugin.com/wordpress-pdf-embed/#lightbox)
 * Works with the premium plugin Wonder Carousel to create a [PDF carousel](https://www.wonderplugin.com/wordpress-pdf-embed/#carousel)
 * Options to hide the download button, the print button and the text selection 
   tool menu item in the PDF viewer toolbar. Please note: the options only use CSS
   and JavaScript code to hide the relative menu items/buttons in the PDF.js viewer
   toolbar. It’s NOT a DRM (Digital Rights Management) scheme to protect the PDF
   file. It does NOT stop experienced visitors from downloading, printing or copying
   text from the PDF file.

**How to Use**

You can use the following shortcode to embed a PDF file to WordPress posts or pages:

[wonderplugin_pdf src=”http://www.yourwordpresssite.com/yourdoc.pdf” width=”100%”
height=”600px” style=”border:0;”]

**PDF URL Requirements**

 * The PDF file MUST be hosted on the SAME DOMAIN as the WordPress website.
 * The PDF URL MUST be an absolute URL, that’s, the URL must start with http:// 
   or https://.
 * Make sure there are no special characters in the PDF URL, for example, apostrophes,
   double quotes, accented letters etc.
 * The PDF URL is defined with the src attribute.

**Shortcode Attributes**

 * You can use px or % for the width and height attributes, for example, 600px or
   100%.
 * By using % for the width attribute, the PDF viewer will be responsive.
 * If you use 100% for the height attribute, make sure the container of the shortcode
   has a proper height value.
 * You can use the style attribute to define the CSS style of the PDF viewer which
   is an iframe.

For more information, please view the online tutorial: [https://www.wonderplugin.com/wordpress-pdf-embed/#tutorial](https://www.wonderplugin.com/wordpress-pdf-embed/#tutorial)

**Open a PDF file in a lightbox popup**

Please view the online document: [https://www.wonderplugin.com/wordpress-pdf-embed/#lightbox](https://www.wonderplugin.com/wordpress-pdf-embed/#lightbox)

**Create a PDF carousel**

Please view the online document: [https://www.wonderplugin.com/wordpress-pdf-embed/#carousel](https://www.wonderplugin.com/wordpress-pdf-embed/#carousel)

## 安装

**Install the plugin in WordPress backend**

 1. In WordPress backend, go to menu Plugins -> Add New
 2. Search Wonder PDF Embed
 3. Install the plugin

**Install the plugin with downloaded plugin zip file**

 1. In WordPress backend, go to menu Plugins -> Add New
 2. Click the link Upload Plugin
 3. Select the plugin zip file, then click Install Now

**Uninstall the plugin**

 1. In WordPress backend, go to menu Plugins -> Installed Plugins
 2. Deactivate the plugin
 3. After the plugin is deactivated, Delete the plugin

## 常见问题

### Do the option “hide the download button”, “hide the print button” and “hide the text selection tool menu item” prevent people from downloading, printing or copying text from the PDF file?

No.

The options only use CSS and JavaScript code to hide the relative menu items/buttons
in the PDF.js viewer toolbar. It’s NOT a DRM (Digital Rights Management) scheme 
to protect the PDF file. It does NOT stop experienced visitors from downloading,
printing or copying text from the PDF file.

### I received the error “An error occurred while loading the PDF” or “Missing PDF file”

Please check your PDF URL and make sure it complies with the following requirements:

 1. The PDF file MUST be hosted on the SAME DOMAIN as the WordPress website.
 2. The PDF URL MUST be an absolute URL, that’s, the URL must start with http:// or
    https://.
 3. Make sure there are no special characters in the PDF URL, for example, apostrophes,
    double quotes, accented letters etc.

## 评价

![](https://secure.gravatar.com/avatar/a8dca1230367f4be330bfce938659a6e5f67cee4bac6aeb8b5842e2aff2b41a2?
s=60&d=retro&r=g)

### 󠀁[Works!](https://wordpress.org/support/topic/doesnt-work-at-all-tried-with-a-lot-of-different-pdf-files/)󠁿

 [Alexander Guskov](https://profiles.wordpress.org/forcesail/) 2024 年 2 月 22 日

Took 3 hours to push it worked: if a file is not accessed it report it as corrupted
🙁

![](https://secure.gravatar.com/avatar/ab1a784a75453d85d42e7e0c4b4fffcf183506b255b21bed38cf97100453e0dd?
s=60&d=retro&r=g)

### 󠀁[Works with Ajax and popup!](https://wordpress.org/support/topic/works-with-ajax-and-popup/)󠁿

 [Edith Allison](https://profiles.wordpress.org/terragirl/) 2022 年 11 月 30 日

I needed a PDF viewer to work in a modal popup called with Ajax and this does the
job! No JS errors like I had with EmbedPress, easy to use & fine with Ajax / Popup.
Thank you very much!

![](https://secure.gravatar.com/avatar/523e4f10c0879841008eb532f3b95d7f0723052fbce5d45c8ad3d784313a25b5?
s=60&d=retro&r=g)

### 󠀁[Simply an excellent Plugin](https://wordpress.org/support/topic/simply-an-excellent-plugin/)󠁿

 [juan angel](https://profiles.wordpress.org/juan-angel/) 2021 年 3 月 29 日

This plugin is quite simple but complete and effective. We are delighted by the 
functionality of Wonder PDF Embed plugin and we are using it to share all our documents.

![](https://secure.gravatar.com/avatar/ecc91dad10b6a5b6d949bfa753adf8ff1c11e34375a85ebbb6b935bd3eb33ea3?
s=60&d=retro&r=g)

### 󠀁[Ideal for protecting vanilla PDF in a copy protected website](https://wordpress.org/support/topic/ideal-for-protecting-vanilla-pdf-in-a-copy-protected-website/)󠁿

 [ArtistScope](https://profiles.wordpress.org/artistscope/) 2020 年 7 月 21 日

This plugin will be ideal for protecting vanilla (raw) PDF embedded on web pages
that use a copy protection solution like the ArtistScope Site Protection System (
ASPS). ASPS provides the most secure copy protection for all media displayed on 
web pages… except for PDF, because while PDF is unencrypted and normally opens using
Adobe Reader resources, the embedded reader will always provide save, print and 
copy options in its toolbar. But with this plugin, those toolbar options can be 
removed, thus making it possible to copy protect PDF on ASPS web pages.

![](https://secure.gravatar.com/avatar/ec026cc36fa74f877f65614207badf7ed4b9ad71ebabf532360ed31f73e4a9b6?
s=60&d=retro&r=g)

### 󠀁[Excellent replacement of gview](https://wordpress.org/support/topic/excellent-replacement-of-gview/)󠁿

 [mdes](https://profiles.wordpress.org/mdes/) 2019 年 12 月 2 日

But missing some parameters as adjusting height to a page size.

![](https://secure.gravatar.com/avatar/453a8c8eb7119b0b74c99db0fe00a3afe488e993eff9eaba9892b24b07c2f1ed?
s=60&d=retro&r=g)

### 󠀁[Отлично!](https://wordpress.org/support/topic/%d0%be%d1%82%d0%bb%d0%b8%d1%87%d0%bd%d0%be-146/)󠁿

 [staszukov1](https://profiles.wordpress.org/staszukov1/) 2019 年 2 月 6 日

Пробовал много плагинов для просмотра PDF,этот самый удобный и быстый!

 [ 阅读所有13条评价 ](https://wordpress.org/support/plugin/wonderplugin-pdf-embed/reviews/)

## 贡献者及开发者

「Wonder PDF Embed」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ WonderPlugin ](https://profiles.wordpress.org/wonderplugin/)

[帮助将「Wonder PDF Embed」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wonderplugin-pdf-embed)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wonderplugin-pdf-embed/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/wonderplugin-pdf-embed/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/wonderplugin-pdf-embed/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wonderplugin-pdf-embed/)。

## 更新日志

#### 3.1

Fix the cache issue when customizing the colors

#### 3.0

Support customizing the colors for text highlight, and selected text highlight

#### 2.9

Support customizing the colors for text selection

#### 2.8

 * Change the PDF.js option isEvalSupported to false

#### 2.7

 * Support Google Analytics

#### 2.6

 * Support page, zoom, pagemode URL parameters

#### 2.5

 * Fix a bug on setting the default PDF link target

#### 2.4

 * Add an option to specify the default PDF link target

#### 2.3

 * Change the PDF.js 2.0.493 folder name to the default name pdfjs to fix the possible
   cache issue

#### 2.2

 * Change PDF.js folder name to fix the cache issue after upgrading

#### 2.1

 * Fix the cache issue after upgrading PDF.js

#### 2.0

 * Add Mozilla PDF.js version 2.0.493 (dark theme toolbar) as an option

#### 1.9

 * Update Mozilla PDF.js to the latest version 2.12.313
 * NOTICE: The latest Mozilla PDF.js changes the viewer toolbar from dark to light
   color theme!

#### 1.8

 * Support loading cross-domain PDF files by configuring remote server CORS policy

#### 1.7

 * Escape shortcode attributes

#### 1.6

 * Add an option to hide the whole toolbar
 * Add an option to hide the Open File button in the toolbar
 * Add an option to disable right click on the PDF viewer

#### 1.5

 * Add an option to hide the Document Properties menu item in the toolbar
 * Enable the Hand Tool option when the Text Selection Tool menu is hidden

#### 1.4

 * Add an option to hide the Text Selection Tool menu item in the toolbar

#### 1.3

 * Add information for the toolbar options

#### 1.2

 * Add two options to hide the Download and the Print button in the toolbar

#### 1.1

 * Update Mozilla PDF.js to the latest version 2.0.493

#### 1.0

 * First version released

## 额外信息

 *  版本 **3.1**
 *  最后更新：**3 月前**
 *  活跃安装数量 **8,000+**
 *  WordPress 版本 ** 3.6 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  语言
 * [English (US)](https://wordpress.org/plugins/wonderplugin-pdf-embed/)
 * 标签
 * [pdf embed](https://cn.wordpress.org/plugins/tags/pdf-embed/)[pdf viewer](https://cn.wordpress.org/plugins/tags/pdf-viewer/)
 *  [高级视图](https://cn.wordpress.org/plugins/wonderplugin-pdf-embed/advanced/)

## 评级

 4.5 星（最高 5 星）。

 *  [  10 条 5 星评价     ](https://wordpress.org/support/plugin/wonderplugin-pdf-embed/reviews/?filter=5)
 *  [  2 条 4 星评价     ](https://wordpress.org/support/plugin/wonderplugin-pdf-embed/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/wonderplugin-pdf-embed/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/wonderplugin-pdf-embed/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/wonderplugin-pdf-embed/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wonderplugin-pdf-embed/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wonderplugin-pdf-embed/reviews/)

## 贡献者

 *   [ WonderPlugin ](https://profiles.wordpress.org/wonderplugin/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/wonderplugin-pdf-embed/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.wonderplugin.com/wordpress-pdf-embed/)