--- title: "Patterns and Conditional Area - Lasernet 9 Form Editor Training" slug: "patterns-and-conditional-area" description: "Rearranges, barcodes, images, text, shapes, etc. added to a pattern are automatically included to the Conditional Area of the form." tags: ["Conditional Area", "Form Editor", "Lasernet 9 ", "Patterns"] updated: 2026-03-06T08:20:14Z published: 2026-03-06T08:20:14Z canonical: "kb.lasernetgroup.com/patterns-and-conditional-area" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # Patterns and Conditional Area **Applies to:** Lasernet 9 In Lasernet, patterns are used to recognize specific line items in the input. Rearranges, barcodes, images, text, shapes, etc. added to a pattern are automatically included in the Conditional Area of the form. When you add rearranges to a pattern, by default, it is listed in in the FIFO order. The Default Conditional Area has customized settings for the Start Y and End Y positions on each output page (first, middle, last, and single). Rearranges of the first Pattern are written within the baseline for Start Y, and a new page is created when End Y is reached. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107581143.png) > [!NOTE] > Note > > This article describes a software version that is no longer supported. Although the software will no longer receive updates or technical support, existing documentation, such as this article, will be retained for reference purposes but will no longer be updated. If you have any questions, contact [Lasernet Support](https://support.lasernetgroup.com/new-ticket). ## Conditional Area A Default Conditional Area is added by default, but the values of the Start and End Y positions varies depending on the height of the paper size. The positions for Start Y and End Y of the Conditional Area for the First, Middle, Last, and Single Pages are maintained in the **Edit Conditional Area** dialog. To open it, on the menu bar, click **Sheet**, and then click **Conditional Area**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107581282.png) ## Pattern A pattern criterion recognizes XPath in the input. To define a pattern, on the Developer toolbar, select the **Pattern** tool [1] to highlight the elements [2] to be included in the pattern. On the left side of the workspace, you can see a green marker defining the element(s) that match the pattern. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-C45580PS.png) Double-click a pattern or select a pattern, right-click it, and then click **Properties** to edit the pattern object properties. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107581594.png) You can use the output pattern properties to maintain the output design for patterns added to the Conditional Area. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107581733.png) You will use the alternating pattern properties only when a table is added to the output. For a table, you can specify a color of odd/even rows (defined by instance(s) of a pattern), as well as define the other settings. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107581873.png) ## Exercise Download and import the attached configuration called **15. Patterns and Conditional Area in Lasernet Developer 9**. Afterward, navigate to the **Forms** section and open the **Sample** form. 1. Right-click in the design view and select **Conditional Area** in the context menu to define the **Start Y** and **End Y** positions for the **Conditional Area** in the design view. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107582027.png) 1. Select the **** in the list of **Areas**, and then click the **Edit** button to edit the properties of the **Conditional Area**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107582170.png) 1. Set **Start Y** to **110 mm** (Single Page). 2. Set **End Y** to **270 mm** (Single Page). 3. Click the **Ok** button on the **Edit Conditional Area** dialog box to accept settings for the ****. 4. Click the **Ok** button in the Conditional Area dialog box to accept the settings for the list of **Conditional Areas** (currently, only one). ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107582311.png) You have now defined where to show the first and last item lines for a Single Page. Your next step is to define patterns for the item lines and assign them to the Conditional Area. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-HZ9D9MM9.png) 1. On the Developer toolbar, click the **Pattern** tool. 2. In the input view, click the **/Root/Body/Item** node. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107582609.png) With the dialog displayed, specify **Body**/**Item** for **Start pattern criterion** and exists for **Operator**. **Pattern Name** is only a description, so you can type any text here. Once you are done, click **Ok** to accept changes. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107582750.png) 1. On the Developer toolbar, click the **Rearrange** tool. 2. In the input view, click the **/Root/Body/Item/Article** node. The rearrange is automatically assigned to the pattern. 3. On the Property bar, set **X** position to **15 mm**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107582901.png) 1. Create four additional rearranges for the following tags: **Description**, **Quantity**, **Price** and **Amount**. Set **Position**, **Font name**, **Font size** and **Alignment** of the rearranges as illustrated: ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107583053.png) The progress between pattern instances is determined by the **Progress** value of the pattern output settings. In this example, it is defined that the progress (line spacing) between the item lines is **5 mm**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107583203.png) 1. Add a pattern to the **/Root/Body/Info** node. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107583354.png) 1. Add a rearrange to the pattern by selecting the **/Root/Body/Info/Text** element. Edit position properties of the rearrange by setting **Size type** to **Auto Y**. This can help you to control the width of the text string in the **Description** column. 2. Set the **X** position to **42 mm**. 3. Set **Width** to **60 mm**. 4. Once you are done, click **Ok**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107583500.png) The width of the rearrange will now fit the column size due to word wrapping, where the second line overlaps the next item line. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-DENKN1UU.png) To fit the line height, follow these steps: 1. Either double-click the **/Root/Body/Info** pattern, or right-click it and select **Properties** on the context menu. In the **Pattern Properties** dialog, switch to the **Output** tab and set **Progress** to **0 mm**. 2. Select the **Progress** is relative to the highest rearrange checkbox. 3. Once you are done, click **Ok**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107583783.png) The item lines do not overlap anymore as we have added additional line spacing to the Conditional Area. The progress is now relative to the height of the rearrange object for the **Info/Text** node and is calculated by the system. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-OH4U1VK8.png) > [!NOTE] > Your title goes here > > To manually control the Line Height of a rearrange, open the Position settings of a rearrange. Set **Size type** to **Auto Y** [3], Line height to **Absolute** and **5 mm** [4], select the **Use empty line height** checkbox and set the value to **5 mm** [5]. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107584065.png) It is time to add information for the discounts, which is present in the **/Root/Body/Item/Percent** element. Only a few item lines include discounts. We will highlight those items with bold and present them in the (5%) format. Since we have only the value present in the XML data, we are to add a fixed text to the rearrange and enclose it in ( %). ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107584221.png) 1. Add a new pattern of the **/Root/Body/Item** node in the input view. To this end, open the **Pattern Properties** dialog and set **Pattern Name** to **Percent > 0** (this is a description). 2. Change the XPath in the **Start pattern** criterion to **Body/Item[Percent>”0”]**. 3. Select the **Allow further pattern matching** checkbox. This can allow next patterns in the list to match exactly the same node. 4. Switch to the **Output** tab. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107584361.png) 1. On the **Output** tab, set **Progress** to **0 mm**. 2. Once you are done, click **Ok**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107584503.png) ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107584642.png) If the **Allow further pattern matching** check box (see 23) is cleared (default value), only the first appearance in the list of the pattern is processed. If the **Allow further pattern matching** checkbox is selected, the next appearance matching a pattern is also processed. 1. Add a rearrange to the pattern. Since more than one pattern matches the node, on the Developer toolbar, click the **Rearrange** tool and hold down the **Shift** key. Click a rearrange in the pattern containing a percent element. A context menu is displayed showing all patterns matching the selected line. Select the pattern that contains **Percent > 5** and create a new rearrange. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-1QDJLJ6C.png) 1. Edit the rearrange by switching to the **Objects** tab and clicking the **Add** button to add a fixed text. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107584956.png) 1. Insert **(** in the **Fixed text** field. 2. Move up the **Fixed text** by clicking the **Move up** button to show it as the first string in the **Objects** list. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107585095.png) 1. Add two additional objects: one with the **%** character, another one with **)**. Reorder them as illustrated. 2. Once you are done, click **Ok**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107585234.png) 1. Select the rearrange, including the discount object. On the property bar, set the **X** position to **133 mm**. 2. Set **Font** to **Bold** or click the **CTRL+B** keyboard shortcut. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107585389.png) The last item line contains the additional cost, freight. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-GDYUUWUV.png) You can highlight it somehow, for example, by setting the font property to bold for all the rearranges. To this end, follow the next steps. 1. On the Menu bar, click **Sheet**, and then click **Pattern and Rearranges**. As a result, the **Patterns and Rearranges** dialog opens. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-4XPMBK4I.png) 1. On the list, select a pattern named **Item**. 2. Click the **Duplicate** button. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107585831.png) 1. Click the **Edit** button to change the settings for a new pattern (the first item in the list). 2. With the dialog displayed, select the **Allow further pattern matching** checkbox. 3. On the **Instance(s) qualifiers** group box, first, clear the **All** checkbox, and then select the **Last** and **Single** checkboxes. 4. Once you are done, click **Ok**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107585987.png) 1. On the list, select the **Item** pattern (the last item in the list) and then click the **Edit** button. In **Pattern Properties** > **Instance(s) qualifiers** settings, first you must clear the **All** checkbox, and then select the **First** and **Middle** checkboxes. 2. Click the **Ok** button on the **Pattern Properties** dialog. 3. Click the **Ok** button on the **Pattern and Rearranges** dialog. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107586145.png) 1. Select all rearranges added to the last item line. 2. On the Property bar, set **Font** to **Bold**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107586308.png) Let us add a sum to the amount column to complete the form. 1. Add a rearrange to the **/Root/Footer/Amount** node in the input view. 2. Set the **X** position to **195 mm**. 3. Set the **Y** position to **281 mm**. 4. Set **Font size** to **18** and select **Bold**. 5. Set **Box horizontal alignmen**t to **Right**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107586469.png) 1. On the Developer toolbar, select the **Text** tool and insert a fixed text with the **Total text** before the amount. Set **Font size** to **18** and select **Bold**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/1636107586630.png) ## Attachments - [15.-Patterns-and-Conditional-Area.lnconfigx](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/15.-Patterns-and-Conditional-Area.lnconfigx)