Git Product home page Git Product logo

pdf2img's Introduction

💠pdf2img

使用JS将PDF文档转换为图片,并支持下载图片(.zip格式全部下载)

PDF To Image
  • 操作说明

    • 操作步骤(选择文件-->文档上传完成-->导出图片)
    • 文档大小建议不超过10M,因为文件越大处理过程越慢,可通过修改index.html中的判断条件控制文件大小限制。#2
      if (mb > 10) {
          alert("文件大小不能>10M");
          return;
      }
    • 可通过修改index.html中openPage函数的中的scale大小控制转换后图片的清晰度,数值越大,清晰度越高。#6
      var scale = 2;
    • 如果转换图片未显示电子签章,将项目引入的pdf.worker.js请通过关键字搜索后,注释下面代码。#3
      if (data.fieldType === 'Sig') {
          //_this2.setFlags(_util.AnnotationFlag.HIDDEN);
      }
    • 如果转换后图片部分文字显示不完整,请查看解决方案:#1
    • 项目中使用了pdf.jsFileSaver.js
  • 浏览器兼容

Chrome Firefox Safari IE
latest latest latest 10+
  • PDF JS版本2.8.335浏览器支持-20210719,由于pdfjs版本2.8.335中js引入了可选链操作符【?.,??】等,请访问参考下图查看自己的浏览器是否支持。
PDF To Image

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.