How to use pdf2json - 1 common examples

To help you get started, we’ve selected a few pdf2json examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jsfr / linkedin-pdf-parser / src / index.js View on Github external
return new Promise((resolve, reject) => {
    const pdfParser = new PDFParser()
    pdfParser.on('pdfParser_dataReady', pdfData => {
      try {
        const data = parsePages(pdfData.formImage.Pages)
        resolve(data)
      } catch (err) {
        reject(err)
      }
    })
    pdfParser.on('pdfParser_dataError', errData => reject(errData))
    pdfParser.parseBuffer(pdfBuffer)
  })
}

pdf2json

PDF file parser that converts PDF binaries to JSON and text, powered by porting a fork of PDF.JS to Node.js

Apache-2.0
Latest version published 4 months ago

Package Health Score

79 / 100
Full package analysis

Popular pdf2json functions