Hello,
This message was posted using Page2Forum from Highlighting Text with replaceText Method - Aspose.Pdf.Kit for Java
Hello,
Hi Eric,
Thank you very much for considering Aspose.
Could you please make sure that you’re using the latest version of Aspose.Pdf.Kit for Java? If you still find the same issue then please share the input PDF file along with the particular code snippet which you’re using at your end, so we could investigate the issue over here. You’ll be updated with the results accordingly.
We’re sorry for the inconvenience.
Regards,
above issue exists with me. i am using the lates jar
Hi Shibu,
Hi,
I am currently evaluating Aspose. I have succeded in converting word document to pdf using aspose. Now i want to highlight certain words(case insensitive) in the obtained pdf . For that i am using the following code.
PdfContentEditor contentEditor = new PdfContentEditor();
contentEditor.bindPdf(“D:/Document.Doc2PdfSave2.pdf”);
contentEditor.getReplaceTextStrategy().setScope(Scope.REPLACE_ALL);
TextProperties textProperties = new TextProperties();
textProperties.setColor(Color.blue);
textProperties.setBackgroundColor(Color.red);
contentEditor.getReplaceTextStrategy().setScope(Scope.REPLACE_ALL);
contentEditor.replaceText(“development”, “development”, textProperties);
contentEditor.replaceText(“and”, “and”, textProperties);
contentEditor.save(“D:/Document.Doc2PdfSave22.pdf”);
contentEditor.close();
My highlighted pdf is attached.Background color is not appearing properly behind the word “and”
and text development is not properly replaced in document. Please give me solution.
Regards,
Shibu
Hi Shibu,