Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

XML Code for replace a specific text characters in text fields


Level 2



I have a product list in Dynamic PDF which is connected to a Access DB.

My Product Name field look like that :

Primary Product Name (Secondary Product Name)


I want to replace " (" with "\n" (new line, or break). 

How I can obtain a field with 2 lines? Any ideas ? I want a <BR> or \n after "Primary Product Name".

Primary Product Name (Secondary Product Name)


I mention , in pdf exist many entries and I cannot do it manually.




3 Replies



Familiarize yourself with "Floating fields". Basically you place a Text object and Insert-Floating Field into that text object. See the example here





Level 2

My text field in the table is filled from the database with a single row, and I want my text to be interrupted before the first parenthesis, to move to the second row.





yes, you can use a Text object in the table field similar to what I have shown in my sample and the floating fields get data bound to your access data connecton. Any script that combines the 2 fields would not be required in this scenario.