RussJudge.SimpleWPFReportPrinter
1.0.0
dotnet add package RussJudge.SimpleWPFReportPrinter --version 1.0.0
NuGet\Install-Package RussJudge.SimpleWPFReportPrinter -Version 1.0.0
<PackageReference Include="RussJudge.SimpleWPFReportPrinter" Version="1.0.0" />
paket add RussJudge.SimpleWPFReportPrinter --version 1.0.0
#r "nuget: RussJudge.SimpleWPFReportPrinter, 1.0.0"
// Install RussJudge.SimpleWPFReportPrinter as a Cake Addin #addin nuget:?package=RussJudge.SimpleWPFReportPrinter&version=1.0.0 // Install RussJudge.SimpleWPFReportPrinter as a Cake Tool #tool nuget:?package=RussJudge.SimpleWPFReportPrinter&version=1.0.0
Simple WPF Report Printer
This library provides a mechanism for printing a report with repeating headers through WPF from a FlowDocument.
I needed to print a simple report from my WPF application, but all my searches could only find instructions and examples that assumed a single page document with no need for headers that repeat on each page printed. I could only find one set of code that would print repeating headers, but it provided no sample application to demonstrate how to use the code, so was nearly worthless.
This library solves that problem.
In addition to providing a simplified way of generating headers and footers to a report printing through WPF, the library assumes you are printing a table and detects the column headers and prints these headers on all pages the table prints on.
How to use
An example to use this library can be found at on the project's repository page at https://github.com/russjudge/Simple-WPF-Report-Printer
Start with creating your report as a FlowDocument. Create a Table, define your columns, add RowGroups with the first containing your table headers.
Use the System.Windows.Controls.PrintDialog object to allow the user to select the printer.
Create a ReportPageDefinition, add header and footer lines.
Use PrintDocument from the PrintDialog, passing a new ReportPaginator to print the report.
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. |
-
net8.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 211 | 12/6/2023 |