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

Free Support Forum - aspose.com

Text overlapping after replacement

Java version: 11
Aspose PDF Version: 21.8

        Document doc = new Document("D:/test_overlapping.pdf");
        TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber();
        textFragmentAbsorber.setTextReplaceOptions(new TextReplaceOptions(WholeWordsHyphenation, TextReplaceOptions.Scope.REPLACE_FIRST));
        TextFragmentCollection textFragments = textFragmentAbsorber.getTextFragments();
        textFragments.get_Item(1).setText("requirements and responsibilities");

test_overlapping.pdf (101.4 KB)
test_overlapping_result.pdf (102.3 KB)


We were able to reproduce the issue in our environment while using Aspose.PDF for Java 21.9. Therefore, we have logged it as PDFJAVA-40898 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFJAVA-40898) have been fixed in Aspose.PDF for Java 21.12.