I am using Aspose-pdf (19.12) licensed version. When I replace a content in a pdf file, its getting overlapped.
Implemented code:
// Initialize License Instance
com.aspose.pdf.License license = new com.aspose.pdf.License();
// Call setLicense method to set license
license.setLicense(ReplaceTextAspose.class.getResourceAsStream("/Aspose.Total.Java.lic"));
final FileInputStream fis = new FileInputStream(filePath);
Document pdfDocument = new Document(fis);
textFragmentAbsorber = new TextFragmentAbsorber(“Test”, new TextSearchOptions(true));
pdfDocument.getPages().accept(textFragmentAbsorber);
// Get the extracted text fragments into collection
TextFragmentCollection textFragmentCollection = textFragmentAbsorber.getTextFragments();
pdfDocument.getPages().accept(textFragmentAbsorber);
// Get the extracted text fragments into collection
for (TextFragment textFragment : (Iterable) textFragmentCollection) {
//Update text and other properties
textFragment.setText(“Tested”);
}
We have managed to replicate the issue in our environment while using Aspose.PDF for Java 20.2. We have logged it as PDFJAVA-39220 in our issue tracking system for further investigation and will keep you posted with its rectification status. Please be patient and spare us little time.
We are afraid that earlier-logged ticket is not yet resolved. As it was logged under normal support, it will be resolved on first come first serve basis. We have recorded your concerns and will surely consider them during issue analysis. We will inform you as soon as we have some updates about it resolution. Please have patience and give us some time.