I have problem with using yours library in this simple code
import com.aspose.pdf.kit.*;
public class M238pdfCompress {
public static void main(String[] args) throws Exception
PdfContentEditor pdfContent = new PdfContentEditor();
try{
pdfContent.bindPdf("c:\\rtf.pdf");
pdfContent.replaceText("a","b");
pdfContent.save("c:\\kk.PDF");
}catch(Exception ex){
ex.printStackTrace();
}
}
}
I have this message at console:
java.lang.NullPointerException
at com.aspose.pdf.kit.f4.a(Unknown Source)
at com.aspose.pdf.kit.PdfContentEditor.replaceText(Unknown Source)
at M238pdfCompress.main(M238pdfCompress.java:28)
But this code works correct
import com.aspose.pdf.kit.*;
public class M238pdfCompress {
public static void main(String[] args) throws Exception {
PdfContentEditor pdfContent = new PdfContentEditor();
try{
pdfContent.bindPdf("c:\\rtf.pdf");
pdfContent.createBookmarks();
pdfContent.save("c:\\kk.PDF");
}catch(Exception ex){
ex.printStackTrace();
}