DigiTS.Drp
0.3.0
dotnet add package DigiTS.Drp --version 0.3.0
NuGet\Install-Package DigiTS.Drp -Version 0.3.0
<PackageReference Include="DigiTS.Drp" Version="0.3.0" />
<PackageVersion Include="DigiTS.Drp" Version="0.3.0" />
<PackageReference Include="DigiTS.Drp" />
paket add DigiTS.Drp --version 0.3.0
#r "nuget: DigiTS.Drp, 0.3.0"
#:package DigiTS.Drp@0.3.0
#addin nuget:?package=DigiTS.Drp&version=0.3.0
#tool nuget:?package=DigiTS.Drp&version=0.3.0
DigiTS.Drp
.NET wrapper for rendering DigiTS .drp report packages directly to PDF.
This package uses the native renderer by default. It does not use HTML, WebView, Microsoft Edge, Google Chrome, or a render service for local PDF generation.
Version 0.3.0 adds embedded Unicode/Arabic text and A3/custom page sizes. It also includes native Code 128 barcode rendering for scannable invoice/report barcodes.
For Unicode text, the native renderer embeds an installed TrueType font. On Windows it automatically checks Arial, Tahoma, Segoe UI, and Calibri. On Linux it checks DejaVu Sans and Noto Sans Arabic. To select a deployment font explicitly, set DIGITS_DRP_UNICODE_FONT and optionally DIGITS_DRP_UNICODE_BOLD_FONT to absolute .ttf paths.
The page definition stored in the .drp supports A4, A3, Letter, and Custom:
{
"page": {
"size": "Custom",
"width_mm": 180,
"height_mm": 240
}
}
Recommended standalone flow
- Export a
.drpfrom Static Reports. - Your host app fetches the data it needs.
- Pass
parametersanddatasetsinto the wrapper. - The wrapper renders PDF bytes.
using DigiTS.Drp;
using System.Text.Json.Nodes;
var request = await DrpRenderRequest.FromDrpFileAsync(
"invoice.drp",
parameters: new JsonObject { ["InvoiceID"] = "INV_TFDB01_000001" },
datasets: new JsonObject
{
["Inv"] = new JsonArray
{
new JsonObject
{
["inv_InvoiceID"] = "INV_TFDB01_000001",
["CustomerName"] = "Test Customer"
}
}
});
request.DataMode = DrpDataModes.Provided;
request.RenderMode = DrpRenderModes.Local;
var renderer = new NativeDrpPdfRenderer();
var pdfBytes = await renderer.RenderPdfAsync(request);
await File.WriteAllBytesAsync("invoice.pdf", pdfBytes);
Local mode is dependency-free and writes PDF bytes directly from the .drp layout. Service mode can call a render API instead:
var renderer = new DrpServiceRenderer(endpoint: new Uri("https://your-api/api/reporting/drp/render-pdf"));
var pdfBytes = await renderer.RenderPdfAsync(request);
Pack
dotnet pack reporting/src/DigiTS.Drp/DigiTS.Drp.csproj -c Release -o artifacts/nuget
Publish
NuGet.org packages are public. For internal DigiTS usage, publish to a private NuGet feed unless the package is intended for public distribution.
$env:NUGET_API_KEY = "YOUR_NUGET_OR_FEED_API_KEY"
.\reporting\scripts\publish-digits-drp-nuget.ps1
If NuGet.org rejects DigiTS.Drp because the package ID is already taken, update <PackageId> and <Version> in reporting/src/DigiTS.Drp/DigiTS.Drp.csproj, then pack again.
| Product | Versions 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. |
-
net8.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.
Add embedded Unicode/Arabic text rendering and A3/custom DRP page dimensions.