text file
Copy link to clipboard
Copied
Hello,
How can i read a text file opening a PDF to retrieve the number (text) and display it in a field ?
Thanks in advance
JC
Copy link to clipboard
Copied
Please explain your workflow in detail. Are you converting a text file to PDF? or do you need to get a value from a text file and put it into a field on an existing PDF form?
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
re,
Yes I need to get a value from a text file and put it into a field on existing PDF form..
but, I have in the PDF form and i would like that when opening it retrieves a number a put into field adn when saving it can increase the number in text file.
the PDF form must have an incremental number
Thanks
JC
Copy link to clipboard
Copied
From an Acrobat script, the contents of any file can be acquired with the util.readStreamFromFile() function.
Here's the reference entry:
It includes an example of reading a text file.
Now the second part is parsing the text file format to get your number. How is this text formatted?
Use the Acrobat JavaScript Reference early and often

