How to add a text on page #2 only?

Hello.

I have an existing pdf with 5 pages inside.
How I can insert text: “Hello” on page #2 with coordinates (x,y)

And save to pdf again.

Thanks

Try this:

using (var document = new PdfDocument())
{
    var secondPage = document.Pages[1];
    using (var formattedText = new PdfFormattedText())
    {
        formattedText.AppendLine("Hello");

        // NOTE: In PDF, location (0, 0) is at the bottom-left corner of the page
        // and the positive y-axis extends vertically upward.
        double x = 200, y = 200;

        secondPage.Content.DrawText(formattedText, new PdfPoint(x, y));
    }
}

Also, please check the Writing example:

I hope this helps, let me know if you need anything else.

Regards,
Mario

Thanks. It works! Have a nice day