当然可以,但是用什么开发呢,js python bash,最后选定了用js来开发,因为笔者最熟悉js,然后就去npm去查找有没有能读取pdf的npm包,果然找到了,pdf2json,演示代码如下: let fs = require('fs'), PDFParser = require("pdf2json"); let pdfParser = new PDFParser( /pdf2json/test/pdf/fd/form/F1040EZ.pdf"); 上面的代码就可以独处pdf中的信息了,读出的信息有一定规律,但是规律不是很有规范,需要在代码中处理一下,我将处理pdf 的功能封装成了一个函数,并导出,代码如下: const PDFParser = require('pdf2json'); const fs = require('fs'); const path = require
问题1 1.如何移植最新版本的pdf.js到pdf2json库中来 2.如何实现 坐标换算 参考源码 x/px = PDFUnit.toPixelX( x+0.25) y/px = PDFUnit.toPixelY : clrId, A: “left”, R: [{ T: this.flash_encode(text), S: this.fontStyleId, TS: TS }] URL decode 之后pdf2json 的结果 { “formImage”: { “Transcoder”: “pdf2json@1.1.6 [https://github.com/modesty/pdf2json]”, “Agency , “Width”: 49.61 } } { “formImage”: { “Transcoder”: “pdf2json@1.1.6 [https://github.com/modesty/pdf2json