Introduction
Tagua is a reporting engine for .NET. You describe a document in a template, written in YAML or JSON; your application supplies the data; Tagua produces a PDF. Invoices, statements, letters, lists grouped with totals, dashboards with charts: the kind of documents that report writers such as Crystal Reports, SSRS and JasperReports make, as text files you can review and version.
What sets it apart is what the PDFs are:
- Accessible. Every document is tagged, so screen readers can follow its headings, paragraphs, tables and figures in the right order. With PDF/UA, Tagua checks the template for what the standard requires, such as alternative text for images and a document language, before any data is read.
- Archival. PDF/A documents embed their fonts, colour profile and metadata, so they display the same in decades. PDF/A-3 and PDF/A-4f carry attachments.
- Ready for e-invoicing. A Factur-X or ZUGFeRD invoice is a PDF/A-3 document that people read and that accounting systems process through the XML inside it.
How it works
Section titled “How it works”- Load a template. Unknown properties are errors, so typos surface at once.
- Compile it: Tagua validates the layout and the compliance rules, and type-checks every expression in the scope it will run in.
- Fill it with your data: rows from memory or any database reader. Rows are filtered, sorted and grouped, and totals are computed.
- Lay out the pages: text measured with real font metrics, tables split across pages with their headers repeated, page headers and footers with “page n of m”.
- Render the PDF, with subset fonts, the structure tree, and the metadata your compliance profiles need.
A template never holds SQL or code. Expressions are a small, sandboxed language, so templates can come from people you do not fully trust, and the engine needs no reflection: it runs under native AOT.
Packages
Section titled “Packages”| Package | What it is |
|---|---|
Tagua |
The engine: templates, data, layout and PDF. |
Tagua.Shaping.HarfBuzz |
Shaping for Arabic, Indic and other scripts whose letters join or reorder. |
Tagua.Import |
Converts RDLC and RDL reports (SSRS, ReportViewer) to Tagua templates. |
Tagua.Cli |
The tagua command: render and preview templates, import RDLC reports, print the JSON Schema. |
Tagua is at an early stage (0.x): it is complete and tested, but the template format and the APIs may still change.
- Install it, then write your first report.
- Preview templates as you edit them with the
taguacommand. - Look up any property in the template reference, and every element in Elements.