1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! Professional PDF report engine for structural engineering calculations.
//!
//! `ses-pdf` compiles a structured document model into a publication-quality PDF
//! using the [Typst](https://typst.app) typesetting engine under the hood.
//! Reports can contain:
//!
//! - Engineering equations with Typst math notation
//! - Calculation blocks (formula → substitution → numeric result)
//! - Data tables with shaded headers
//! - Line, bar, scatter, and P-M interaction charts (vector SVG)
//! - User-supplied images and SVG figures
//! - Cover page, section numbering, headers, footers, and page numbers
//! - Drawing sheets with Arch paper sizes, landscape orientation, and title blocks
//!
//! # Quick start
//!
//! ```rust,no_run
//! use ses_pdf::*;
//!
//! let pdf_bytes = Report::new(ReportMetadata {
//! project_name: "Grid B5 Beam".into(),
//! project_number: "2025-001".into(),
//! prepared_by: "SES Engineering".into(),
//! checked_by: None,
//! date: "March 14, 2025".into(),
//! paper: PaperSize::Letter,
//! orientation: Orientation::Portrait,
//! })
//! .section(
//! Section::new("Moment Capacity")
//! .text("Nominal moment capacity per ACI 318-19 Section 22.2.")
//! .equation(Equation::display("phi M_n = phi dot A_s dot f_y dot (d - a/2)"))
//! .calc(
//! CalcBlock::new("Nominal Moment Capacity")
//! .formula("M_n = A_s f_y (d - a/2)")
//! .substitution("M_n = (0.60)(60)(14.5 - 1.25)")
//! .result("M_n = 477 \"kip-in\"")
//! .build()
//! .unwrap(),
//! ),
//! )
//! .render()
//! .unwrap();
//!
//! std::fs::write("report.pdf", pdf_bytes).unwrap();
//! ```
//!
//! # Drawing sheets
//!
//! Attach a [`TitleBlock`] and choose an Arch paper size with landscape orientation
//! for structural drawing sheets. Page chrome switches to a sheet border and title
//! block footer instead of calculation-report headers.
//!
//! Supported Arch sizes: [`PaperSize::ArchA`] … [`PaperSize::ArchE`], [`PaperSize::ArchE1`].
//!
//! # Math notation
//!
//! Equations use **Typst math syntax**, not LaTeX:
//!
//! | LaTeX | Typst |
//! |-------|-------|
//! | `\phi` | `phi` |
//! | `\frac{a}{b}` | `a/b` |
//! | `\sqrt{x}` | `sqrt(x)` |
//! | `\times` | `times` |
//! | Display math `\[ ... \]` | `$ ... $` (spaces inside) |
//! | `A_{cv}` (multi-letter sub) | `A_"cv"` |
//!
//! See the [Typst math documentation](https://typst.app/docs/reference/math/) for the full reference.
pub use ;
pub use ;
pub use PdfError;
pub use ;