BroadPaper.Client
0.4.0
dotnet add package BroadPaper.Client --version 0.4.0
NuGet\Install-Package BroadPaper.Client -Version 0.4.0
<PackageReference Include="BroadPaper.Client" Version="0.4.0" />
<PackageVersion Include="BroadPaper.Client" Version="0.4.0" />
<PackageReference Include="BroadPaper.Client" />
paket add BroadPaper.Client --version 0.4.0
#r "nuget: BroadPaper.Client, 0.4.0"
#:package BroadPaper.Client@0.4.0
#addin nuget:?package=BroadPaper.Client&version=0.4.0
#tool nuget:?package=BroadPaper.Client&version=0.4.0
BroadPaper.Client
The .NET client for the BroadPaper render service: turn a saved report template and your data into a PDF, from C#, with no browser on the server.
BroadPaper is an embeddable report designer. Your users lay a report out in your web application; the designer hands your code a template as JSON; your application stores it. This package is how the other half happens — that same template, plus live data, rendered into a file on a schedule, in a background job, or in a controller.
Targets .NET 8 and .NET 10, because the runtime is your choice rather than ours.
Install
dotnet add package BroadPaper.Client
Register it
builder.Services.AddBroadPaper(o =>
{
o.BaseUrl = builder.Configuration["BroadPaper:BaseUrl"]!;
o.Token = builder.Configuration["BroadPaper:Token"];
});
AddBroadPaper registers the client over a named HttpClient, so whatever pooling,
logging, resilience and telemetry you have already configured applies to it too. Add your
own handlers to the returned builder, or to the client named BroadPaperClient.HttpClientName.
Render
public sealed class ReviewController(BroadPaperClient broadpaper, IReviewStore store) : ControllerBase
{
[HttpGet("clients/{id}/review.pdf")]
public async Task<IActionResult> Review(string id, CancellationToken ct)
{
var review = await store.GetAsync(id, ct);
var result = await broadpaper.RenderAsync(new RenderRequest
{
Template = JsonNode.Parse(review.TemplateJson),
Data = RenderRequest.ToNode(review.Data),
Now = review.AsAt, // fixes the clock, for reproducible output
Locale = "en-GB",
Currency = "GBP"
}, ct);
return File(result.Pdf, "application/pdf", $"review-{id}.pdf");
}
}
The template and the data are your JSON documents, so they are taken as JsonNode rather
than modelled in C#. Your schema is yours, and a strongly-typed mirror of it here would
only be a second place to keep it up to date.
There is also RenderWithWarningsAsync when you want to log what the renderer could not do
exactly as asked, RenderBatchAsync for one template against many data sets, and
GetHealthAsync.
What it talks to
This is a client, not a renderer. It calls the BroadPaper render service — a Node process that owns the PDF engine — over HTTP. That separation is the whole reason a C# application can produce these files with no browser, no JavaScript runtime and no native PDF library installed on it.
Give it an https:// address in production. The service listens with plain HTTP and
has no TLS of its own, because terminating TLS is the ingress's job; and it authenticates
with a shared bearer token, which in clear text is the credential. Run it on your own
network, and put TLS in front of it wherever a request crosses one you do not control.
Licensing
BroadPaper is free to evaluate, with no trial clock and nothing behind a feature gate. Everything works without a licence, for as long as you evaluate it. In the software, the only difference is that generated PDFs carry an evaluation mark, and a licence removes it; contractually, the licence is also what permits production use. No seats, no activation, no machine binding, no telemetry, and no call home at any point.
A licence is twelve months of unwatermarked commercial use, including every update released in those months.
Documentation
| 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 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.Http (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
-
net8.0
- Microsoft.Extensions.Http (>= 8.0.1)
- Microsoft.Extensions.Options (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.