Null Pointer exception in Aspose.PDF

Hi,

I am getting below exception

java.lang.NullPointerException: Cannot invoke "com.aspose.pdf.internal.l21p.l19v.l0l()" because "<parameter1>" is null
        at com.aspose.pdf.internal.l6n.lI.lI(Unknown Source)
        at com.aspose.pdf.internal.l6n.lI.lI(Unknown Source)
        at com.aspose.pdf.internal.l6n.lI.lI(Unknown Source)
        at com.aspose.pdf.l19f.lI(Unknown Source)
        at com.aspose.pdf.TextFragment.lb(Unknown Source)
        at com.aspose.pdf.TextFragment.setText(Unknown Source)
        at com.aspose.pdf.facades.PdfContentEditor.replaceText(Unknown Source)
        at com.aspose.pdf.facades.PdfContentEditor.replaceText(Unknown Source)
        at com.aspose.pdf.facades.PdfContentEditor.replaceText(Unknown Source)

Cod e-

try(PdfContentEditor editor = new PdfContentEditor()) {				
	//Creating object of ReplaceTextStrategy class, to set the text replacement condition
	ReplaceTextStrategy replaceTextStrategy = new ReplaceTextStrategy();
	
	//Enable and disable pattern searching
	if(searchPattern) {				
		replaceTextStrategy.setRegularExpressionUsed(true);
	}
	
	//Adding parameter to replace all occurrence text
	replaceTextStrategy.setReplaceScope(ReplaceTextStrategy.Scope.ReplaceAll);	        
	editor.setReplaceTextStrategy(replaceTextStrategy);
	
	//loading pdf document in PdfContentEditor class
	editor.bindPdf(pdfDocument);				
	
	//Calling method to mask the text
	editor.replaceText(textValue, Type);					
}

@rchilli Your question is related to Aspose.PDF. I will move your topic into the appropriate forum. My colleagues from Aspose.PDF team will help you shortly.
Meanwhile, please attach your problematic input document for testing.

Below is the document -

Sample.zip (845.3 KB)

Getting error while replacing email from the document

@rchilli
What version of the library are you using?

com.aspose aspose-pdf 24.2

@rchilli
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-44050

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

In general, if you can confirm if the issue is from Resume Side?

@rchilli
Unfortunately, I can’t say.
As soon as I have information on this issue, I will write to you.