Hi WindChaser,
After further analyzing your request, we understand that you want to replace text without altering the font characteristics or the background rectangle. While we don't have direct support for this, we have developed a simple workaround with the following steps:
1. Load the document.
2. Find the text and preserve all matching bounds.
3. Iterate through the pages with the matched bounds and use the extract text feature to retrieve the font details.
4. Perform redaction over the matched bounds using the text-only API.
5. Draw the string with the extracted font details over the redacted area.
6. Save the final PDF document.
Please try this on your end and let us know the outcome.
Please follow the below links for more information:
Regards,
Irfana J