Skip to content

DOCX/PPTX: add structured fidelity warnings and CLI summaries #109

@developer0hye

Description

@developer0hye

Summary

DOCX/PPTX conversion should emit structured fidelity warnings when unsupported or lossy constructs are encountered.

Problem

Current warning output is sparse and inconsistent, making it difficult to understand why output differs from source documents when conversion technically succeeds.

Proposal

  1. Define warning taxonomy.
  • category (e.g., unsupported_feature, fallback_render, style_loss)
  • severity (info/warn/high)
  • scope (document/page/element)
  1. Emit warnings from parser and renderer consistently.
  • include optional location metadata where available
  • avoid leaking private content in warning text
  1. Improve CLI reporting.
  • total warning count
  • grouped summary by category and severity
  • optional verbose mode for per-warning detail
  1. Add regression tests.
  • parser-level warning emission tests
  • end-to-end tests ensuring warnings appear for known unsupported constructs

Code Areas

  • crates/office2pdf/src/error.rs or dedicated warning module
  • crates/office2pdf/src/parser/docx.rs
  • crates/office2pdf/src/parser/pptx.rs
  • crates/office2pdf/src/render/typst_gen.rs
  • crates/office2pdf-cli/src/main.rs

Acceptance Criteria

  • Warnings are structured and programmatically inspectable.
  • CLI summary reflects warning category/severity counts.
  • At least one DOCX and one PPTX regression path validates warning behavior.

Non-Goals

  • This issue does not attempt to implement every missing feature; it improves observability first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions