AnalyzeLayout
Merges and splits blocks into logical groupings. Sets blocks to more specific types such as Title, Header, or Footer.
Syntax
bool AnalyzeLayout ()
Parameters
None.Returns
True.Level
Page levelDetails
AnalyzeLayout improves the grouping of text into blocks and changes the type of block to be more specific (for example: Changes the type from block to title). This action can be helpful for extracting data with FindLabelValuePairs where the value to be extracted spans multiple lines.
AnalyzeLayout requires a previously created layout file (for example: tm000001_layout.xml) where text is grouped into blocks. See DocumentAnalytics actions for information on the layout XML file.
Block type | Node in the layout XML file |
---|---|
Block | Block |
Header | Header |
Footer | Footer |
Title | Title |
Heading1 | H1 |
Heading2 | H2 |
Heading3 | H3 |
Picture | Picture |
Barcode | Barcode |
Space | S |
Tab | Tab |
Table | Table |
Row | Row |
Cell | Cell |
Paragraph | Para |
Line | L |
Sentence | Sent |
Word | W |
Character | C |
After you identify the blocks, you can use the following Locate actions to navigate and select the blocks:
- GetSelectedBlockType
- GoSiblingBlockNext
- GoSiblingBlockPrevious
- IsSelectedBlockType
- RegExFind_InBlock
- RegExFindNext_InBlock
- SelectParentBlock
- SelectParentBlockOuterType
- SelectParentBlockType
- UpdateFieldWithBlock
Example
Recognize()
AnalyzeLayout()