Skip to content

落卷归档,PDF入流 · Add document entry with PDF support - #43

Merged
eric8810 merged 3 commits into
mainfrom
feat/n3-document-entry
Jul 24, 2026
Merged

落卷归档,PDF入流 · Add document entry with PDF support#43
eric8810 merged 3 commits into
mainfrom
feat/n3-document-entry

Conversation

@eric8810

Copy link
Copy Markdown
Contributor

变更内容

  • S3 PDF 可行性 Spike 完成,决策选择 pdfium-native(N-API binding)作为 PDF 渲染方案(D108)
  • PDF 能力合并到 @arcships/light-ocr 包,新增 document 子命令
  • 支持 PDF 和多页图片处理,流式 JSONL 输出
  • 更新 facade 以支持本地开发(无需 npm install)

技术方案

  • PDF 渲染: pdfium-native v0.6.1 (MIT, N-API binding)
  • 集成方式: 进程内调用,渲染后转 PNG 传给 OCR 引擎
  • CLI: light-ocr document <file.pdf> [flags]

测试

  • facade tests: 5/5 通过
  • CLI --help 和 document --help 正常工作

关联

  • D108: PDF renderer selection
  • N3: 图片与 PDF 文档入口

@eric8810
eric8810 merged commit 6d53aa5 into main Jul 24, 2026
1 check passed
birhantprkc pushed a commit to birhantprkc/light-ocr that referenced this pull request Jul 29, 2026
* feat(n3): 文档入口,PDF落卷 · add document entry with PDF support

* fix(document): 修 PDF API,载页归流 · fix pdfium-native API mismatch

* ci(workflow): 改 npm install,适新锁 · use npm install instead of npm ci

---------

Co-authored-by: chenghan <chenghan@fazhitech.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant