ReportProPDF 2025.1.2

dotnet add package ReportProPDF --version 2025.1.2
                    
NuGet\Install-Package ReportProPDF -Version 2025.1.2
                    
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="ReportProPDF" Version="2025.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ReportProPDF" Version="2025.1.2" />
                    
Directory.Packages.props
<PackageReference Include="ReportProPDF" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ReportProPDF --version 2025.1.2
                    
#r "nuget: ReportProPDF, 2025.1.2"
                    
#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.
#:package ReportProPDF@2025.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ReportProPDF&version=2025.1.2
                    
Install as a Cake Addin
#tool nuget:?package=ReportProPDF&version=2025.1.2
                    
Install as a Cake Tool

ReportProPDF

ReportProPDF is a lightweight and powerful .NET plugin that allows you to easily generate professional PDF reports based on structured data and Razor-compatible templates.


? Features

  • Generate PDF reports with titles, logos, and structured data
  • Custom column headers and sizes
  • Automatic "Printed By" and "Total" labels
  • Easily embeddable in any .NET project
  • Fast, memory-efficient, and production-ready

?? Installation

Install the latest version via NuGet:

dotnet add package ReportProPDF --version 2025.x.x

?? How to Use
? Step 1: Add the NuGet Package

dotnet add package ReportProPDF

? Step 2: Register the Service in Program.cs
builder.Services.AddReportProPDF();

? Step 3: Inject the Service in Your Controller

private readonly IReportProPDF _reportService;

public ReportsController(IReportProPDF reportService)
{
    _reportService = reportService;
}

? Step 4: Generate the Report in Your Action Method

var model = new ReportProPDFModel
{
    Title1 = "",                            // Optional: Main header (can be empty)
    Title2 = "",                            // Optional: Sub-header
    Title3 = "",                            // Optional: Extra line under title
    ReportName = "Employee Report",         // The report name shown on top
    LogoPath = "Default.jpg",               // Path to logo image (placed in wwwroot/images)
    ColumnsName = new[] { "DepartmentName", "BranchName", "EmployeeName" }, // Headers
    ColumnsSize = new[] { 4, 4, 2, 1 },     // Relative column widths (Bootstrap-style scale)
    PrintedBy = $"{userName} - {userId}",  // Display printed user info
    TotalName = $"Total: 3450",             // Summary row (optional)
    DataModel = data                        // Actual data source (List<object> or DTOs)
};

var result = await _reportService.GenerateReportPro(model);

return File(result.pdf, result.Octet, "EmployeeReport.pdf");


?? Notes

    LogoPath should point to an image inside wwwroot/images/, e.g., wwwroot/images/Default.jpg

    ColumnsSize values should match the number of columns and follow a 12-column layout system

    DataModel should be a list of objects or DTOs matching the column names

    Octet returns "application/octet-stream" for file download

    ?? Example Use Case

    var data = await _employeeService.GetReportData();

var model = new ReportProPDFModel
{
    ReportName = "Monthly Employee Report",
    LogoPath = "company-logo.png",
    ColumnsName = new[] { "Name", "Position", "Salary" },
    ColumnsSize = new[] { 5, 5, 2 },
    PrintedBy = "Admin User",
    TotalName = "Total Salary: $24,000",
    DataModel = data
};

var report = await _reportService.GenerateReportPro(model);

return File(report.pdf, report.Octet, "EmployeeReport.pdf");


? Requirements

    .NET 6.0 or later

    MVC/Web API support

    wwwroot/images/ for logo storage

    Razor-style structure for dynamic content rendering

?? Additional Features (Coming Soon)

    Custom footer text

    Page numbering

    Localization support (e.g., Arabic/English)

    Styling overrides (custom fonts and colors)


?? License

    This project is licensed under the MIT License.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2025.1.2 110 7/17/2025
2025.1.1 163 3/26/2025