import: specs for the PDF, XLSX, and chart parsers; chart header on the first non-blank row
check / check (push) Canceled after 0s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-10-13 21:03:03 -06:00
1 parent e52b88433c
commit 38a24c7609
3 files changed
+44 -1

No files matched your search

+13
View File
@@ -98,6 +98,19 @@ fn typeset(st: &Statement, meta: &ReportMeta) -> Result<PagedDocument, PdfError>
}
/// Render a laid-out statement (see [`crate::report`]) as a PDF.
///
/// ```text
/// GOAL: a statement a CPA can print and file.
/// SOURCE: CONVENTION (layout); docs/spec/sources/irs-records.md (records
/// "capable of being processed", reproducible).
/// INVARIANTS:
/// 1. Deterministic: the same statement and metadata render to the same
/// bytes.
/// 2. Every label is data, never markup: a name holding Typst syntax
/// ("#panic()", "*", "$", "[") prints as text and NEVER runs.
/// 3. Every row reaches the page: template_data carries each row's label,
/// kind, and amounts split by amount_parts, in order.
/// ```
pub fn statement_pdf(st: &Statement, meta: &ReportMeta) -> Result<Vec<u8>, PdfError> {
let doc = typeset(st, meta)?;
typst_pdf::pdf(&doc, &typst_pdf::PdfOptions::default())