pdf-viewer

WebJar for pdf-viewer

License

License

ISC
Categories

Categories

Ant Build Tools PDF Data
GroupId

GroupId

org.webjars.bowergithub.telecomsante
ArtifactId

ArtifactId

pdf-viewer
Last Version

Last Version

2.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

pdf-viewer
WebJar for pdf-viewer
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/telecomsante/pdf-viewer

Download pdf-viewer

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.telecomsante/pdf-viewer/ -->
<dependency>
    <groupId>org.webjars.bowergithub.telecomsante</groupId>
    <artifactId>pdf-viewer</artifactId>
    <version>2.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.telecomsante/pdf-viewer/
implementation 'org.webjars.bowergithub.telecomsante:pdf-viewer:2.2.0'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.telecomsante/pdf-viewer/
implementation ("org.webjars.bowergithub.telecomsante:pdf-viewer:2.2.0")
'org.webjars.bowergithub.telecomsante:pdf-viewer:jar:2.2.0'
<dependency org="org.webjars.bowergithub.telecomsante" name="pdf-viewer" rev="2.2.0">
  <artifact name="pdf-viewer" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.telecomsante', module='pdf-viewer', version='2.2.0')
)
libraryDependencies += "org.webjars.bowergithub.telecomsante" % "pdf-viewer" % "2.2.0"
[org.webjars.bowergithub.telecomsante/pdf-viewer "2.2.0"]

Dependencies

compile (8)

Group / Artifact Type Version
org.webjars.bowergithub.polymerelements : paper-toast jar [2.0.0,3)
org.webjars.bowergithub.polymer : polymer jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : iron-resizable-behavior jar [2.1.0,3)
org.webjars.bowergithub.polymerelements : paper-styles jar [2.0.0,3)
org.webjars.bowergithub.web-animations : web-animations-js jar [2.3.1,3)
org.webjars.bowergithub.mozilla : pdfjs-dist jar [2.0.426]
org.webjars.bowergithub.polymerelements : paper-spinner jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : paper-button jar [2.0.0,3)

Project Modules

There are no modules declared in this project.

Published on webcomponents.org

<pdf-viewer>

pdf-viewer is a simple viewer, without any decoration, based on the Mozilla's pdfjs library. Buttons have to be created by the parent page or component.

the component is written using es6 syntax, and polymer 2.x.

Nota : the pdfjs library uses XMLHttpRequest to load the pdf documents. So, you may encountered CORS problem, if you try to load a document from another origin. A solution could be to use a proxy to serve your documents, you could take advantage to use for example the project CORS Anywhere.

Features

  • Next/Previous page
  • Zoom
  • Polymer 2.x
  • Dynamically change document without page reloading
  • Works in IE11, IOS, Android (chrome)

Basic usage :

<pdf-viewer   
  src="https://www.w3.org/TR/1998/REC-html40-19980424/html40.pdf"
  initial-zoom="fit-width",
  mode="double",
  page="5"></pdf-viewer>

Using in polymer app

the file bower_components/pdfjs-dist/build/pdf.worker.min.js must be added to extradependencies section into the polymer.json file.

If for some reasons, bower components are installed in another folder, be aware to pass as attribute PDFJS_workerSrc the full path to the pdf.worker.min.js file.

The component is licensed under the ISC License

org.webjars.bowergithub.telecomsante

Hoppen

Versions

Version
2.2.0