From 0f1e29af3b243185c14cf305990ebf7758b71d07 Mon Sep 17 00:00:00 2001 From: Rakulan Subramaniam Date: Fri, 2 Oct 2026 14:19:36 +0200 Subject: [PATCH] fix: correct package readme example and add installation steps The example on nuget.org called page.Background(color), which does not exist on the page descriptor and fails with CS1501. Use PageColor. Also document the installation, including the Linux native asset packages consumers need since 2.0.0. Co-Authored-By: Claude Opus 5.5 --- src/ShinyPDF/Resources/PackageReadme.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/ShinyPDF/Resources/PackageReadme.md b/src/ShinyPDF/Resources/PackageReadme.md index cdbba6452..979c03681 100644 --- a/src/ShinyPDF/Resources/PackageReadme.md +++ b/src/ShinyPDF/Resources/PackageReadme.md @@ -13,6 +13,20 @@ ShinyPDF is a modern open-source .NET library for PDF document generation. Offer 🔗 No proprietary template language. Use modern .NET features, reusable abstractions, and the tools you already trust. +## Installation + +```bash +dotnet add package ShinyPDF +``` + +On Linux, also add the native assets for SkiaSharp and HarfBuzzSharp: + +```bash +dotnet add package SkiaSharp.NativeAssets.Linux +dotnet add package HarfBuzzSharp.NativeAssets.Linux +``` + + ## Simplicity is the key How easy it is to start and prototype with ShinyPDF? Really easy thanks to its minimal API! Please analyse the code below that generates basic PDF document: @@ -29,7 +43,7 @@ Document.Create(container => { page.Size(PageSizes.A4); page.Margin(2, Unit.Centimetre); - page.Background(Colors.White); + page.PageColor(Colors.White); page.DefaultTextStyle(x => x.FontSize(20)); page.Header()