Command 6: because expected 2 args, but received 0 args; skipping & Unhandled rejection: Error: Illegal character: 41
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 394
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 7
Description
Hi,
I was using this lib for last few months, but 2 days back i am unable to parse the pdfs. after enabling the logs i see following errors.
Since test file is confidential I cannot publish it here. I can provide the same via email on request.
Can you please help.?
Info: about to load PDF file .\inputs\PREF_0001_26-5000.pdf
Info: Load PDF file status:Success!
Warning: Setting up fake worker.
Info: PDF loaded. pagesCount = 1
Info: start to parse page:1
Info: Command 6: because expected 2 args, but received 0 args; skipping
Warning: Unknown command "X"
Warning: Unknown command "]"
Info: Command 24: expected 0 args, but received 1 args
Warning: Unknown command "V6&="
Warning: Unknown command ">"
Info: Command 4: because expected 1 args, but received 0 args; skipping
Info: Command 15: because expected 6 args, but received 0 args; skipping
Info: Command 5: because expected 1 args, but received 0 args; skipping
Warning: Unknown command "p`"
Info: Command 13: because expected 2 args, but received 0 args; skipping
Info: Command 14: because expected 2 args, but received 0 args; skipping
Warning: Unknown command "]"
Warning: Unhandled rejection: Error: Illegal character: 41
Error: Illegal character: 41
at error (eval at (D:\working\folder\pdfcompare\trunk\node_modules\pdf2json\lib\pdf.js:64:6), :195:9)
at Object.Lexer_getObj [as getObj] (eval at (D:\working\folder\pdfcompare\trunk\node_modules\pdf2js
on\lib\pdf.js:64:6), :24616:11)
at Object.Parser_shift [as shift] (eval at (D:\working\folder\pdfcompare\trunk\node_modules\pdf2jso
n\lib\pdf.js:64:6), :24038:32)
at Object.Parser_getObj [as getObj] (eval at (D:\working\folder\pdfcompare\trunk\node_modules\pdf2j
son\lib\pdf.js:64:6), :24105:12)
at Object.PartialEvaluator_getOperatorList [as getOperatorList] (eval at (D:\working\folder\pdfcomp
are\trunk\node_modules\pdf2json\lib\pdf.js:64:6), :7368:26)
at Object.eval [as onResolve] (eval at (D:\working\folder\pdfcompare\trunk\node_modules\pdf2json\li
b\pdf.js:64:6), :4348:26)
at Object.runHandlers (eval at (D:\working\folder\pdfcompare\trunk\node_modules\pdf2json\lib\pdf.js
:64:6), :864:35)
at ontimeout (timers.js:386:11)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the parser stack in node_modules/pdf2json/lib/pdf.js and the reported input PDF path. Reproduce the failure with the confidential PDF, if it can be provided, and trace the illegal-character error and command warnings during page parsing. Done means the PDF parses without the reported rejection and command-argument warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100