跳到内容

Embedwell PDF Embed Viewer

v1.3.0

Gunjan Jaswal · 2026年11月8日 上架

Embed a PDF right inside a post or page with a clean, responsive, full-width viewer. Add it with a block or a shortcode. No third-party services.

正在使用
10 以下
评分
暂无
累计下载
278
最近更新
2026年11月19日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+

贡献者

截图

A PDF embedded inline in a post, shown in the browser's built-in viewer.
A PDF embedded inline in a post, shown in the browser's built-in viewer.

Embedwell drops a PDF straight into your content so readers can scroll through it without leaving the page. Pick a file from your Media Library (or paste a URL), choose a height, and you are done.

It uses the browser’s own PDF viewer, so there is no heavy library to load and nothing is sent to an outside service. Your files stay on your own site.

What you get

  • An “Embedwell” block for the editor, with a live preview while you set it up.
  • An [ew-pdf-embed] shortcode for the classic editor, widgets, or anywhere shortcodes run.
  • Control over the viewer height and the built-in toolbar.
  • Fits the page to the viewer width and hides the thumbnail sidebar for a clean, full-width read.
  • Responsive by default, so it fits phones as well as wide desktop layouts.
  • Translation ready, properly escaped output, and no settings page to wade through.

How to use

Embed a PDF with the block

  1. Edit a post or page.
  2. Click the + (block inserter) and search for Embedwell.
  3. Add the block, then click Upload or Media Library and pick your PDF.
  4. In the block sidebar, set the viewer height, show or hide the toolbar, and type an accessible title if you like.
  5. Use the toolbar’s Replace PDF button any time you want to swap the file.
  6. Publish. The PDF shows up inline, fitted to the width of your content.

Tip: to run the viewer edge to edge, select the block and choose Wide width or Full width from the block toolbar.

Embed a PDF with the shortcode

Use the shortcode when you are in the classic editor, a widget, or a template file.

Embed a file from your Media Library by its attachment ID:

[ew-pdf-embed id="123"]

Embed any PDF by its URL, taller and with the toolbar hidden:

[ew-pdf-embed url="https://example.com/files/report.pdf" height="800" toolbar="0"]

Call it from a template with do_shortcode():

<?php echo do_shortcode( '[ew-pdf-embed id="123"]' ); ?>

Finding a PDF’s attachment ID

Open Media Library, click the PDF, and read the item= number in the URL, or copy the file URL and use it with the url attribute instead.

Shortcode attributes

  • id — Media Library attachment ID of the PDF.
  • url — Direct URL to a PDF (used if no id is given).
  • height — Viewer height in pixels. Default 600.
  • toolbar — 1 to show the viewer toolbar, 0 to hide it. Default 1.
  • title — Accessible title for the viewer (read by screen readers).

The [embedwell], [pp-pdf-embed], [paperpane], [docuforge], [pdf-embed-forge] and [pdf-forge] shortcodes also work as aliases, so anything you built before keeps running.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums