QuestPDF icon indicating copy to clipboard operation
QuestPDF copied to clipboard

page numbers not working as expected

Open leandrobattochio opened this issue 2 years ago • 2 comments

Describe the bug When trying to write some text with CurrentPageNumber, BeginPageNumberOfSection (untested others) it seems to break all the element. The previous text is not displayed and the current page number isn't either. When using BeginPageNumberOfSection similar behaviour is verified.

To Reproduce

await Document.Create(doc =>
{
    doc.Page(page =>
    {
        page
            .Content().Text(t =>
            {
                t.Span("Here is some text:");
                //t.CurrentPageNumber(); // Uncomment this line for the bug
            });
    });
}).ShowInPreviewerAsync();

Expected behavior The current page number should be displayed, along with the previous text.

Screenshots image image

Environment What version of the library do you use? 2024.3.0-beta What operating system do you use? (OS type, x64 vs x86 vs arm64) Windows 11, x64

Additional context None

leandrobattochio avatar Mar 09 '24 15:03 leandrobattochio

Hi 😄

Thank you so much for reporting this bug. I have fixed it in the https://github.com/QuestPDF/QuestPDF/commit/2d463edc78021042edb8fbcaf1c769217347c5cc commit. It is not published yet.

MarcinZiabek avatar Mar 09 '24 18:03 MarcinZiabek

Hi 😄

Thank you so much for reporting this bug. I have fixed it in the 2d463ed commit. It is not published yet.

Nice!!! <3 Can't wait to test it.

leandrobattochio avatar Mar 09 '24 22:03 leandrobattochio