Kandra.Printing
Kandra.Printing.CsvPrintRenderTarget
CSV renders only the table part — every flow/fixed-section member is a no-op.
Kandra.Printing.ICsvPrintRenderTarget
Marker for the CSV render target, implemented by CsvPrintRenderTarget and resolved via DI (transient - each render needs its own unshared accumulator instance) rather than constructed directly, so IPrintRendererResolver can hand a fresh instance to a generated renderer.
Kandra.Printing.IExcelPrintRenderTarget
Marker for the Excel (xlsx) render target - declared for ExportFormat.Excel, no implementation or DI registration exists yet. Resolving one throws PrintRendererNotFoundException until an IExcelPrintRenderTarget implementation is registered.
Kandra.Printing.IHtmlPrintRenderTarget
Marker for the HTML render target - declared for ExportFormat.Html, no implementation or DI registration exists yet. Resolving one throws PrintRendererNotFoundException until an IHtmlPrintRenderTarget implementation is registered.
Kandra.Printing.IPdfPrintRenderTarget
Marker for the PDF render target, implemented by PdfPrintRenderTarget and resolved via DI (transient - each render needs its own unshared accumulator instance) rather than constructed directly, so IPrintRendererResolver can hand a fresh instance to a generated renderer.
Kandra.Printing.IPrintRenderTarget
One narrow primitive surface per target format (architecture doc §2.10.3): begin page, flow section, fixed rectangle, table band with pagination, totals. Generated renderers (Kandra.Generators.Printing) call these in declared layout order — no format-specific logic lives outside the two implementations (PdfPrintRenderTarget/CsvPrintRenderTarget). Each format has its own marker interface (ICsvPrintRenderTarget, IPdfPrintRenderTarget, ...) so a renderer depends on "give me a CSV target" rather than a concrete class - implementations are DI-resolved (transient) by IPrintRendererResolver, not constructed inline.
Methods
| Method | Description |
|---|---|
BeginFlowSection(String, Int32, PrintStyleOptions, Int32, Int32, Int32) | undocumented |
Kandra.Printing.IPrintRendererResolver
Generic proxy over IServiceProvider for resolving a keyed IPrintRenderer<TPrintForm,TTarget> - the printing-runtime equivalent of ISubmitScope.GetWriter<TWriter>(). "tag" defaults to "default", the key every generator-emitted renderer registers under; pass a different tag to pick a hand-registered alternate (e.g. ReportExportRequest.LayoutTag).
Kandra.Printing.IPrintRenderer<T0, T1>
Generated per ([PrintForm] class, render target) pair by Kandra.Generators.Printing's PrintRendererGenerator, registered under the "default" DI key (see IPrintRendererResolver). Hand-registered alternates (e.g. an alternate layout) can be added under a different key for the same closed pair. target is DI-resolved and passed in by IPrintRendererResolver rather than constructed here - the renderer itself is a singleton, so it must never hold target state itself.
Kandra.Printing.IPrintWatermarkProvider
A small seam letting a consuming application (e.g. the licensing subsystem in Kandra.Application) control whether generated PDFs carry a footer, without Kandra.Printing knowing anything about licensing. Kandra.Application.Abstractions already references Kandra.Printing, so the dependency can't flow the other way - this interface is defined here instead, with a no-op default registered by AddKandraPrinting, and the real, license-aware implementation registered afterward by Kandra.Application.ConfigureServices.AddKandraApplication.
Methods
| Method | Description |
|---|---|
GetFooterText | The footer text to draw on every page of a generated PDF, or null for none. |
Kandra.Printing.IWordPrintRenderTarget
Marker for the Word (docx) render target - declared for ExportFormat.Word, no implementation or DI registration exists yet. Resolving one throws PrintRendererNotFoundException until an IWordPrintRenderTarget implementation is registered.
Kandra.Printing.IXmlPrintRenderTarget
Marker for the XML render target - declared for ExportFormat.Xml, no implementation or DI registration exists yet. Resolving one throws PrintRendererNotFoundException until an IXmlPrintRenderTarget implementation is registered.
Kandra.Printing.NoOpPrintWatermarkProvider
Default no-op provider - no footer, so Kandra.Printing works standalone without any licensing subsystem installed.
Kandra.Printing.PdfPrintRenderTarget
Renders a [PrintForm] to a multi-page PDF: page setup from [Page], flow/fixed sections as label/value grids, and the table with repeating headers and an optional bold totals row.
Constructors
| Constructor | Description |
|---|---|
PdfPrintRenderTarget(IPrintWatermarkProvider) | Renders a [PrintForm] to a multi-page PDF: page setup from [Page], flow/fixed sections as label/value grids, and the table with repeating headers and an optional bold totals row. |
Methods
| Method | Description |
|---|---|
DrawFooterOnEveryPage(String) | Demo-mode footer (point 7 of the licensing implementation directives) - drawn last, after all real content, so it always lands on top and covers every page regardless of how many the document ended up with. |
Kandra.Printing.PrintFonts
Embeds a Cyrillic-capable font for PDF rendering (Ukraine locale target).
Kandra.Printing.PrintRenderOutput
Raw rendered bytes + content type + file extension - the renderer never knows or cares about a filename; assigning one (if any) is entirely the caller's responsibility.
Constructors
| Constructor | Description |
|---|---|
PrintRenderOutput(Byte[], String, String) | Raw rendered bytes + content type + file extension - the renderer never knows or cares about a filename; assigning one (if any) is entirely the caller's responsibility. |
Kandra.Printing.PrintStyleOptions
Runtime mirror of a named [PrintStyle] declaration, resolved once per section/column.
Constructors
| Constructor | Description |
|---|---|
PrintStyleOptions(TextAlign, Int32, Boolean, Boolean, String, String, PrintBorders) | Runtime mirror of a named [PrintStyle] declaration, resolved once per section/column. |
Kandra.Printing.PrintTotalsSpec
Marks a table column as participating in the totals footer row; Aggregate is informational (the generated renderer computes the actual value — this record just tells the render target the column needs a footer cell reserved).
Constructors
| Constructor | Description |
|---|---|
PrintTotalsSpec(Aggregate) | Marks a table column as participating in the totals footer row; Aggregate is informational (the generated renderer computes the actual value — this record just tells the render target the column needs a footer cell reserved). |
Kandra.Printing.PrintValueFormatter
Shared runtime formatting used by every generated IPrintRenderer — keeps the emitted code to plain property reads plus a call here, instead of duplicating format/caption logic per generated class.
Methods
| Method | Description |
|---|---|
Caption(String, Boolean, IStringLocalizer) | Resource-key-by-default caption resolution (§2.1.4.2): isLiteral ? value : localizer[value]. |
Format(Object, String, IStringLocalizer, TimeZoneInfo) | Formats a field/column value for print output. Handles structural special-cases beyond plain ToString()/IFormattable: a collection of CodeNameRef (id/code/name enrichment, e.g. resolved warehouse/item filters) renders as a joined CodeNameRef.DisplayText ("Code - Name") list; a bool paired with a "TrueKey|FalseKey"-shaped [Format] renders as the matching localized text (e.g. "Expense|Receipt"), and a bare bool with no such [Format] still renders via the shared Common_Yes/ Common_No keys rather than the literal "True"/"False"; an enum renders via its own [EnumCaption] (the same resolution every other enum-value display in this codebase uses), falling back to its raw member name only when the enum member carries no [EnumCaption]. |