RussJudge.SimpleWPFReportPrinter 1.0.0

dotnet add package RussJudge.SimpleWPFReportPrinter --version 1.0.0                
NuGet\Install-Package RussJudge.SimpleWPFReportPrinter -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RussJudge.SimpleWPFReportPrinter" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RussJudge.SimpleWPFReportPrinter --version 1.0.0                
#r "nuget: RussJudge.SimpleWPFReportPrinter, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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