Embed PDF Viewer

Описание

Вставьте PDF-файл из библиотеки мультимедиа или из другого источника с помощью oEmbed или в виде блока в тег object или Google Doc Viewer в качестве запасного варианта. URL должен быть только общедоступной ссылкой.

Вдохновлен Embed PDF и RV Embed PDF.

Большое спасибо Алексу Кирку за совместимость Embed PDF Viewer с новым редактором блоков.

Разработка на GitHub. PR приветствуются в ветке develop.

Скриншоты

  • Embed PDF Viewer block
  • Select PDF
  • PDF block and attributes

Блоки

Этот плагин предоставляет 1 блок.

embed-pdf-viewer/pdf
Embed PDF Viewer

Отзывы

26.05.2020
A light and very easy to use plugin, no shortcode, no fuss. Thanks ! the fullscreen feature is a bit surprising though, does not works as expected for me (Chrome), but never mind since it is easy to download it, or to zoom in. Plugin léger, pas de shortcode, on charge les PDF comme on charge les photos, directo depuis la biblio du site. Bouton pour imprimer + télécharger inclus, et le lien du doc apparait automatiquement sous la fenêtre. j'aime !
16.05.2020
No settings, just add the link of the PDF on a page or use a block. Had issue with the viewer width, but there's a simple solution for that as well, check this thread. Thanks!
05.02.2020
The pdf is cut in half. Have to scroll to read a full page. Not very many settings. Very limited in how it can be used. I can't use it. Still looking for a PDF viewer that just works. Apparently this is a very difficult thing to do cause there are no good ones out there 🙁
06.10.2019
This is a great PDF viewer/ embedder plugin, just works, and developer quickly fixed an issue I identified (https://wordpress.org/support/topic/uploading-from-within-block-doesnt-work/ ). Only problem is that it doesn't work too well on mobiles (seems to add a load of whitespace and revert to Google embed). So I now recommend and prefer https://wordpress.org/plugins/pdf-viewer-block/
13.06.2018
This plugin works, but... THE PDF FILE CANNOT BE DOWNLOADED. This plugin uses Google Docs to embed PDF files instead of the browser's native PDF JavaScript code. There are no settings page to at least be able to change the size of the embed.
Посмотреть все 8 отзывов

Участники и разработчики

«Embed PDF Viewer» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

«Embed PDF Viewer» переведён на 3 языка. Благодарим переводчиков за их работу.

Перевести «Embed PDF Viewer» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

2.1.2 / 2020-09-15

  • use same block name for oembed
  • add additional dependencies to enqueue

2.1.1 / 2020-07-20

  • update block for deprecated items and minor errors
  • update media selector for only PDFs

2.1.0 / 2020-07-20

  • update block build process
  • add title and description attributes for a11y
  • add PDF svg for block

2.0.5 / 2020-03-09

  • minor updates to plugin structure on GitHub
  • update tested to

2.0.4 / 2019-10-05

2.0.3 / 2019-04-25

  • move block registration to it’s own function and hook
  • WPCS updates

2.0.2 / 2019-02-03

  • update WordPress requirements

2.0.1 / 2019-01-11

  • added composer.json and automatically create POT with composer update
  • added check for register_block_type() for WP 4.9.x and below

2.0.0 / 2018-12-20 🎂

  • a proper PDF block was added with much help from Alex Kirk, many thanks

1.6.1 / 2018-11-25

  • properly initialize load_plugin_textdomain()

1.6.0 / 2018-07-22

  • added filter embed_pdf_viewer_pdf_attributes
  • updated readme.txt to include Requires PHP header
  • added paragraph tag around link to PDF

1.5.0 / 2016-12-17

  • added CSS to fallback to iframe on iOS as object isn’t scrollable 😛

1.4.0

  • switch to using object tag, with iframe as fallback display method

1.3.0

  • inserting anything other than PDF from Media Library now works as expected.

1.2.1

  • fixed a couple of PHP warnings

1.2.0

  • inserting a PDF from the Media Library now simply inserts the URL for oEmbed
  • oEmbed a PDF from any source

1.1.2

  • simplify instance() just a little more

1.1.1

  • rename instance variable to $instance and make private
  • update DocBlocks
  • ensure $atts is an array

1.1

  • bugfix for not returning media item when not PDF, Bad Andy 🙁

1.0.1

  • add to DocBlocks

1.0

  • refactor to put embed code in one function
  • add assets

0.1

  • initial commit