What it does
This node groups items that are spatially close and logically belong together.
It is particularly useful for detecting structures such as tables or composite graphics. For example, it can efficiently group table elements (grid + content) or path elements that form a single illustration.
The node processes each item individually and checks whether other items intersect with a defined rectangular area around it. If another item lies within this area, it is grouped with the first item. If not, a new group is created.
This process continues iteratively: for each newly added item, the node again checks whether additional items fall within the defined area around it. Any matching items are added to the same group. The algorithm runs until no further overlaps are detected and the group is complete.
To support use cases such as table detection, the node provides two input ports:
- Content: for actual content elements (e.g., text)
- Geometry: for structural elements (e.g., table grid lines)
For table scenarios, it is recommended to use both input ports. However, you can also group only content items or only geometry items.
The resulting groups can be passed to a Detect Table node to create tables.
Best practice
It is recommended to sort your content items in a logical order before grouping them with this node—for example, row by row when working with tables. Geometry items do not need to be sorted.
Use it for
Grouping items that belong together spatially, such as:
- Table grids and table content
- Elements forming a single graphic or diagram
How to use it
- Drag and drop the node from the Node Library into your template:
Node Library > Folder Shapes > Folder Grouping - Connect the node with other nodes in the Data Flow of your template. Connect content items to the Content input port. Connect structural items to the Geometry input port. You can connect either one or both input ports.
- Specify the settings in the Node Properties task pane.
Node Input
- Content: Connect a node from the Data Flow containing content items (shapes or shape trees) to be grouped.
- Geometry: Connect a node from the Data Flow containing geometry items (shapes or shape trees), such as layout elements that organize the document visually (e.g., table grids).
Node Output
This node provides two outputs, visible in the Node Result task pane:
- Content Groups: A list of shape trees, each representing a detected group of content items.
- Geometry Groups: A list of shape trees, each representing a detected group of geometry items.
Note
If both input ports are connected, the number of Content Groups and Geometry Groups is always the same. Some groups may be empty if no corresponding items were found.
Node Properties
Important
Properties apply depending on which input ports are connected.
- Content-related properties apply only if the Content input port is used
- Geometry-related properties apply only if the Geometry input port is used
- Padding settings apply only if both input ports are connected
Node Name
You can assign a custom name to the node to help identify its purpose within your template.
Content Group Name
Assign a name to each generated content group for easier reference in further processing.
Group Content as
Choose how the resulting content groups should be structured:
- Items: Keeps the existing containers and groups entire items as they are.
- Shapes: Removes existing containers and groups only the underlying shapes.
Content Max. Vertical Distance
Defines the maximum vertical distance (up and down from each content item) within which other content items are considered part of the same group. Only applies if the Content input port is connected.
Expected return type: double
Example:
12.0
If another content item lies partially or fully within the 12-point range above or below a content item, it is grouped with it.
Content Max. Horizontal Distance
Defines the maximum horizontal distance (left and right from each content item) within which other content items are considered part of the same group. Only applies if the Content input port is connected.
Expected return type: double
Example:
12.0
If another content item lies partially or fully within the 12-point range to the left or right of a content item, it is grouped with it.
Geometry Group Name
Assign a name to each generated geometry group for easier reference in further processing.
Group Geometry as
Choose how the resulting geometry groups should be structured:
- Items: Keeps the existing containers and groups entire items as they are.
- Shapes: Removes existing containers and groups only the underlying shapes.
Geometry Max. Vertical Distance
Defines the maximum vertical distance within which geometry items are grouped together. Only applies if the Geometry input port is connected.
Expected return type: double
Example:
0.4
If another geometry item lies partially or fully within the 12-point range above or below a geometry item, it is grouped with it.
Geometry Max. Horizontal Distance
Defines the maximum horizontal distance within which geometry items are grouped together. Only applies if the Geometry input port is connected.
Expected return type: double
Example:
0.4
If another geometry item lies partially or fully within the 12-point range to the left or right of a geometry item, it is grouped with it.
Max. Padding (Left, Right, Top, Bottom)
Applies only if both Content and Geometry input ports are connected.
These settings define how spatial relationships between Content items and Geometry items influence grouping. The bounding box of each Content item is expanded by the defined padding values, and this expanded area is then checked for overlap with Geometry items.
If a Geometry item overlaps the expanded bounding box of a Content item (i.e., within the range from 0 up to the defined padding values), they are considered spatially related.
In this case, the Content item is grouped together with other Content items associated with that Geometry item. If no Geometry item overlaps this range, the Content item is treated as part of a separate group.
This is especially useful when geometry elements (such as table grid lines) are too far apart to form a group on their own—for example, when only horizontal or only vertical lines are present—effectively bridging the gap between them.
Max. Padding Left
Defines how far the bounding box of a content item is expanded to the left when checking for overlap with geometry items.
Expected return type: double
Example:
8.0
Max. Padding Right
Defines how far the bounding box of a content item is expanded to the right when checking for overlap with geometry items.
Expected return type: double
Example:
8.0
Max. Padding Top
Defines how far the bounding box of a content item is expanded upward when checking for overlap with geometry items.
Expected return type: double
Example:
6.0
Max. Padding Bottom
Defines how far the bounding box of a content item is expanded downward when checking for overlap with geometry items.
Expected return type: double
Example:
6.0