Improved PDF Exporter for FastReport Open Source using PDFSharp-GDI as the rendering engine.
This project aims to improve PDF generation quality and reduce output file size compared to the default PDF exporter shipped with the FastReport Open Source edition.
Note: This project is not intended to replace FastReport's commercial offerings. If you need advanced or enterprise-grade features, consider the official commercial products.
- Higher-quality PDF rendering compared to the default FastReport Open Source exporter
- Typically smaller PDF output files
- Rendering based on PDFSharp-GDI (GDI-based font resolver)
- .NET 8 or later
- Windows OS (see Platform Support)
- FastReport Open Source (compatible versions: >=2026.1.4)
Install via NuGet Package Manager:
dotnet add package MarcoBellini.FastReport.PDFExporterusing MarcoBellini.FastReport.PDFExporter;
void ExportReport()
{
using var report = new Report();
using var pdfExport = new PDFExport();
report.Load("Reports/MyReport.frx");
report.Prepare();
var outputPath = Path.Combine(Path.GetTempPath(), "Report.pdf");
report.Export(pdfExport, outputPath);
}using MarcoBellini.FastReport.PDFExporter;
byte[] ExportReportToBytes()
{
using var report = new Report();
using var pdfExport = new PDFExport();
using var stream = new MemoryStream();
report.Load("Reports/MyReport.frx");
report.Prepare();
report.Export(pdfExport, stream);
return stream.ToArray();
}using MarcoBellini.FastReport.PDFExporter;
void ExportReportWithData(IEnumerable<MyRecord> data)
{
using var report = new Report();
using var pdfExport = new PDFExport();
report.Load("Reports/MyReport.frx");
report.RegisterData(data, "MyDataSource");
report.Prepare();
var outputPath = Path.Combine(Path.GetTempPath(), "Report.pdf");
report.Export(pdfExport, outputPath);
}This exporter is Windows-only due to the following dependencies:
- FastReport Open Source relies on
System.Drawing.Common, which Microsoft has restricted to Windows starting with .NET 6 (see docs) - PDFSharp-GDI uses GDI for font resolving and rendering
It can be used in:
- Windows desktop applications (WinForms, WPF, console)
- ASP.NET Core, as long as it runs on a Windows host
The following brush types are not compatible with PDFSharp and will not render correctly:
PathGradientBrushHatchBrushTextureBrush
Why? PDFSharp does not have a direct equivalent for these GDI+ brush types, so they cannot be translated into PDF drawing instructions.
- Pens with different start and end caps are not supported
LineCap.Triangleis not supported
Contributions, bug reports, and feature requests are welcome! Feel free to open an issue or submit a pull request.
Please make sure to:
- Describe the problem or improvement clearly
- Include a minimal reproducible example if reporting a bug
- Follow the existing code style
This project is licensed under the MIT License. See the LICENSE file for details.