Skip to main content
frankema
Participant
July 3, 2017
Answered

Print Date in Header

  • July 3, 2017
  • 1 reply
  • 1024 views

Hi Folks,

Since I have to do a lot of "klicking Work" with Scanned PDF, I was wondering if there is a posibility to maximum Automation.

What I have to do with a scanned main document with appendices (in one document):

1. OCR

2. C&P a dynamic formular field out of a template named "Heute" (engl. "Today") -> Put this in Header on any page (I use the site spanning tool)

3. open JS Editor -> document action -> "on print" and typ in the code:

var f = this.getfield("Today"); f.value="Printdate:"+util.printd("dd.mm.yyyy",newDate());

-> This works fine

4. Safe and crypt it to "print only" rights

Ok here is my Point: .

For Point 1, 3 and 4 the "Action Assistent" (Aktionsassistent in ger.) works very well for me. So ist there a posibility to put in the formular field automatically, always on the same position? I can't find it in the options of the action Assistent.

OR: Kind of a JS Code to generate such a field?

Another Problem: If I try on Point 2, not to use the c&p field from the template but generate manually a new one with exactly the same conditions like the template, the code won't work. Why ?

Thanks for help!

This topic has been closed for replies.
Correct answer try67

In the future, you'll be better off asking questions about JS in Acrobat here: JavaScript

And yes, you can add a field using the addField method of the Document object.
It's documented in the Acrobat JavaScript API Reference.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 3, 2017

In the future, you'll be better off asking questions about JS in Acrobat here: JavaScript

And yes, you can add a field using the addField method of the Document object.
It's documented in the Acrobat JavaScript API Reference.

frankema
frankemaAuthor
Participant
July 4, 2017

Thanks for getting my point albeit my english was german influenced :-D. I mean "FORMS" not "Formulars" and the "Action Assistent" is the batch tool.

But thanks anyway. AddField seems to work in the way I want.

regards !