| 开发者 | brilliantminds |
|---|---|
| 更新时间 | 2026年10月14日 18:46 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[bmpdf url="https://example.com/file.pdf"]url - link to the PDF file.id - Media Library attachment ID (use instead of url).title - title shown in the toolbar.width, height - for example width="80%" height="600".align - left, center or right.mode - scroll or single.zoom - width, page or a percentage such as 125.page - page to open first.theme - auto, light or dark.accent - hex color, for example #0f766e.radius - corner radius in pixels.toolbar_position - top or bottom. toolbar_style - bar or floating.1 or 0): shadow, show_title, page_input, zoom_controls, rotate, theme_toggle, fullscreen, download, print, open_new, text_select, disable_context, load_on_click.[bmpdf id="123" height="600" theme="dark" mode="single" download="0"]
Developers
Use the bmpdf_viewer_config filter to change the configuration passed to the viewer.
brilliantminds-pdf-embed folder to /wp-content/plugins/, or install the plugin from the Plugins screen.Only if that website allows cross-origin requests (CORS). If it does not, the viewer shows a button that opens the file directly. PDFs in your own Media Library always work.
You can hide the download and print buttons and disable right-click. This keeps casual visitors from saving the file, but a PDF that is publicly viewable can always be saved by a determined visitor. For truly private documents, use a membership or access-control plugin.
Yes. The viewer asks the visitor for the password.
No. The viewer library is bundled with the plugin and all files are loaded from your own site.
The link is shown while the viewer loads, or when JavaScript is disabled, or when the file cannot be read (for example because of missing CORS headers).
Yes, any builder with a shortcode or shortcode widget element works. If you add a viewer dynamically after the page loads, call window.BMPDF.init().