This post is a copy of the readme file of the pdf-element project

Polymer based web component which allows to view PDF files.

Features:

  • Next/Previous page
  • Zoom
  • Download
  • Compatible with Polymer 1.0
  • Dynamically change document without page reloading
  • Looks nice :)

pdf-element

Installation

git clone https://github.com/streetturtle/pdf-element.git
cd ./pdf-element
npm install
bower install
gulp serve

Usage

Include element:

<link rel="import" href="./pdf-reader.html">

And then simply use it:

<pdf-reader src="../pdf.pdf" width=720 height=400></pdf-reader>

To dynamically change the file just use bound url property:

<pdf-reader src="{{selectedPdf.path}}" width=720 height=400></pdf-reader>

More details with demo could be found at the project site.