项目

QuestPDF 装饰

  • 该容器包含以下三个区域:BeforeContentAfter
  • Before 区域始终位于内容之上。当该元素在多页中可见时,每个页面上都会重复显示 Before 区域。
  • Content 区域仅显示一次。它通常与跨越多页的内容一起使用。
  • After 区域始终位于内容之下。当该元素在多页中可见时,每个页面上都会重复显示 After 区域。
.Decoration(decoration =>
{
    decoration
        .Before()
        .Background(Colors.Grey.Medium)
        .Padding(10)
        .Text("Notes")
        .FontSize(16).FontColor("#FFF");

    decoration
        .Content()
        .Background(Colors.Grey.Lighten3)
        .Padding(10)
        .ExtendVertical()
        .Text(Helpers.Placeholders.LoremIpsum());
});

在本文档中