Skip to main content
Brave_Coast5EAE
Participant
August 13, 2022
Question

Text from Excel to PDF via Script

  • August 13, 2022
  • 2 replies
  • 2052 views

Dear All,

is it possible to add text automatically to a pdf from a excel worksheet?

 

 

In this case, i would like to add "XCKA-1P" to the PDF.


Thanks in advance!

 

PDF:

 

And Excel:

 

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
August 13, 2022

A script can't read data from an Excel file. It might be able to do it if the file was saved as a plain-text file, though.

Brave_Coast5EAE
Participant
August 13, 2022

yes, the excel file can easily be converted to text.

 

 

Brave_Coast5EAE
Participant
August 14, 2022

sounds good. but is there any help on how to do this? i now how to do VBA macros in Excel but in Acrobat i have really no idea


i am attaching all files, as well as an example (jpg)

Brave_Coast5EAE
Participant
August 13, 2022

A script would have to find the name on each PDF page, compare it to the XLS Column A, and then add a text field to the PDF Page with the according data from column C.

 

In the example, the PDF page with the name "Ute Schmidt" would get a text field with "XCKA-1P"

The PDF page with "Gitta Lippold" would get a text field with "GBAD-1K"

 

and so on.

 

The text field can be anywhere on the PDF file in a free area.

 

Lastly the script should save and close the PDF file.

 

Again, thank you!