PDF replace existing text with new text and new lines

I want to replace an existing text in the PDF with a new text which contains new lines, in my string I use “\r\n” for the new lines, see code below.

  • However, when Saving the PDF the new lines are Not saved!

Here is my code:

                foreach (Aspose.Pdf.Text.TextFragment tf in TextFragmentAbsorberAddress.TextFragments)
                {
                    tf.Text = newText;
                }
                pdf.Save(fileName);

I have found the following documentation but I am unsure how or IF I need to apply this also for the replace text:
image.png (88,1 KB)

@PatrickITech

These options are considered during the PDF generation. In case you are replacing the text in an existing PDF, we need sample PDF file for our reference so that we can test the scenario in our environment and address it accordingly.

@asad.ali

I tried to change “EUR” to “EUR\r\nUSD” and “Fatura” to “Invoice\r\nPatrick” but as mentioned the new lines are not inserted, see screenshot below (not for public)
image.png (102,5 KB)

Attached find the PDF (not for public):
ARV2022000000489.pdf (231,0 KB)

@PatrickITech

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-56065

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.