コード例 #1
0
        public FormRecognitionAttributes CreateForm(FormsRecognitionMethod method)
        {
            FormRecognitionOptions options = new FormRecognitionOptions();

            options.RecognitionMethod = method;
            FormRecognitionAttributes attributes = RecognitionEngine.CreateForm(options);

            RecognitionEngine.CloseForm(attributes);
            return(attributes);
        }
コード例 #2
0
        public void CreateFormForRecognition(FilledForm form, FormsRecognitionMethod method)
        {
            form.Attributes = CreateForm(method);
            var image = form.GetImage().CloneAll();

            //int saveCurrentPageIndex = image.Page;

            for (int i = 0; i < image.PageCount; i++)
            {
                image.Page = i + 1;//page index is a 1-based starts from 1 not zero

                PageRecognitionOptions pageOptions = new PageRecognitionOptions();
                pageOptions.UpdateImage = true;
                pageOptions.PageType    = FormsPageType.Normal;
                AddPageToForm(image, form.Attributes, pageOptions);
            }
        }