api documentation for pdf2json (v1.1.7)

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

table of contents

  1. module pdf2json
    1. function pdf2json (context, needRawText)
    2. function pdf2json.p2jcmd ()
    3. function pdf2json.pdf (needRawText)
    4. function pdf2json.pdfanno (field, viewport, Fields, Boxsets)
    5. function pdf2json.pdfcanvas (canvasTarget, scaledWidth, scaledHeight)
    6. function pdf2json.pdffield (field, viewport, Fields, Boxsets)
    7. function pdf2json.pdffill (x, y, width, height, color)
    8. function pdf2json.pdffont (fontObj)
    9. function pdf2json.pdfline (x1, y1, x2, y2, lineWidth, color, dashed)
    10. function pdf2json.pdfunit ()
    11. function pdf2json.ptixmlinject ()
    12. function pdf2json.super_ (options)
    13. object pdf2json.p2jcmd.prototype
    14. object pdf2json.pdf.prototype
    15. object pdf2json.pdfanno.prototype
    16. object pdf2json.pdfcanvas.prototype
    17. object pdf2json.pdffield.prototype
    18. object pdf2json.pdffill.prototype
    19. object pdf2json.pdffont.prototype
    20. object pdf2json.pdfline.prototype
    21. object pdf2json.ptixmlinject.prototype
  2. module pdf2json.p2jcmd
    1. function pdf2json.p2jcmd ()
  3. module pdf2json.p2jcmd.prototype
    1. function pdf2json.p2jcmd.prototype.complete (err)
    2. function pdf2json.p2jcmd.prototype.initialize ()
    3. function pdf2json.p2jcmd.prototype.processFiles (inputDir, files)
    4. function pdf2json.p2jcmd.prototype.processOneDirectory ()
    5. function pdf2json.p2jcmd.prototype.processOneFile ()
    6. function pdf2json.p2jcmd.prototype.start ()
  4. module pdf2json.pdf
    1. function pdf2json.pdf (needRawText)
    2. function pdf2json.pdf.super_ ()
  5. module pdf2json.pdf.prototype
    1. function pdf2json.pdf.prototype.destroy ()
    2. function pdf2json.pdf.prototype.getAllFieldsTypes ()
    3. function pdf2json.pdf.prototype.getMergedTextBlocksIfNeeded ()
    4. function pdf2json.pdf.prototype.getRawTextContent ()
    5. function pdf2json.pdf.prototype.load (pdfDocument, scale)
    6. function pdf2json.pdf.prototype.loadMetaData ()
    7. function pdf2json.pdf.prototype.loadPages ()
    8. function pdf2json.pdf.prototype.parseMetaData ()
    9. function pdf2json.pdf.prototype.parsePDFData (arrayBuffer)
    10. function pdf2json.pdf.prototype.parsePage (promisedPages, id, scale)
    11. function pdf2json.pdf.prototype.raiseErrorEvent (errMsg)
    12. function pdf2json.pdf.prototype.raiseReadyEvent (data)
    13. function pdf2json.pdf.prototype.tryLoadFieldInfoXML (pdfFilePath)
  6. module pdf2json.pdfanno
    1. function pdf2json.pdfanno (field, viewport, Fields, Boxsets)
    2. function pdf2json.pdfanno.processAnnotation (annotation, item)
  7. module pdf2json.pdfanno.prototype
    1. function pdf2json.pdfanno.prototype.clean ()
  8. module pdf2json.pdfcanvas
    1. function pdf2json.pdfcanvas (canvasTarget, scaledWidth, scaledHeight)
  9. module pdf2json.pdfcanvas.prototype
    1. function pdf2json.pdfcanvas.prototype.arc (aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise)
    2. function pdf2json.pdfcanvas.prototype.arcTo ()
    3. function pdf2json.pdfcanvas.prototype.beginPath ()
    4. function pdf2json.pdfcanvas.prototype.bezierCurveTo (aCP1x, aCP1y, aCP2x, aCP2y, aX, aY)
    5. function pdf2json.pdfcanvas.prototype.clearRect ()
    6. function pdf2json.pdfcanvas.prototype.clip ()
    7. function pdf2json.pdfcanvas.prototype.closePath ()
    8. function pdf2json.pdfcanvas.prototype.createLinearGradient (aX0, aY0, aX1, aY1)
    9. function pdf2json.pdfcanvas.prototype.createPattern ()
    10. function pdf2json.pdfcanvas.prototype.createRadialGradient (aX0, aY0, aR0, aX1, aY1, aR1)
    11. function pdf2json.pdfcanvas.prototype.drawImage (image, var_args)
    12. function pdf2json.pdfcanvas.prototype.fill ()
    13. function pdf2json.pdfcanvas.prototype.fillRect (aX, aY, aWidth, aHeight)
    14. function pdf2json.pdfcanvas.prototype.fillText (text, x, y, maxWidth, fontSize)
    15. function pdf2json.pdfcanvas.prototype.getContext (ctxType)
    16. function pdf2json.pdfcanvas.prototype.getCoords_ (aX, aY)
    17. function pdf2json.pdfcanvas.prototype.getImageData (x, y, w, h)
    18. function pdf2json.pdfcanvas.prototype.getLineDash ()
    19. function pdf2json.pdfcanvas.prototype.lineTo (aX, aY)
    20. function pdf2json.pdfcanvas.prototype.measureText (text)
    21. function pdf2json.pdfcanvas.prototype.moveTo (aX, aY)
    22. function pdf2json.pdfcanvas.prototype.quadraticCurveTo (aCPx, aCPy, aX, aY)
    23. function pdf2json.pdfcanvas.prototype.rect (aX, aY, aWidth, aHeight)
    24. function pdf2json.pdfcanvas.prototype.restore ()
    25. function pdf2json.pdfcanvas.prototype.rotate (aRot)
    26. function pdf2json.pdfcanvas.prototype.save ()
    27. function pdf2json.pdfcanvas.prototype.scale (aX, aY)
    28. function pdf2json.pdfcanvas.prototype.setFont (fontObj)
    29. function pdf2json.pdfcanvas.prototype.setLineDash (lineDash)
    30. function pdf2json.pdfcanvas.prototype.setTransform (m11, m12, m21, m22, dx, dy)
    31. function pdf2json.pdfcanvas.prototype.stroke (aFill)
    32. function pdf2json.pdfcanvas.prototype.strokeRect (aX, aY, aWidth, aHeight)
    33. function pdf2json.pdfcanvas.prototype.strokeText (text, x, y, maxWidth)
    34. function pdf2json.pdfcanvas.prototype.transform (m11, m12, m21, m22, dx, dy)
    35. function pdf2json.pdfcanvas.prototype.translate (aX, aY)
  10. module pdf2json.pdffield
    1. function pdf2json.pdffield (field, viewport, Fields, Boxsets)
    2. function pdf2json.pdffield.getAllFieldsTypes (data)
    3. function pdf2json.pdffield.isFormElement (field)
    4. function pdf2json.pdffield.isWidgetSupported (field)
  11. module pdf2json.pdffield.prototype
    1. function pdf2json.pdffield.prototype.clean ()
    2. function pdf2json.pdffield.prototype.processField ()
  12. module pdf2json.pdffill
    1. function pdf2json.pdffill (x, y, width, height, color)
  13. module pdf2json.pdffill.prototype
    1. function pdf2json.pdffill.prototype.processFill (targetData)
  14. module pdf2json.pdffont
    1. function pdf2json.pdffont (fontObj)
    2. function pdf2json.pdffont.areAdjacentBlocks (t1, t2)
    3. function pdf2json.pdffont.areDuplicateBlocks (t1, t2)
    4. function pdf2json.pdffont.compareBlockPos (t1, t2)
    5. function pdf2json.pdffont.getFontSize (textBlock)
    6. function pdf2json.pdffont.getSpaceThreshHold (t1)
    7. function pdf2json.pdffont.haveSameStyle (t1, t2)
  15. module pdf2json.pdffont.prototype
    1. function pdf2json.pdffont.prototype.clean ()
    2. function pdf2json.pdffont.prototype.flash_encode (str)
    3. function pdf2json.pdffont.prototype.processText (p, str, maxWidth, color, fontSize, targetData, matrix2D)
  16. module pdf2json.pdfline
    1. function pdf2json.pdfline (x1, y1, x2, y2, lineWidth, color, dashed)
  17. module pdf2json.pdfline.prototype
    1. function pdf2json.pdfline.prototype.processLine (targetData)
  18. module pdf2json.pdfunit
    1. function pdf2json.pdfunit ()
    2. function pdf2json.pdfunit.colorCount ()
    3. function pdf2json.pdfunit.findColorIndex (color)
    4. function pdf2json.pdfunit.getColorByIndex (clrId)
    5. function pdf2json.pdfunit.pointToPixel (point)
    6. function pdf2json.pdfunit.toFixedFloat (fNum)
    7. function pdf2json.pdfunit.toFormPoint (viewportX, viewportY)
    8. function pdf2json.pdfunit.toFormX (viewportX)
    9. function pdf2json.pdfunit.toFormY (viewportY)
    10. function pdf2json.pdfunit.toPixelX (formX)
    11. function pdf2json.pdfunit.toPixelY (formY)
  19. module pdf2json.ptixmlinject
    1. function pdf2json.ptixmlinject ()
  20. module pdf2json.ptixmlinject.prototype
    1. function pdf2json.ptixmlinject.prototype.getFields (pageNum)
    2. function pdf2json.ptixmlinject.prototype.parseXml (filePath, callback)

