I am using PDFNET sdk.
I did not find a solution or a way to replacement a word in the pdf page. I tried so many ways by taking help of
elementbuilder and element edit examples
Please help me in text replacement the below is my function
Simple plain text replacement.
private void ReplaceSelectedWord()
PDFDoc doc = new PDFDoc(input_path);
Page page = doc.GetPage(40);
Element element = null;
ElementReader reader = new ElementReader();
ElementWriter writer = new ElementWriter();
ElementBuilder builder = new ElementBuilder();
Rect word_bbox = new Rect();
while ((element = reader.Next()) != null)
if (element.GetType() == Element.Type.e_text)
strWord = element.GetTextString();
// now compare the text withthe given word
if ((String.Compare(strWord, “Apple”, StringComparison.OrdinalIgnoreCase) == 0))
// string data = “Apply”;
ByteData = encoding.GetBytes(“Apply”);
// please help me to fill the gap so that it replaces apple with APPLY
doc.Save(output_path + “Test1.pdf”, SDFDoc.SaveOptions.e_remove_unused);
Confidentiality Notice: This transmittal is a confidential communication. If you are not the intended recipient, you are hereby notified that you have received this transmittal in error and that any review, dissemination, distribution or copying of this transmittal is strictly prohibited. If you have received this communication in error, please notify this office immediately by reply and immediately delete this message and all of its attachments, if any.