We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Replace Text in PDF not fully working


I tried Aspose.PDF for .NET core, we are interested to replace text in existing PDFs.
Unfortunately I see two issues:

  • text is not replaced
  • some formatting is missing, when the replacement text is longer than the original one (we expect to keep the same format)

I created a github repository to describe the issue: https://github.com/molinch/replacePdfText
In the Documents folder you can find a PDF: “Hello.pdf”, ##732## is then searched/replaced, and that produces “Hello-Fabien.pdf”

Could you help us?
Thanks a lot


Thanks for contacting support.

You were unable to replace all text due to limitation of trial version. With trial version you can process only 4 elements of any collection of the API. In order to replace all occurrences of text, you need to apply a valid license before doing that. You may obtain a temporary license as well in order to evaluate API without any restriction.

We were able to replicate the issue in our environment and for the sake of correction we have logged it in our issue tracking system under the ticket ID PDFNET-45898. We will definitely look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

Thanks a lot for the quick feedback we will request a temporary license to test replacing all sentences.
I hope the bug can be fixed, if yes we would most likely consider the lib.


Thanks for your feedback.

We have recorded your concerns and will definitely consider them during investigation of the issue. We will let you know in case of further updates regarding issue resolution. Please spare us little time.

The issues you have found earlier (filed as PDFNET-45898) have been fixed in Aspose.PDF for .NET 19.4.