Font issue with ContentReplacer addString

Product: PDFNetJava

Product Version: 9.2.0

Please give a brief summary of your issue:
Font issue with ContentReplacer addString

Please describe your issue and provide steps to reproduce it:
I am trying out PDFNetJava to evaluate if it will work for a text replacement issue we need to solve. I’m replacing some text using ContextReplacer addString method. That is all working fine. The issue is that we need the replaced text to be the same font and size as what was there before. Is this possible? if so, how do I do that? If we can’t, the library isn’t going to work for us.

Please provide a link to a minimal sample where the issue is reproducible:

To investigate further could you please provide the following information.

  1. Input file(s)

  2. Generated output file(s)

  3. Code and settings used to generate (2) from (1)

  4. Screenshots showing the output, and clearly indicating what you expected to get instead, and also clearly indicating the application/browser being used to view.