Using below code I tried to replace typically hindi word to another word. But there was no change in pdf. How to replace another language word to any specific word using aspose
I have attached sample pdf that used for this code
HindiPDf.pdf (43.1 KB)
var inputfile = @"D:\HindiPDf.pdf";
// Open document
Document doc = new Document(inputfile);
// Create TextFragmentAbsorber object to find all "hello world" text occurrences
string rectString = "साहित्य";
TextFragmentAbsorber absorber = new TextFragmentAbsorber(rectString);
doc.Pages[1].Accept(absorber);
// Change text and font of the first text occurrence
absorber.TextFragments[1].Text = "redact";
// Save document
doc.Save(Path.Combine(Path.GetDirectoryName(inputfile) + Path.GetFileNameWithoutExtension(inputfile) + "Redacted" + Path.GetExtension(inputfile)));