Giter Site home page Giter Site logo

richaber / pdf.js-viewer-shortcode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twistermc/pdfjs-viewer-shortcode

0.0 1.0 0.0 4.62 MB

A Wordpress plugin for embedding PDFs using Mozilla's Excellent PDF.js

Home Page: https://wordpress.org/plugins/pdfjs-viewer-shortcode/

License: GNU General Public License v3.0

PHP 2.47% JavaScript 91.57% CSS 4.30% HTML 1.65%

pdf.js-viewer-shortcode's Introduction

PDF.js Viewer Shortcode

Contributors: falconerweb, twistermc, richaber
Tags: pdf, pdf.js, viewer, reader, embed, mozilla, shortcode
Requires at least: 4.9
Tested up to: 5.2
Stable tag: 1.4
Requires PHP: 5.6
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Embed a beautiful PDF viewer into pages with a simple shortcode.

Description

Incorporate Mozilla's PDF.js viewer into your pages and posts with a simple shortcode. PDF.js is a javascript library for displaying pdf pages within browsers.

Features:

  • Gutenberg block for even easier PDF.js embedding
  • Elegant speckled gray theme
  • Customizable buttons
  • Page navigation drawer
  • Advanced search functionality
  • Language support for all languages
  • Protected PDF password entry
  • Loading bar & displays partially loaded PDF (great for huge PDFs!)
  • Document outline
  • Advanced zoom settings
  • Easy to use editor media button that generates the shortcode for you
  • Support for mobile devices

Shortcode Syntax:

[pdfjs-viewer url=http://www.website.com/test.pdf title="My Embedded PDF Document" viewer_width=600px viewer_height=700px fullscreen=true download=true print=true]

  • url (required): direct url to pdf file
  • title (optional): Title attribute to use on the embedded iframe for accessibility (default: 'Embedded PDF Document')
  • viewer_width (optional): width of the viewer (default: 100%)
  • viewer_height (optional): height of the viewer (default: 1360px)
  • fullscreen (optional): true/false, displays fullscreen link above viewer (default: true)
  • download (optional): true/false, enables or disables download button (default: true)
  • print (optional): true/false, enables or disables print button (default: true)

Installation

From within WordPress

  1. Go to "Plugins" -> "Add New" in the WordPress Dashboard
  2. Search for "PDF.js Viewer Shortcode" in the Plugins Add New Screen
  3. Click the "Install Now" button
  4. Click the "Activate" button

Manually

  1. Download the plugin as a .zip archive from the WordPress Plugin Repository
  2. Upload and expand the archive into your site's wp-content/plugins directory
  3. Go to "Plugins" in the WordPress Dashboard
  4. Click the "Activate" link under "PDFjs Viewer"

Screenshots

1. Viewer example with default size.

Viewer example with default size.

2. Location of media button (Pre-Gutenberg / Classic Editor)

Location of media button (Pre-Gutenberg / Classic Editor)

Changelog

1.4

Release Date: CHANGE THIS BEFORE RELEASE

Enhancements:

  • Introduce a Gutenberg block for even easier PDF.js embedding
  • Upgrade Mozilla's PDF.js to stable version 2.1.266 https://github.com/mozilla/pdf.js/releases/tag/v2.1.266
  • Update license to GPL v3 for compatibility with both WordPress (GPL v2) and Mozilla PDF.js (Apache v2)
  • Internationalized strings
  • Add support for iframe title attribute for improved accessibility
  • Added support for PDF.js viewer's page, zoom, nameddest, and pagemode fragment identifier options

pdf.js-viewer-shortcode's People

Contributors

benjaminlawson avatar richaber avatar twistermc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.