Giter VIP home page Giter VIP logo

webpdf.js's Introduction

WebPDF.js

Foxit WebPDF.js provides a world-class JavaScript library for viewing PDF files in web browsers. It requires no plug-ins and client side rendering -- it is a 100% JavaScript/HTML/CSS solution. Simply put, it offers the same power and accuracy as a desktop PDF viewer such as Foxit Reader, but for web browsers. For free!

WebPDF.js is based on Foxit’s advanced PDF engine, which is used by hundreds of millions of people and trusted by a large number of well-known companies around the world. Unlike other libraries such as PDF.js, WebPDF.js provides high fidelity PDF rendering inherited from it is market proven technology and it is engineered to be immune to browser variations in html5 support.

For developers who have implemented pdf.js in their projects but find the lack of accuracy and support troublesome, we have good news WebPDF.js provides an interface that you can use to migrate and replace pdf.js with no changes to your front-end code. It's ready to swap in and do the job you need it to in no time.

Following are the supported features:

  • PDF viewing
  • Go to page
  • Zoom
  • Rotate page
  • Page thumbnail
  • Bookmark
  • Access file attachments
  • Text search
  • Print selected pages
  • Open password protected PDF
  • Full-screen view

Getting Started

Prerequest

You need a local web server installed, apache or nginx.

Online demo

###Run up the package Unzip the package and then copy "webapp" and "build" folders to a web container; In a web browser, open http://{ip}:{port}/webapp/viewer.html to try out the viewer.

###Font server selection for non-embedded font files WebPDF.js need to connect a server to download the font file if a PDF contains no-embedded fonts. We provide 2 public font servers, one each in US and China.

There are two pdf.workder.js files, WebPDF.workder.cn.js is for Chinese server, WebPDF.workder.us.js is for US server.

WebPDF.worker.us.js is used by default. You can easily change it to the Chinese font server with the following. Find webapp/webpdf.config.js,

var WebPDF = { 'workerSrc' : '../build/WebPDF.worker.us.js' };

Replace WebPDF.worker.us.js to WebPDF.worker.cn.js, and then open "viewer.html" again.

###Get a official license for free There is a default trial key file under folder build/lib/, please contact us for a full free key with ot watermark.

###Resouces description webapp/images image resources webapp/locale localization resources webapp/compressed.tracemonkey-pldi-09.pdf A sample file open by default webapp/jquery.mini.js jquery plug-in webapp/pdf.viewer.js JavaScirpt file for front-end webapp/viewer.html Viewer.html webapp/viewer.css The css file of PDF.js webapp/webpdf.mini.css The css file of WebPDF.js build/pdf.worker.js worker file created in the front-end, used for load FXJS_rel.js, and handle data request build/WeBPDF.js The interface layer of WebPDF build/lib/FXJS_rel.js The core engine of WebPDF.js build/lib/brotli.js brotli decompress plug-in, used for compress font file build/lib/key.txt The license key file

Related article

http://www.foxitsdk.com/insights/introducing-foxits-new-javascript-pdf-viewer/

Contact

We would love to hear your feedback on this new project. And of course, if you require more advanced functionality -- we've got that too. Just reach out to us and we'll be happy to help you.

Email: [email protected]

www.foxitsoftware.com

webpdf.js's People

Contributors

honghe-zhang avatar nancy036 avatar

Watchers

James Cloos avatar HiST avatar  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.