Problem with ContentReplacer AddString

Hello,

    How do I replace text strings that are not surrounded by "[" and  "]" ? 

   thanks

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hello,

The ContentReplacer API can only be used with strings that are surrounded by square brackets. Just to get a better understanding of your requirements, what strings are you looking to replace?

Do you have an example input and a desired output file that illustrates your requirements?

Thinks,

  I search the file and find string "1234", and replace it with "5678",source code follow:
            		switch (element.GetType()) {
		                     case Element::e_text: {
			                         const UString data = element.GetTextString();
			                         if(data.IsInAscii()==true) {
			                                 std::string str = data.ConvertToAscii();
                                                             if(str=="1234") {
			                                              Rect rect = element.GetBBox();
					                              replacer.AddText(rect, "5678");
                                                            };
                                                    };
                                                   break;

            But,the virtical postion of "5678"  is not same as  "1234". 

            Why?