module pdf2json

function pdf2json (context, needRawText)

function pdf2json.p2jcmd ()

function pdf2json.pdf (needRawText)

function pdf2json.pdfanno (field, viewport, Fields, Boxsets)

function pdf2json.pdfcanvas (canvasTarget, scaledWidth, scaledHeight)

function pdf2json.pdffield (field, viewport, Fields, Boxsets)

function pdf2json.pdffill (x, y, width, height, color)

function pdf2json.pdffont (fontObj)

function pdf2json.pdfline (x1, y1, x2, y2, lineWidth, color, dashed)

function pdf2json.pdfunit ()

function pdf2json.ptixmlinject ()

function pdf2json.super_ (options)

module pdf2json.p2jcmd

function pdf2json.p2jcmd ()

module pdf2json.p2jcmd.prototype

function pdf2json.p2jcmd.prototype.complete (err)

function pdf2json.p2jcmd.prototype.initialize ()

function pdf2json.p2jcmd.prototype.processFiles (inputDir, files)

function pdf2json.p2jcmd.prototype.processOneDirectory ()

function pdf2json.p2jcmd.prototype.processOneFile ()

function pdf2json.p2jcmd.prototype.start ()

module pdf2json.pdf

function pdf2json.pdf (needRawText)

function pdf2json.pdf.super_ ()

module pdf2json.pdf.prototype

function pdf2json.pdf.prototype.destroy ()

function pdf2json.pdf.prototype.getAllFieldsTypes ()

function pdf2json.pdf.prototype.getMergedTextBlocksIfNeeded ()

function pdf2json.pdf.prototype.getRawTextContent ()

function pdf2json.pdf.prototype.load (pdfDocument, scale)

function pdf2json.pdf.prototype.loadMetaData ()

function pdf2json.pdf.prototype.loadPages ()

function pdf2json.pdf.prototype.parseMetaData ()

function pdf2json.pdf.prototype.parsePDFData (arrayBuffer)

function pdf2json.pdf.prototype.parsePage (promisedPages, id, scale)

function pdf2json.pdf.prototype.raiseErrorEvent (errMsg)

function pdf2json.pdf.prototype.raiseReadyEvent (data)

function pdf2json.pdf.prototype.tryLoadFieldInfoXML (pdfFilePath)

module pdf2json.pdfanno

function pdf2json.pdfanno (field, viewport, Fields, Boxsets)

function pdf2json.pdfanno.processAnnotation (annotation, item)

module pdf2json.pdfanno.prototype

function pdf2json.pdfanno.prototype.clean ()

module pdf2json.pdfcanvas

function pdf2json.pdfcanvas (canvasTarget, scaledWidth, scaledHeight)

module pdf2json.pdfcanvas.prototype

function pdf2json.pdfcanvas.prototype.arc (aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise)

function pdf2json.pdfcanvas.prototype.arcTo ()

function pdf2json.pdfcanvas.prototype.beginPath ()

function pdf2json.pdfcanvas.prototype.bezierCurveTo (aCP1x, aCP1y, aCP2x, aCP2y, aX, aY)

function pdf2json.pdfcanvas.prototype.clearRect ()

function pdf2json.pdfcanvas.prototype.clip ()

function pdf2json.pdfcanvas.prototype.closePath ()

function pdf2json.pdfcanvas.prototype.createLinearGradient (aX0, aY0, aX1, aY1)

function pdf2json.pdfcanvas.prototype.createPattern ()

function pdf2json.pdfcanvas.prototype.createRadialGradient (aX0, aY0, aR0, aX1, aY1, aR1)

function pdf2json.pdfcanvas.prototype.drawImage (image, var_args)

function pdf2json.pdfcanvas.prototype.fill ()

