Coder Social home page Coder Social logo

pdf-viewer-easy's Introduction

pdf.pack.js

对pdf.js的封装,使用更方便,不需要关注内部细节,适配 retina 等高清屏。

另外内嵌了加载样式。

demo

API

PDF(pdfUrl, container, options)

param

  • pdfUrl {String} 必填,pdf的地址
  • container {String} 必填,显示pdf的容器id
  • options {Object}:可选
    • scale {Number} 默认值:1
    • width {Number} 默认值:'auto'(新增,设置width后,scale的值会被忽略)
    • numPages {Number} 默认值:'auto'
    • canvasClass {String}
    • canvasWrap {String} 默认值:'div'
    • canvasWrapClass {String}
    • loadBefore {Function} 加载之前执行
    • renderAfter {Function} 渲染完成后执行

pdf-viewer-easy's People

Contributors

lwenn avatar

Stargazers

Roman avatar

Watchers

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