Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Merging Text into a PDF

Avatar

Level 2

I'm relatively new to the LiveCycle world and I don't know how to do something that I imagine is relatively simple. I have a LiveCycle process that will generate a PDF document. I'd like to merge part of the data model into the text of the document, but can't see how you would do that. A simple example of what I mean would be to have a persons details in the data model (title, forename, surname, address etc), and then have the text of the letter start with something like "Dear ${title} ${surname}," where, obviously, the appropriate values are substituted in.

How do you do that?

1 Accepted Solution

Avatar

Correct answer by
Level 10

The model that you are refering to would be an XML data file. You can map nodes in the xml file against fields in the form (this is called binding) so that when the data is imported the product knows how to tie which field to which node in the XML. Note that the filed name and the node name do NOT have to match. In your case where you are trying to simply substitute values into a text block you can use a Floating Field. To get the floating field you place the cursor in the text block where you want the substitution to occur and under the Insert menu you can pick Floating Field. It will insert a representation that a field is preset with {TextField}. If you look at the hierarchy view you can click on the TextField object and then the object palette will become active for you to set this fields properties. The Binding tab is where you woudl set the binding to the data file (this assumes that you have imported a sample data file or data schema through the data Connections tab 1st). Once the data is merged onto the form the field becomes text (liek the rest of the block and the text block is reflowed to remove any white space.

Hope this helps

Paul

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

The model that you are refering to would be an XML data file. You can map nodes in the xml file against fields in the form (this is called binding) so that when the data is imported the product knows how to tie which field to which node in the XML. Note that the filed name and the node name do NOT have to match. In your case where you are trying to simply substitute values into a text block you can use a Floating Field. To get the floating field you place the cursor in the text block where you want the substitution to occur and under the Insert menu you can pick Floating Field. It will insert a representation that a field is preset with {TextField}. If you look at the hierarchy view you can click on the TextField object and then the object palette will become active for you to set this fields properties. The Binding tab is where you woudl set the binding to the data file (this assumes that you have imported a sample data file or data schema through the data Connections tab 1st). Once the data is merged onto the form the field becomes text (liek the rest of the block and the text block is reflowed to remove any white space.

Hope this helps

Paul