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?
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.
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.
All recognized data of the particular document is available till the corresponding Document object is available (is not deleted or unloaded from memory).
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
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/.
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.
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.
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?
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.
I'm doing it now. Thanks!
Hello, have you received it?
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!
Thank you for your rapid response!
Please sign in to leave a comment.