Thanks for sharing the resource file.
I have tested the scenario using latest release of Aspose.Pdf for Java 9.1.0 where I have used the following code snippet based on new Document Object Model (DOM) of com.aspose.pdf package and I am unable to notice any problem. Please note that Aspose.Pdf.Kit for Java has been discontinued as a separate product and all its classes and enumerations are merged under com.aspose.pdf.facades package of Aspose.Pdf for Java.
Therefore we recommend you to please try using the latest release of autoported mergedAPI of Aspose.Pdf for Java. Please note that DOM of com.aspose.pdf package is latest and recommended approach as compared to legacy Aspose.Pdf.Kit for Java.
for(int counter =1;
// Open document
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("c:/pdftest/Cover+Letter+in+PDF.pdf");
// Create TextAbsorber object to find
all instances of the input search phrase
= new com.aspose.pdf.TextFragmentAbsorber("CustomerID");
// Accept the absorber for first page
// Get the extracted text fragments
textFragmentCollection = textFragmentAbsorber.getTextFragments();
// Loop through the fragments
for(com.aspose.pdf.TextFragment textFragment :
// Update text and other properties
// Save the updated PDF file