Create an "Other" Layout??

  • 64 Views
  • Last Post 4 weeks ago
  • Topic Is Solved
Sky posted this 12 November 2018

This question is a little bit tricky and challenge and which is raised by one of our user. 

Normally, for flexicapture studio, if the sample is not recognized, it will show the sample as "unknown document".

However, our user do not want to have this classification. They want to create a "Other layout" for this classification. Within the "Other layout", they set nothing in it and try to recognize it. It is successfully recognized as "Other", but it also affect all the normal layout as "Other".

 

Therefore, I would like to ask is there any way to classify those "Other" sample as a "Other" layout?

Order By: Standard | Newest | Votes
Sky posted this 12 November 2018

Further more, if I have 1 pdf contain 3 pages, after recognition, the pages is as follow

1st pages: Normal Layout

2nd pages: "Other" Layout

3rd pages: "Other" Layout

The whole pdf = "Other" Layout

 

is there any solution that once one of the pages is recognized as Normal Layout, the whole pdf will consider as Normal Layout?

Sky posted this 13 November 2018

Further more, if I have 1 pdf contain 3 pages, after recognition, the pages is as follow

1st pages: Normal Layout

2nd pages: "Other" Layout

3rd pages: "Other" Layout

The whole pdf = "Other" Layout

is there any solution that once one of the pages is recognized as Normal Layout, the whole pdf will consider as Normal Layout?

 

For this case, I have unselected "Disable sections order check" and select "Detect annexes on the basis of preset document structure, without analyzing". It is worked if the Normal Pages is the beginning of the pdf. But if the Normal Pages is at the middle. It still cannot recognized as Normal Pages.

Now, I am going to try using classifier

or

apply script from http://www.capturedocs.com/thread/262-how-quot-manually-match-quot-a-document-definition-via-script/ 
in Event handlers"Before matching" 

But I cannot apply Documents.count in the script. By reading the user guide, it just mention "A collection of IDocument objects", but I cannot find a way to implement it.  

Kostya Marushchak posted this 13 November 2018

Hi, we have similar desire.

We create batches from emails and wanted considered a whole batch from one email like one piece. And if inside attachments (this batch) flexicapture doesn't find any known documents create one multipage "Other document" which contains all attachments pages.

If someone could explain how this can be achieved it would be very helpful.

 

Kostya Marushchak posted this 13 November 2018

I know how to achieve your middle of document use-case. Put allow multi-page documents for root element of layout in flexistudio.

Also you can set number of annex pages in assembly (like put reasonable amount like 5) for me it helps flexicapture to treat first pages like annex. 

  • Liked by
  • Sky
Sky posted this 13 November 2018

allow multi-page documents which means the min page is 1 and max page is 99? 

I understand your way but since, in my case, my user created a "Other" layout, let make a 3 pages pdf as an example. The engine will recognize 1 page for Normal Page and 2 page for "Other" page, the whole pdf will classify to "Other" Page because 2>1 (Orz)

Sky posted this 16 November 2018

Hi, I think I successfully make a solution about this issue, but I am not sure that which is suitable for you.

First, In flexilayout, create a "Other Layout", which only contain "char string" in header, footer,SearchElements.

Reason: let all the pager can match with this template

Second, add the template in the project, set it to the bottom one, select "Use first acceptable FlexiLayout".

Reason: it will match the upper templates first, if it is match, it will be matched. And those "other" sample will match with "Other layout"

Third, select Event Handlers "After document state changed", use script to control

script logic is as follow:

 

 

if last page is analyzed then

      loop all page

            if pages is not "other Templates" AND not "" //means matched some layout but not "Other"

                  set Matched? to true

            End if

      End loop

      if Matched? is true

            loop all page

                  if pages == "DummyTemplates"

                        pages = annexpages

                  End if

            End loop

      End if

End if

Kostya Marushchak posted this 16 November 2018

Did you do analyze how many licenses pages this approach eats?

Sky posted this 4 weeks ago

No, i didn't, but our customers feel satisfy with this solution 

Close