From 8378f9ed35fbebb3940267f49bba6e9d88cfb8de Mon Sep 17 00:00:00 2001 From: Dawid Nowak Date: Wed, 28 Oct 2026 12:47:31 +0100 Subject: [PATCH] Fix the page slots example and the SVG link on the colors page The main slots example wrapped document.Page in an extra .Page(...) and did not compile. The colors page linked to an SVG section that no longer exists; it now points to the SVG limitations, where the color order is described. --- docs/api-reference/page/slots.md | 49 +++++++++++++++----------------- docs/concepts/colors.md | 2 +- 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/docs/api-reference/page/slots.md b/docs/api-reference/page/slots.md index 7f81dd3..2a1dae2 100644 --- a/docs/api-reference/page/slots.md +++ b/docs/api-reference/page/slots.md @@ -15,34 +15,31 @@ The main slots are Header, Content, and Footer. ```csharp -.Page(page => +document.Page(page => { - document.Page(page => - { - page.Size(PageSizes.A4); - page.Margin(2, Unit.Centimetre); - page.DefaultTextStyle(x => x.FontSize(24)); + page.Size(PageSizes.A4); + page.Margin(2, Unit.Centimetre); + page.DefaultTextStyle(x => x.FontSize(24)); + + page.Header() + .Background(Colors.Grey.Lighten1) + .Height(125) + .AlignCenter() + .AlignMiddle() + .Text("Header"); - page.Header() - .Background(Colors.Grey.Lighten1) - .Height(125) - .AlignCenter() - .AlignMiddle() - .Text("Header"); - - page.Content() - .Background(Colors.Grey.Lighten2) - .AlignCenter() - .AlignMiddle() - .Text("Content"); - - page.Footer() - .Background(Colors.Grey.Lighten1) - .Height(75) - .AlignCenter() - .AlignMiddle() - .Text("Footer"); - }); + page.Content() + .Background(Colors.Grey.Lighten2) + .AlignCenter() + .AlignMiddle() + .Text("Content"); + + page.Footer() + .Background(Colors.Grey.Lighten1) + .Height(75) + .AlignCenter() + .AlignMiddle() + .Text("Footer"); }); ``` diff --git a/docs/concepts/colors.md b/docs/concepts/colors.md index 6d5de0e..78bd0d7 100644 --- a/docs/concepts/colors.md +++ b/docs/concepts/colors.md @@ -54,7 +54,7 @@ You can also omit the hash sign (`#`) at the beginning of the color code. ::: warning -Please be aware that in some software the alpha channel is specified at the end of the color code, e.g. `#RRGGBBAA`. This includes the SVG renderer used by QuestPDF: in SVG markup, use `fill-opacity` instead (see [SVG Support](/api-reference/image/svg#transparent-colors)). +Please be aware that in some software the alpha channel is specified at the end of the color code, e.g. `#RRGGBBAA`. This includes the SVG renderer used by QuestPDF: in SVG markup, use `fill-opacity` instead (see [SVG Support](/api-reference/image/svg#limitations)). ::: ## Examples