0
1

Hi,

I need to replace a text in a block after recognition, but I do not how to create a new Text object and assign to a Paragraph. I am using c#.

document.Pages[i].Layout.Blocks[j].GetAsTextBlock().Text.Paragraphs[0].InsertText(0, text)

how can I create a new "text" object?

Thanks in advance, Fernando

asked 26 Dec '14, 13:22

Fernando's gravatar image

Fernando
113


Please find below a code snippet which shows how to insert a string into the text of the paragraph.

document.Process( null );
FREngine.LayoutBlocks blocks = document.Pages.Item(i).Layout.Blocks;
FREngine.ITextBlock textBlock = blocks.Item(j).GetAsTextBlock();
textBlock.Text.Paragraphs.Item(0).Insert(0, @"NewString", null);
document.Synthesize(null);

We would like to note that you should call the Synthesize method after inserting the text in order the new string appear in the result file.

link

answered 26 Dec '14, 16:36

Julia%20Anikushina's gravatar image

Julia Anikus... ♦♦
3628

It is OK!!! Thank you very much Julia for your help. Great!!!

(26 Dec '14, 19:20) Fernando

Great!!! It works OK. Thank you very much Julia for your response.

link

answered 26 Dec '14, 19:18

Fernando's gravatar image

Fernando
113

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×36
×27
×1
×1

Asked: 26 Dec '14, 13:22

Seen: 1,891 times

Last updated: 26 Dec '14, 19:21

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal