DOC-FULL-015 P1 | PDF metadata / text / search 【status:todo】 #71

Closed
opened 2026-06-07 11:33:17 +08:00 by wangdl · 2 comments
Owner

PDF metadata/page_count/text extraction/page text/basic search/page anchor,pdfium optional feature

M-DOC-FULL 里程碑 issue。详见设计文档。

## PDF metadata/page_count/text extraction/page text/basic search/page anchor,pdfium optional feature M-DOC-FULL 里程碑 issue。详见设计文档。
wangdl added this to the M-DOC-FULL:Document Runtime 完整阅读内核与学习事件协议 milestone 2026-06-07 11:33:17 +08:00
wangdl changed title from DOC-FULL-015 P1 | PDF metadata / text / search 模块 to DOC-FULL-015 P1 | PDF metadata / text / search 【status:todo】 2026-06-07 19:15:05 +08:00
Author
Owner

审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。

本 Issue: pdf.rs 仅 3 行 stub。pdfium optional feature 未实现。

状态: status:todo
工作类型: work:new-module

## 审查结论:document runtime 当前有文件类型识别/MaterialType/PreviewMode/DocumentInfo(基本)/Markdown解析/Text解析/ImageMeta/Search(V1 Markdown+Text)/NoteAnchor(V1)/ReadingEvent(V1)/ReadingPosition(V1)/EventBuffer(V1基础)/iOS构建/UniFFI绑定/docs。但 V2 核心模型(ReadingSession/EventV2/ActiveTimeTracker)不存在,EventBuffer 缺 ack/failed,Position 缺 camelCase+clamp,PDF/EPUB/Office 为 stub,测试覆盖不足 V2。 **本 Issue**: pdf.rs 仅 3 行 stub。pdfium optional feature 未实现。 **状态**: status:todo **工作类型**: work:new-module
Author
Owner

完成报告

改动

  • pdf.rs (NEW): PdfMetadata (page_count/title/author/file_size) + PdfPageText (page_number/text)
  • pdf.rs: read_pdf_metadata() — 字节级 PDF 解析:/Type /Page 计数 + /Count 回退 + %PDF- 兜底
  • pdf.rs: extract_pdf_text() — stub(需 pdfium feature 启用)
  • pdf.rs: extract_pdf_info_field() — 支持括号字符串和 hex 字符串
  • pdf.rs: 6 测试(含 title/author 提取 + fixture 验证)
  • FFI: read_pdf_metadata_ffi + extract_pdf_text_ffi + UDL

审查发现问题

  • #99: P3 office_preview_mode 无人调用
  • #98: P2 EPUB 重复 ZIP 解析
  • #100: P2 EPUB3 NAV 解析支持

验证

cargo test pdf — 6 passed
cargo test --all — 156 passed, 0 failed
## 完成报告 ### 改动 - `pdf.rs` (NEW): `PdfMetadata` (page_count/title/author/file_size) + `PdfPageText` (page_number/text) - `pdf.rs`: `read_pdf_metadata()` — 字节级 PDF 解析:`/Type /Page` 计数 + `/Count` 回退 + `%PDF-` 兜底 - `pdf.rs`: `extract_pdf_text()` — stub(需 pdfium feature 启用) - `pdf.rs`: `extract_pdf_info_field()` — 支持括号字符串和 hex 字符串 - `pdf.rs`: 6 测试(含 title/author 提取 + fixture 验证) - FFI: `read_pdf_metadata_ffi` + `extract_pdf_text_ffi` + UDL ### 审查发现问题 - #99: P3 `office_preview_mode` 无人调用 - #98: P2 EPUB 重复 ZIP 解析 - #100: P2 EPUB3 NAV 解析支持 ### 验证 ``` cargo test pdf — 6 passed cargo test --all — 156 passed, 0 failed ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/zhixi-document-runtime#71
No description provided.