cancel
Showing results for 
Search instead for 
Did you mean: 

Read Table of Contents to extract specific pages from bundle document

Richard_Green
Star Contributor
Star Contributor

We have an unseparated document bundle from a 3rd party system (Bottomline oFlows).  An index file is not available but the first 1-2 pages of the bundle contain a table of contents.  I am looking for ideas on how to use the table of contents to pull specific documents from the bundle into their own document types.  Thanks in advance for input!

2 REPLIES 2

Steve_Reed
Employee
Employee

Hi Richard,

 

One possible way to accomplish this would be to use VB scripting on a form identification zone that is drawn to encompass the table of contents on the first page (and then also a conditional page registration zone on the second page for the cases where the TOC continues onto page 2).  Have the script parse through all of the text and build up an array of document type(s) and their corresponding page ranges.  Store this data in the document level property bag within the script, and then have the script return a positive match (assuming you verified that this is in fact the table of contents structure you are looking for) on the <default> document.  Then you can have a new page registration zone that will run on each subsequent page of the document, and in here execute a script that compares the current page number (OCRDoc.CurrentPage) to the property bag array to see if the current page is the beginning of a new document that you want from the table of contents.  If so, then the script can mark this page as the beginning of a new document and set the correct document type (OCRDoc.DocumentTypeName = "<new document type>").  If not, then the script can just return a <do nothing> result and this page will instead continue as the next page of the previous document.  This cycle can repeat until the engine reaches the end of the document, and the process can finish with the document now split up into the sub-document(s) with the assigned document types.

 

Thanks, Steve.  I appreciate the input.