Searching Text and Repalcing it with new Text in All the PAges of a PDF

Hi,
I am very new to PDFTRON.

We have a requirement to search & repalce all the text in the PDF. Also after replacemnet teh new text should be searchable. I am just making sure that this is possible using PDFTRON API. If possible we will approach the business to use this api.

Could anybody post me the code snippet to search, then repalce and create the pdf in a new location.

I was trying but it's replacing the first word found with blanks.

                // Open the test file
                PDFDoc doc = new PDFDoc(input_path + input_filename);
                doc.InitSecurityHandler();

                ContentReplacer replacer = new ContentReplacer();
                pdftron.PDF.Page page = doc.GetPage(1);

                Int32 page_num = 0;
                String result_str = "", ambient_string = "";
                Highlights hlts = new Highlights();
                Rect target_region = page.GetMediaBox();
                //string replacement_text = "hello hello hello hello hello hello hello hello hello hello";
                //replacer.AddText(target_region, replacement_text);

                TextSearch txt_search = new TextSearch();
                Int32 mode = (Int32)(TextSearch.SearchMode.e_whole_word | TextSearch.SearchMode.e_highlight | TextSearch.SearchMode.e_page_stop);
                String pattern = "John";

TextSearch.ResultCode code = txt_search.Run(ref page_num, ref result_str, ref ambient_string, hlts);

                        if (code == TextSearch.ResultCode.e_found)
                        {
                            hlts.Begin(doc);
                            while (hlts.HasNext())
                            {
                                pdftron.PDF.Page cur_page = doc.GetPage(hlts.GetCurrentPageNumber());
                                double[] quads = hlts.GetCurrentQuads();
                                int quad_count = quads.Length / 8;
                                for (int i = 0; i < quad_count; ++i)
                                {
                                    //assume each quad is an axis-aligned rectangle
                                    int offset = 8 * i;
                                    double x1 = Math.Min(Math.Min(Math.Min(quads[offset + 0], quads[offset + 2]), quads[offset + 4]), quads[offset + 6]);
                                    double x2 = Math.Max(Math.Max(Math.Max(quads[offset + 0], quads[offset + 2]), quads[offset + 4]), quads[offset + 6]);
                                    double y1 = Math.Min(Math.Min(Math.Min(quads[offset + 1], quads[offset + 3]), quads[offset + 5]), quads[offset + 7]);
                                    double y2 = Math.Max(Math.Max(Math.Max(quads[offset + 1], quads[offset + 3]), quads[offset + 5]), quads[offset + 7]);

                                    Rect rectContaningText = new Rect(x1, y1, x2, y2);
                                    string replacement_text = "Moon";

                                    replacer.AddText(rectContaningText, replacement_text);
                                    replacer.Process(cur_page);

                                    doc.Save(output_path + output_filename, SDFDoc.SaveOptions.e_linearized);
                                    doc.Close();
                                                                      
                                }
hlts.Next();
}

Thanks in Advance.
Snehasis