DOC-403 pdf.rs 模块基础实现(PDF 阅读位置模型) #28

Closed
opened 2026-06-02 20:11:36 +08:00 by wangdl · 1 comment
Owner

背景

crates/zx_document_core/src/pdf.rs 当前是空文件(0 行代码)。README 和 architecture.md 中都描述了 PDF 位置模型:

pub struct PdfReadingPosition {
    pub page_number: u32,
    pub page_progress: f32,
    pub overall_progress: f32,
}

ReadingPosition::Pdf 变体已在 progress.rs 中定义并正常工作。

需要实现

  1. pdf.rs 至少包含 PDF metadata 读取(页数等基本信息)
  2. 或者如果第一版不做 Rust PDF 解析,则文件内应有明确的 // M4: PDF handled via platform preview (PDFKit/QuickLook) 注释说明
  3. 不应是空文件导致 cargo doc 产生空模块文档

相关

  • #23 DOC-401 PDF 阅读方案评估
  • ReadingPosition::Pdf 变体已在 progress.rs 中定义
  • PreviewMode::PlatformPreview 已正确映射
## 背景 `crates/zx_document_core/src/pdf.rs` 当前是空文件(0 行代码)。README 和 architecture.md 中都描述了 PDF 位置模型: ```rust pub struct PdfReadingPosition { pub page_number: u32, pub page_progress: f32, pub overall_progress: f32, } ``` 而 `ReadingPosition::Pdf` 变体已在 progress.rs 中定义并正常工作。 ## 需要实现 1. pdf.rs 至少包含 PDF metadata 读取(页数等基本信息) 2. 或者如果第一版不做 Rust PDF 解析,则文件内应有明确的 `// M4: PDF handled via platform preview (PDFKit/QuickLook)` 注释说明 3. 不应是空文件导致 cargo doc 产生空模块文档 ## 相关 - #23 DOC-401 PDF 阅读方案评估 - ReadingPosition::Pdf 变体已在 progress.rs 中定义 - PreviewMode::PlatformPreview 已正确映射
wangdl added this to the M4:PDF / Office 预览边界完善 milestone 2026-06-02 20:11:36 +08:00
wangdl added the
priority:p1
area:pdf
labels 2026-06-02 20:11:36 +08:00
Author
Owner

关闭 — 被新 issue 替代

DOC-403 PDF 实现 → DOC-FULL-015。详细工作在新 DOC-FULL issue 中。

## 关闭 — 被新 issue 替代 DOC-403 PDF 实现 → DOC-FULL-015。详细工作在新 DOC-FULL issue 中。
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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