|
| 1 | +## Summary |
| 2 | + |
| 3 | +Determine the scope, supported features, and requirements for the MiniPdf library — a minimal, zero-dependency .NET library for converting Excel (.xlsx) files to PDF. |
| 4 | + |
| 5 | +## Current State |
| 6 | + |
| 7 | +The library today (`v0.1.0`, `net9.0`) supports: |
| 8 | +- **Text-to-PDF**: positioned and auto-wrapped text using Helvetica / PDF 1.4 |
| 9 | +- **Excel-to-PDF**: basic cell text rendering with automatic column layout, pagination, and per-cell font color (`PdfColor`) |
| 10 | +- **I/O**: file paths (`Convert(string)`, `ConvertToFile`) and streams (`Convert(Stream)`) for both input and output, plus `byte[]` via `ToArray()` |
| 11 | +- **Options**: `ConversionOptions` with font size, margins, column padding, line spacing, page dimensions (Letter/A4), and sheet-name header toggle |
| 12 | +- Zero external dependencies (built-in `System.IO.Compression` for ZIP, `System.Xml` for OOXML parsing) |
| 13 | + |
| 14 | +## Decisions Needed |
| 15 | + |
| 16 | +### 1. Target Frameworks |
| 17 | +- [ ] Keep `net9.0` only, or add `netstandard2.0` / `net6.0` / `net8.0` TFMs for broader adoption? |
| 18 | + |
| 19 | +### 2. Formatting Support |
| 20 | +| Feature | Priority | Notes | |
| 21 | +|---|---|---| |
| 22 | +| Bold / italic / underline | ? | Requires Helvetica-Bold/Oblique font references | |
| 23 | +| Font size per cell | ? | Currently uses a single global `FontSize` | |
| 24 | +| Cell background / fill color | ? | Would need `re` (rectangle fill) PDF operators | |
| 25 | +| Text alignment (left/center/right) | ? | Currently left-aligned only | |
| 26 | +| Column width from Excel (`<col>` widths) | ? | Currently auto-calculated from content length | |
| 27 | +| Row height from Excel | ? | Currently uses fixed `FontSize × LineSpacing` | |
| 28 | +| Merged cells | ? | Not currently handled | |
| 29 | +| Number / date formatting | ? | Cells are rendered as raw shared-string text | |
| 30 | + |
| 31 | +### 3. Advanced Content |
| 32 | +- [ ] **Images** — Embedded pictures in worksheets (JPEG/PNG → PDF image XObjects) |
| 33 | +- [ ] **Charts** — Likely out of scope for a "mini" library; document the decision |
| 34 | +- [ ] **Conditional formatting** — Color scales, data bars, icon sets |
| 35 | +- [ ] **Hyperlinks** — PDF link annotations from Excel hyperlinks |
| 36 | + |
| 37 | +### 4. Multi-Sheet Handling |
| 38 | +- [ ] Current behavior: all sheets rendered sequentially. Should each sheet start on a new page (current) or allow a single-sheet filter? |
| 39 | +- [ ] Sheet tab color or separator between sheets? |
| 40 | + |
| 41 | +### 5. Page Setup |
| 42 | +- [ ] Read Excel print-area / page-break settings? |
| 43 | +- [ ] Landscape vs. portrait auto-detection from Excel page setup? |
| 44 | +- [ ] Headers / footers (page numbers, sheet name, date)? |
| 45 | +- [ ] Configurable paper sizes beyond Letter / A4? |
| 46 | + |
| 47 | +### 6. Input / Output Contracts |
| 48 | +- [ ] Accept `ReadOnlyMemory<byte>` or `ReadOnlySpan<byte>` for zero-copy scenarios? |
| 49 | +- [ ] Async `ConvertAsync` overloads? |
| 50 | +- [ ] Progress callback for large files? |
| 51 | + |
| 52 | +### 7. .NET Security and Compliance |
| 53 | +- [ ] Follow .NET security policy (referenced in `AGENTS.md`) |
| 54 | +- [ ] XML parsing hardened against XXE (already using default `XDocument.Load`) |
| 55 | +- [ ] Validate ZIP entries to prevent zip-bomb or path-traversal attacks |
| 56 | + |
| 57 | +## Acceptance Criteria |
| 58 | + |
| 59 | +- [ ] Document the supported feature matrix in the README |
| 60 | +- [ ] Update `MiniPdf.csproj` `TargetFramework(s)` if multi-targeting is agreed |
| 61 | +- [ ] Create follow-up issues for each approved feature area |
| 62 | +- [ ] Add a `ROADMAP.md` or GitHub milestone to track incremental delivery |
0 commit comments