What it does
This node assigns the following Layout attributes to elements:
- Placement: Defines how the element is positioned (e.g., block-level or inline).
- BBox: Specifies the bounding box coordinates of the element.
Use it for
- Defining the placement of a structure element.
For better performance when fixing placements individually, use this node instead of the Fix Placement Node, which scans and updates the entire logical structure. - Defining the bounding boxes of Figure, Formula or Form structure elements.
Important
The Add Logical Structure Node automatically adds bounding boxes based on content of the structure element. Use the Set Layout Attributes node only if:
- The automatically generated bounding boxes are incorrect or missing.
- You want to manually adjust bounding boxes in an existing logical structure.
How to use it
- Drag and drop the node from the Node Library into your template:
Node Library > Folder Tagging - Connect the node with other nodes in the Data Flow of your template.
- Specify the settings in the Node Properties task pane.
Node Input
Items: Connect a node containing the items where you want to apply Layout attributes.
Important
To set Layout attributes, each item must have an attached structure element.
Node Output
Items: Outputs the same items, now enhanced with the specified Layout attributes.
Node Properties
Node Name
You can assign a custom name to the node to help identify its purpose within your template.
Node Selector
Use Path Language to navigate through the shape trees and select the elements where you want to apply Layout attributes. Use the names assigned to shape trees (not the tags in brackets).
Placement Expression
Use this expression to define the placement attribute of structure elements. This setting controls where an element appears in relation to its surrounding area and other content.
Available variables:
-
item: the current item being processed from the input list.itemhas the same properties as a shape tree object. -
index: the zero-based index of the item in the input list -
first: the first item in the input list -
last: the last item in the input list -
count: the total number of items in the input list -
placement.block: The element is stacked in the block-progression direction inside its container.
(In Western writing systems, this means vertically from top to bottom—like paragraphs.) -
placement.inline: The element is placed in the inline-progression direction inside its container.
(In Western writing systems, this means horizontally from left to right—like words in a sentence.) -
placement.before: The before edge of the element lines up with the before edge of its container. It may float to fit properly. It acts like a block and takes up the full width. Other content starts at the after edge.
(In Western writing systems the before edge is the top edge and the after edge is the bottom edge.) -
placement.start: The start edge of the element lines up with the start edge of its container. It may float to fit. Other content wraps around it.
(In Western writing systems, the start edge is the left edge.) -
placement.end: The end edge of the element lines up with the end edge of its container. It may float to fit. Other content wraps around it.
(In Western writing systems, the end edge is the right edge.)
Expected return type: integer
Example:
placement.block
Sets the placement attribute to block.
BBox Expression
Use this expression to define the bounding boxes of Figure, Formula or Form structure elements using a rectangle.
Available variable:
-
item: the current item being processed from the input list.itemhas the same properties as a shape tree object. -
index: the zero-based index of the item in the input list -
first: the first item in the input list -
last: the last item in the input list -
count: the total number of items in the input list
Expected return type: rectangle
Example 1:
Rectangle(15.0, 22.0, 361.0, 678.0)
Sets the bounding box to the defined coordinates.
Example 2:
item.pageBBoxes[0]
This returns a rectangle representing the bounding box of all shapes combined on the first page of the shape tree.
Important
The bounding box must always be defined in the page coordinate system. Therefore, using item.docBBox is not recommended, as it does not work correctly for items that span multiple pages.