pdfjs icon indicating copy to clipboard operation
pdfjs copied to clipboard

Failed to add document containing lexer

Open Ocyss opened this issue 2 years ago • 1 comments

const ext = new pdf.ExternalDocument(src) // src contains lexer formula
doc.addPageOf(2, ext) // Error
Error: Invalid number at 1: % (code: 37)
    at _Lexer._error (lexer.js:156:11)
    at _Lexer.readNumber (lexer.js:184:16)
    at _PDFObject.parse (object.js:48:22)
    at parseObject (reference.js:84:31)
    at _PDFReference.get [as object] (reference.js:15:17)
    at new ExternalDocument (external.js:20:46)
    at PDFMerger._addGivenPages (pdf-merger.ts:116:7)
    at async index.vue:137:15
    at async Promise.all (localhost.repl.co/index 1)
    at async getRecords (useData.ts:193:13)

1701016039.pdf

Ocyss avatar Dec 24 '23 10:12 Ocyss

Thanks for the report and for providing the example PDF. However, I am afraid that pdfjs is too low on my priorities that I currently do not allocate time to look into PDF parsing issues. Just saying that you know to not expect a fix any time soon.

rkusa avatar Dec 27 '23 12:12 rkusa