Skip to main content
Participant
October 30, 2024
Question

Auto Populate with Text & Images

  • October 30, 2024
  • 1 reply
  • 441 views

Hi there,

 

I am new to this community and I am not too sure if this is where I post this question. 

 

I  was able to create text deliminated file to auto populate and save PDF  file with text.  I am wanting to auto populate the same pdf to include an image.  I thought I would be able to reference the text delimnated file with the location of the image but this did not work.  Is there a way to auto populate with an image? 

 

Any infomation would be helpful.  Thank you.

This topic has been closed for replies.

1 reply

PDF Automation Station
Community Expert
Community Expert
October 30, 2024

this.getField("ButtonFieldName").buttonImportIcon({cPath: "the path to the file including the file extension})

Participant
October 30, 2024

Hi there,

 

Thank you for the quick response. 

 

The information you provided worked.  I was wondering if there is a way to reference a text deliminated file that would store a link to an image? 

PDF Automation Station
Community Expert
Community Expert
October 30, 2024

You could make a field called, for example, imagePath.  If all the paths are the same you would only put the file name with the file extension in the text file column imagePath (example:  image1.png) and hard code the path to that folder:

this.getField("ButtonFieldName").buttonImportIcon("/c/Documents/Images/" +this.getField("imagePath").value);

Run the script above after the import of a row of data.,

If the files are in different folders you would put the entire path in the imagePath column:

/c/Documents/Images/image1.png

Then run the import script as follows:

this.getField("ButtonFieldName").buttonImportIcon(this.getField("imagePath").value);