Hello,
I am sorry to say but the replaceText method of this API is a complete failure. I wrote the same syntax as you in version 2.0 as well as 2.1 which is the latest release with all hot fixes. i.e.
PdfContentEditor pdfContent = new PdfContentEditor();
try{
pdfContent.bindPdf("c:\\Curves.pdf");
pdfContent.replaceText("curve", "ZZZZZZZZ");
pdfContent.save("c:\\ReplacedCurves.pdf");
}catch(Exception ex){
ex.printStackTrace();
}
But now i am getting the execption below :
java.lang.NullPointerException
at com.aspose.pdf.kit.f4.a(Unknown Source)
at com.aspose.pdf.kit.PdfContentEditor.replaceText(Unknown Source)
at Test.main(
Test.java:56)
Thanks & Regards
Anand