Hello, is it possibile to add or modify a document definition usinf flexicapture sdk? I whant to search some fields with text extracted from a database, but I don't whant to configure the database in the FlexiLayout Studio (with GUI or FlexiLayout Language) (data searched maybe is different from any document). So, is it possible to this? I can't find anything on FieldDefinition or RecognitionParams; the only way to use an external database is on FlexiLayout Studio?

Thanks Angelo

asked 06 Jun '16, 18:27

angusto's gravatar image

angusto
14


Hello!

Yes, it's possible to create a document definition by using FlexiCapture Engine. For more information please refer to the Help file: Help→Guided Tour→Advanced Techniques→Creating Document Definitions and Help→Guided Tour→Tutorial→Creating Document Definitions by Training. Also it is possible to modify Document Definitions using ABBYY FlexiCapture Engine, but only for the Document Definitions which do not belong to any FlexiCapture project. But unfortunately it seems that Database check rules can be set only by using ABBYY FlexiCapture or FlexiLayout Studio.

link

answered 07 Jun '16, 19:45

Anna%20Falevskaya's gravatar image

Anna Falevskaya ♦♦
715

Hello, thanks! So, another questions:

If I utilize the textfile search data, it is reloaded every document or it's loaded only when is loaded the layout? How can I vary the searched static text for every document?

Think abount someting like an Invoice, I must search a buyer and a seller. Every Invoice has a different seller (but I know witch is) and a list of buyers that is known in advance. I whant to change the searched text of the seller just to verify that is ok and I whant to search for the buyer on a list connected to the seller.

Thanks

link

answered 09 Jun '16, 17:13

angusto's gravatar image

angusto
14

Hi!

All recognized data of the particular document is available till the corresponding Document object is available (is not deleted or unloaded from memory).

link

answered 10 Jun '16, 14:41

Anna%20Falevskaya's gravatar image

Anna Falevskaya ♦♦
715

Hello!

Ok but if I have two same lists, one for the seller and one for the buyer and two different fields. It can happen that both seller and buyer are reconized the same "location" field. The only way I know is to tell the second to not search into the first area. I wold prefer to insert into the document definition one new field.

So: - I create a document definition from AFL - I modify this document definition adding one static text field with one search string - I use ony the second field to search from the sql list

link

answered 10 Jun '16, 15:17

angusto's gravatar image

angusto
14

It looks like you've resolved the issue on your own.

In case you need some recommendations about setting up Document Definitions, created in ABBYY FlexiCapture or FlexiLayout Studio, please send your questions to ABBYY Technical Support. They will be happy to provide detailed instructions. You can find Technical Support Contacts here - https://www.abbyy.com/support/contacts/.

(10 Jun '16, 15:31) Anna Falevskaya ♦♦

Hi, I'm not asking help on realizing a flexylayout. I wold like to know if is possibile, in the FC SDK, after creating a document definition from afl file, to add a new filed with static search text and if is possibile to modify this static search text field on every new document added.

Thanks Angelo

link

answered 10 Jun '16, 16:20

angusto's gravatar image

angusto
14

As I've already answered you, it is possible to modify Document Definitions using ABBYY FlexiCapture Engine, but only for the Document Definitions which do not belong to any FlexiCapture project. For example, you can add a new block with type BT_StaticText to a page of a Document Definition by using the AddNew Method of the BlockDefinitions Object. You can get a recognized data from a StaticText field via the AsText property of the FieldValue object. You can modify this obtained Text object via its methods, e.g., Delete method (removes a range from the current text) and Insert method (inserts new text into the current text). Please refer to the Help file for more information.

link

answered 10 Jun '16, 16:57

Anna%20Falevskaya's gravatar image

Anna Falevskaya ♦♦
715

Really thanks!

(10 Jun '16, 17:50) angusto

Hi Anna,

I have this peace of code:

IDocumentDefinition df = engine.CreateDocumentDefinitionFromAFL("DME_Test.afl", "Italian");

IFieldDefinition fField = trovaField(df, "FlexiLayoutBlockName") (find field by recursive function like code examples);

Program.trace("Field Type... " + fField.Type.ToString()); --> output is FT_TextField Program.trace("Recognition Params Type... " + fPivaCliente.RecognitionParams.Type.ToString()); --> output is BT_Text

ITextRecognitionParams cTextParams = fField.RecognitionParams.AsTextParams();

ILanguage cLanguage = cTextParams.CreateEmbeddedLanguage(LanguageTypeEnum.LT_Simple, engine.PredefinedLanguages.FindLanguage("Italian"));

ISimpleLanguage cSimpleLanguage = cLanguage.AsSimpleLanguage();

cSimpleLanguage.UsePredefinedDictionary = false;

cSimpleLanguage.UseUserDefinedDictionary = true;

FCEngine.IDictionary cDictionary = cSimpleLanguage.UserDefinedDictionary;

cDictionary.AddWord("0123456789", 100); --> (In the document is present this word I can see it in flexylayout studio matching procedure)

cTextParams.Language = cLanguage; processor.AddDocumentDefinition(df);

After processing in the blocks recognized I see all block connected to some searchfields in flexilayout that are found, but the field (corresponding on the "FlexiLayoutBlockName" is empty).

Why? What am I missing?

Thanks Angelo

link

answered 15 Jun '16, 10:10

angusto's gravatar image

angusto
14

Please collect the following additional information: 1) serial number of the FlexiCapture Engine; 2) your FlexiLayout Studio project; 3) AFL file that you are using; 4) sample images; 5) the full code snippet with which we could reproduce the situation on our side (currently it's unclear, e.g., what trovaField method does and how it works)

and send it to SDK_Support@abbyy.com. We will try to assist you through the email correspondence.

(15 Jun '16, 18:26) Anna Falevskaya ♦♦

I'm doing it now. Thanks!

(16 Jun '16, 02:08) angusto

Hello, have you received it?

Thanks Angelo

link

answered 17 Jun '16, 16:40

angusto's gravatar image

angusto
14

Hello Angelo!

Yes, we received your letter and passed it to our colleagues from the technical support group of the European office. They will contact you shortly. Thank you for the provided materials!

(17 Jun '16, 16:57) Anna Falevskaya ♦♦

Thank you for your rapid response!

(17 Jun '16, 18:47) angusto
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:

×47
×2

Asked: 06 Jun '16, 18:27

Seen: 882 times

Last updated: 17 Jun '16, 18:47

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