Command 6: because expected 2 args, but received 0 args; skipping & Unhandled rejection: Error: Illegal character: 41

未关闭
#141 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript, node.js
领域
backend

调研方向

从 node_modules/pdf2json/lib/pdf.js 中的 parser stack 以及报告的输入 PDF 路径开始。如果可以提供机密 PDF,请使用它重现故障,并在页面解析期间跟踪 illegal-character error 和 command warnings。PDF 在没有报告的拒绝和 command-argument warnings 的情况下完成解析,即表示完成。

由索引模型根据 Issue 内容生成。

描述

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)

主要语言
Java
星标
2.2k
派生
396
平均合并
9 天 19 小时
30 天内合并 PR
3

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modesty/pdf2json 的其他 Issue

查看 modesty/pdf2json 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。