I need to replace some text from an existing pdf. I tried the following code but its replacing the first occurence only. My requirement is to replace all "testing data" to "test".
In order to replace all the occurrences of the text, you need to use setReplaceTextStrategy method. Please set the Scop value to REPLACE_ALL. Also, please make sure that you’re using the latest version at your end.
I hope this helps. If you find any further questions, please do let us know.
Regards,
Thanks it worked. Its replacing the strings. But the file created after replacing the charcters is having a size more than double size of the actual file. I tested for a file of 112 KB and after replacement its coming a size of 235KB.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.