Fixed formatting page numbers

This commit is contained in:
MarcinZiabek
2022-09-15 22:12:06 +02:00
parent 556f87ff25
commit 6b535752df
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ namespace QuestPDF.Elements.Text
{
foreach (var textBlockItem in textBlockItems)
{
if (textBlockItem is TextBlockSpan textBlockSpan)
if (textBlockItem is TextBlockSpan textBlockSpan and not TextBlockPageNumber)
{
// perform font-fallback operation only when any fallback is available
if (textBlockSpan.Style.Fallback == null)
+1
View File
@@ -36,6 +36,7 @@ namespace QuestPDF.Fluent
internal TextPageNumberDescriptor(Action<TextStyle> assignTextStyle, Action<PageNumberFormatter> assignFormatFunction) : base(assignTextStyle)
{
AssignFormatFunction = assignFormatFunction;
AssignFormatFunction(x => x?.ToString());
}
public TextPageNumberDescriptor Format(PageNumberFormatter formatter)