What it does
The Shape Selection Wizard helps you build shape selection expressions without having to write them manually.
The wizard is available only in Select Shapes and Select Shapes by Reference nodes.
Based on the currently selected shapes in the Document View, the wizard displays their properties and allows you to create filter expressions by selecting properties, operators, and optional tolerance values. The generated expression can then be inserted directly into the Filter Expression of the selected node.
Use it for
- Quickly creating shape selection expressions.
- Selecting shapes based on their properties.
- Avoiding manual expression syntax.
- Exploring available shape properties and operators.
- Creating more robust selections by applying tolerance values.
How to use it
- Open a PDF document.
- Select one or more shapes in the Document view.
- Add a Select Shapes node or Select Shapes by Reference node to your template. Ensure the node is selected in the template.
-
In the Node Properties task pane, click the Shape Selection Wizard button
below the Filter Expression field.
Note: Shape selection required
The Shape Selection Wizard opens only when one or more shapes are selected in the Document View.
Wizard layout
The Shape Selection Wizard organizes available properties into the following expandable categories:
- Shape
- Position
- Size
- Text
- Color
- Path
The properties available within these categories are largely the same as those shown in the Shape Properties task pane. For detailed information about individual properties, refer to the article Task pane "Shape Properties".
For each property, the wizard provides the following controls:
| Element | Description |
|---|---|
Enable property check Box |
Enables or disables the property in the generated expression. |
| Operator drop-down | Defines how the property is evaluated, such as Equals, Inside, or another operator supported by the property's data type. |
| Shape property value field | Displays the value derived from the currently selected shape or shapes. |
| Tolerance mode drow-down (numeric integer properties only) |
Specifies how the tolerance value is applied to the shape property value. |
| Tolerance value field (numeric integer properties only) |
Specifies the tolerance used when evaluating the property value. |
Working with shape property values
The wizard automatically populates the shape property values based on the currently selected shape or shapes.
Single shape selection
When a single shape is selected, the wizard displays the exact property values of that shape.
Multiple shape selection
When multiple shapes are selected, the displayed values depend on the selected shapes:
- If all selected shapes have the same value for a property, that value is shown.
- If the selected shapes have different values, the wizard displays a range or sequence of values.
Available shape property values and operators
The shape property values shown in the wizard depend on the types of shapes selected. For example:
- Text-related values are available for text shapes.
- Path-related values are available for path shapes.
- Image-specific values are available for image shapes.
The available operators depend on the property's data type and whether the property contains a single value, a range, or a sequence.
| Operator | Description |
|---|---|
| Equals | Available for single integer and double values, colors, strings, and rectangles. Selects shapes whose property value is equal to the specified value. |
| Not equals | Available for single integer and double values. Selects shapes whose property value is not equal to the specified value. |
| Greater than | Available for single integer and double values. Selects shapes whose property value is greater than the specified value. |
| Greater or equal | Available for single double values. Selects shapes whose property value is greater than or equal to the specified value. |
| Less than | Available for single integer and double values. Selects shapes whose property value is less than the specified value. |
| Less or equal | Available for single double values. Selects shapes whose property value is less than or equal to the specified value. |
| Inside | Available for ranges and rectangles. For ranges, selects shapes whose property value falls within the specified range. For rectangles, selects shapes whose bounding box lies within the specified rectangle. |
| Not inside | Available for ranges and rectangles. For ranges, selects shapes whose property value falls outside the specified range. For rectangles, selects shapes whose bounding box lies outside the specified rectangle. |
| In | Available for sequences. Selects shapes whose property value is contained in the specified sequence. For example, a sequence of page indices or shape types. |
| Not in | Available for sequences. Selects shapes whose property value is not contained in the specified sequence. |
| Contains | Available for strings. Selects shapes whose property value contains the specified text. For example, specifying "Arial" for the Font Name property selects all shapes whose font name contains "Arial", such as "Arial", "Arial-Bold", or "Arial-Narrow". |
| Not contains | Available for strings. Selects shapes whose property value does not contain the specified text. For example, specifying "Arial" for the Font Name property selects all shapes whose font name does not contain "Arial", such as "Calibri", "Times New Roman", or "Helvetica". |
| Match | Available for strings. Selects shapes whose property value matches a regular expression pattern. For example, shape.text Match "^Invoice" selects all shapes whose text starts with "Invoice". You can modify the value in the property's text field to enter a different regular expression and create custom matching criteria. |
Using tolerance modes and values
For numeric integer properties, you can define a tolerance. Tolerances help compensate for small variations that commonly occur between PDF documents, making shape matching more robust.
Tip: PDF coordinates and measurements are rarely exact. They often contain many decimal places, while the values displayed in the user interface are rounded. In addition, the same shape can have slightly different coordinates across different PDF documents. To make shape selections more reliable, it is recommended to use a small tolerance value whenever possible.
The Tolerance Mode drop-down provides different ways to apply the specified Tolerance Value. The default mode depends on the selected operator and represents the recommended setting for that operator.
The available tolerance modes vary depending on the property type and the selected shape values.
Single integer values
| Tolerance Mode | Description |
|---|---|
| None | No tolerance is applied. |
| Positive | Adds the specified tolerance value to the shape property value. |
| Negative | Subtracts the specified tolerance value from the shape property value. |
| Both | Creates a range by adding and subtracting the specified tolerance value from the shape property value. |
Ranges and rectangles
| Tolerance Mode | Description |
|---|---|
| None | No tolerance is applied. |
| Expand | For ranges, expands the lower and upper bounds by the specified tolerance value. For rectangles, expands the bounding box by the specified amount. |
| Reduce | For ranges, reduces the lower and upper bounds by the specified tolerance value. For rectangles, reduces the bounding box by the specified amount. |
Generated expression
The generated expression is displayed in the preview field at the bottom of the wizard.
As you select properties, operators, and tolerance settings, the expression is updated automatically.
Only selected properties are included in the generated expression. Review the generated expression before clicking Apply.
Inserting the expression
When you click Apply, the generated expression is inserted into the Filter Expression field of the selected node.
Insertion behavior
- If the cursor is positioned inside the Filter Expression field, the expression is inserted at the cursor position.
- If text is selected in the Filter Expression field, the selected text is replaced.
- If the Filter Expression field does not have focus, the existing expression is replaced.
This allows you to use the wizard both for creating new expressions and for extending existing ones.