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

Free Support Forum - aspose.com

Enlarged file after replacement

When I replace text in a pdf file as result I get enlarged file. I noticed it happens in case replacement value contains symbols which are not presented in the original file.

Java version: 11
Aspose pdf version: 21.8

Code sample:

Document pdfDocument = new Document("test.pdf");
TextFragmentAbsorber absorber = new TextFragmentAbsorber("document");
TextFragmentCollection collection = absorber.getTextFragments();
AtomicInteger i = new AtomicInteger(0);
collection.forEach(fragment -> {

test.pdf (35.7 KB)


A ticket with ID PDFJAVA-41000 has been created in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.