function pdf2json.pdfcanvas.prototype.fillRect (aX, aY, aWidth, aHeight)

function pdf2json.pdfcanvas.prototype.fillText (text, x, y, maxWidth, fontSize)

function pdf2json.pdfcanvas.prototype.getContext (ctxType)

function pdf2json.pdfcanvas.prototype.getCoords_ (aX, aY)

function pdf2json.pdfcanvas.prototype.getImageData (x, y, w, h)

function pdf2json.pdfcanvas.prototype.getLineDash ()

function pdf2json.pdfcanvas.prototype.lineTo (aX, aY)

function pdf2json.pdfcanvas.prototype.measureText (text)

function pdf2json.pdfcanvas.prototype.moveTo (aX, aY)

function pdf2json.pdfcanvas.prototype.quadraticCurveTo (aCPx, aCPy, aX, aY)

function pdf2json.pdfcanvas.prototype.rect (aX, aY, aWidth, aHeight)

function pdf2json.pdfcanvas.prototype.restore ()

function pdf2json.pdfcanvas.prototype.rotate (aRot)

function pdf2json.pdfcanvas.prototype.save ()

function pdf2json.pdfcanvas.prototype.scale (aX, aY)

function pdf2json.pdfcanvas.prototype.setFont (fontObj)

function pdf2json.pdfcanvas.prototype.setLineDash (lineDash)

function pdf2json.pdfcanvas.prototype.setTransform (m11, m12, m21, m22, dx, dy)

function pdf2json.pdfcanvas.prototype.stroke (aFill)

function pdf2json.pdfcanvas.prototype.strokeRect (aX, aY, aWidth, aHeight)

function pdf2json.pdfcanvas.prototype.strokeText (text, x, y, maxWidth)

function pdf2json.pdfcanvas.prototype.transform (m11, m12, m21, m22, dx, dy)

function pdf2json.pdfcanvas.prototype.translate (aX, aY)

module pdf2json.pdffield

function pdf2json.pdffield (field, viewport, Fields, Boxsets)

function pdf2json.pdffield.getAllFieldsTypes (data)

function pdf2json.pdffield.isFormElement (field)

function pdf2json.pdffield.isWidgetSupported (field)

module pdf2json.pdffield.prototype

function pdf2json.pdffield.prototype.clean ()

function pdf2json.pdffield.prototype.processField ()

module pdf2json.pdffill

function pdf2json.pdffill (x, y, width, height, color)

module pdf2json.pdffill.prototype

function pdf2json.pdffill.prototype.processFill (targetData)

module pdf2json.pdffont

function pdf2json.pdffont (fontObj)

function pdf2json.pdffont.areAdjacentBlocks (t1, t2)

function pdf2json.pdffont.areDuplicateBlocks (t1, t2)

function pdf2json.pdffont.compareBlockPos (t1, t2)

function pdf2json.pdffont.getFontSize (textBlock)

function pdf2json.pdffont.getSpaceThreshHold (t1)

function pdf2json.pdffont.haveSameStyle (t1, t2)

module pdf2json.pdffont.prototype

function pdf2json.pdffont.prototype.clean ()

function pdf2json.pdffont.prototype.flash_encode (str)

function pdf2json.pdffont.prototype.processText (p, str, maxWidth, color, fontSize, targetData, matrix2D)

module pdf2json.pdfline

function pdf2json.pdfline (x1, y1, x2, y2, lineWidth, color, dashed)

module pdf2json.pdfline.prototype

function pdf2json.pdfline.prototype.processLine (targetData)

module pdf2json.pdfunit

function pdf2json.pdfunit ()

function pdf2json.pdfunit.colorCount ()

function pdf2json.pdfunit.findColorIndex (color)

function pdf2json.pdfunit.getColorByIndex (clrId)

function pdf2json.pdfunit.pointToPixel (point)

function pdf2json.pdfunit.toFixedFloat (fNum)

function pdf2json.pdfunit.toFormPoint (viewportX, viewportY)

function pdf2json.pdfunit.toFormX (viewportX)

function pdf2json.pdfunit.toFormY (viewportY)

function pdf2json.pdfunit.toPixelX (formX)

function pdf2json.pdfunit.toPixelY (formY)

module pdf2json.ptixmlinject

function pdf2json.ptixmlinject ()

module pdf2json.ptixmlinject.prototype

function pdf2json.ptixmlinject.prototype.getFields (pageNum)

function pdf2json.ptixmlinject.prototype.parseXml (filePath, callback)

[ this document was created with utility2 ]