diff --git a/QuestPDF/Fluent/TextExtensions.cs b/QuestPDF/Fluent/TextExtensions.cs index 9b7de06..b808eb5 100644 --- a/QuestPDF/Fluent/TextExtensions.cs +++ b/QuestPDF/Fluent/TextExtensions.cs @@ -174,7 +174,7 @@ namespace QuestPDF.Fluent public TextPageNumberDescriptor PageNumberWithinSection(string locationName) { - return PageNumber(x => x.CurrentPage + 1 - x.GetLocation(locationName)?.PageEnd); + return PageNumber(x => x.CurrentPage + 1 - x.GetLocation(locationName)?.PageStart); } public TextPageNumberDescriptor TotalPagesWithinSection(string locationName)