You are viewing limited content. For full access, please sign in.

Question

Question

LF Cloud automatic document page separation and creation of new documents, with workflow

asked on June 2

Have a process where:

  • tiff multipage document is received in an input folder in LF Cloud repo
  • the entry document may contain in its pages, 1 to 6 different type of documents
  • each page in the entry document is analyzed with capture profile and a Doc Type is determined for each page
  • each doc type might have 1 to n pages. 

What I want the WF to do is: 

  1. separate the first page with a given identified document type, and all the following un- identified pages, until a page with a different doc type is found.
  2. the pages found in step 1 must be cut- off from the entry document and saved as a different document in a different folder
  3. steps 1 and 2 must be repeated so that new documents are generated and saved in the same folder as specified in step 2-; in every iteration obviously, the number in pages in the entry document will be less and less until no pages are left in the entry document; then it will be eliminated.

Following is a textual representation of the entry document and what should be done:

Page 1  -> Type A  -> Start Document A

Page 2  -> Un- identified -> Pertains to Document A

Page 3  -> Un- identified -> Pertains to  Document A

cut page 1, 2 & 3 from Entry document and save Document A to a different folder

Page 4  -> Type B  -> Start Document B

Page 5  -> Un- identified -> Pertains to Document B

cut page 4 & 5 from Entry document and save Document B to different folder (same folder as Doc A)

Page 6  -> Type C  -> Start Document C

cut page 6 from Entry document and save Document C to a different folder (same folder as Doc A & Doc B)

No pages left in Entry Document? -> delete it

 

Any ideas on how to accomplish this, using LF Cloud workflow, will be greatly appreciated ;)

0 0

Answer

SELECTED ANSWER
replied on June 2

Hi Javier, the challenge of use Capture Profiles Groups for Document Identification is that Capture profiles will always provide a match even if none of the profiles in the group is a match, it will just pick one.
At the beginning of the process I use the Find Entry for the Core document, and get the addition Properties "Page Count", so I can use a Repeat Loop based on the Page count to loop through all the pages.

What I have found is as I iterate through the Pages, I Retrieve Text and use Pattern Matching to look for a unique Identifier on the first page, and if it finds it then it's a new Document and I Create a New Entry and move the page to it, then as I go through each page, if the Pattern doesn't match on the subsequent pages, it must be part of the same document so I move the pages to it until I get to a match again, which would be a new document. Keep a list of the new Entry ID's you've created for the separated documents, and then you could loop through those values and use Capture profiles if you want to grab specific fields off the pages to use for Metadata, etc.

1 0
replied on June 3

Yep, this. 

Keep in mind that if you remove page one from the source document, page two becomes page one, so in your loop, you don't need to use the iteration counter to target pages in your loop. 

0 0

Replies

replied on June 3

Steve, Ben, thanks for your input; I'll try  those and report on the results, here. 

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.