Dynamic Images in text file

Good afternoon everyone, this is my first post.
The Subject is dynamic image.
I have an input TXT file.
This file contains the path and name of the image that must be attached to the document.
How should I make the Design able to attach the correct image?
Below is a sample of the file. This sample has a single line.

77900001 2321 148292CS 4130D xxxxxxxxxxxxxxxxxxxxxxxxxxxxx A/C CAIQUE SOUZA R Jumana 03121-970 São Paulo SP C 7326 BL.: 0 UNIDADE: 0210 CONDOMINIO ababababababa 7326_edital_05_09 CONVOCAÇÃO qtpag = 02 Cod MSM4100 = 1200000001 Cod MSM4100 = 2200000001 Cod MSM4100 = Cod MSM4100 = E:\Processamento\Auxiliadora Predial\AGOSTO 2022\2508-P148277-88-89-92\Sai\ 4130_1457461_148292_7326_EDITAL_05_09_01.png 4130_1457461_148292_7326_EDITAL_05_09_02.png

Hi @Marcvia and welcome to the forum!

I suppose that the hardest part is to find out at which position (of each line of the input TXT file) the path of the dynamic image or dynamic images can be found. Do you know if each line of the input TXT file contains a separator by which you can split the line into fields? By a CSV file this separator could be the semicolon character for example, as shown in the following example:

Name;ID
John Doe;TEST001
Jane Doe;TEST002

Martin, thanks for responding.
Position of image path information is fixed on each record line.
We used the PlanetPress 6 version, and we have now migrated to connect.

In version 6 we used the command

=TRIM(@(1,659,758))+@(1,759,858)

Where
=TRIM(@(1,659,758)) gives the path

and

+@(1,759,858)

Informs the name of the image.

I don’t know how to write this in this new version.

Hi @Marcvia,

Can you let me know please how much experience you have with working with PlanetPress Connect? Have you already created Data Mapping Configuration, Template, Job Creation Preset and Output Creation Preset files in the past or followed any tutorials for example? Because I assume that for what you would like to achieve you have to create at least the following files:

  1. A Data Mapping Configuration file to extract the data.
  2. A Template file to add an dynamic image to the output
  3. A Output Creation Preset file which is required for creating output

For the first file, “A Data Mapping Configuration file to extract the data”, I would like to share the following “How To” steps with you:

Step 1. Open the Connect Designer application and go to File > New… > Select a wizard (window) > Data Mapping Configuration (folder) > Files (folder) > Text File, click on “Next >”, select a Text file by clicking on the “Browse…” button on the right side of the “File:” input field and click on “finish” once you have selected the Text file which you would like to use.

Step 2. Make a selection of the entire area of the (absolute) path in the Text viewer pane, right click on the selected area and click on the option “Add Extraction”. This will automatically add an new Extraction Step for the extracted field to the Steps pane and will add a new field to the Data Model pane.

Step 3. Make a selection of the entire area of the filename in the Text viewer pane, right click on the selected area and click on the option “Add Extract Field”. This will automatically add the extracted field to the already existing Extraction Step in the Steps pane and will also add a new field to the Data Model pane.

Marten, good morning.
My experience with Planetpress Connect is soooo small, We have now installed this version in our company.
I made the DATAMAP of the file. I added the Datamap to the template in Planetpress Design.
The question is how to attach a variable image using the logic of “image file path” + “image file name”.
Can I forward the design I made (Datamap+Template) to you, along with an example of the data file by email for your review?

Hi @Marcvia,

The question is how to attach a variable image using the logic of “image file path” + “image file name”.

Let’s say that you were able to extract the data and that the values are assigned to the record fields “ImagePath” and “imageFilename”. In that case you can execute the following steps by viewing the Template in the Connect Designer application:

Step 1. Go to the Print Context Section to which you would like to add the dynamic image element via the Connect Designer.

Step 2. Go to Insert > Image… to insert an image element. Select an existing image, a image which you would like to use as default, by selecting the option Resources or Disk for example.

Step 3. Click on OK once you have selected an image.

Step 4. Right-click on the image element which has been just added to the Print Context Section and select the option “Dynamic Image…” and apply the following settings to the Edit Script window and click on OK once you have made the correct changes.

screenshot-edit-script-window_20220831

The effect will be shown when viewing the Print Context Section in Preview mode.

The question is how to attach a variable image using the logic of “image file path” + “image file name”.
Can I forward the design I made (Datamap+Template) to you, along with an example of the data file by email for your review?

A option you might consider is to share a anonymized version of the Data Mapping Configuration and Template files via the current forum post.

Marten, good morning.

First, I apologize for the delay in responding. It’s just that we had to revalidate the license on our server due to the wrong hardware installation.

But it worked very well with the instructions you gave us.
I’m very happy about it.
Thank you very much for your support and willingness to help us.

1 Like