Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to auto print Filename at page tail?

New Here ,
Sep 25, 2016 Sep 25, 2016

How to auto print Filename at page tail?

Thank you!

Just likes when printing documents, the web site link address will be shown or not be shown at the bottom of the page.

https://forums.adobe.com/discussion/create.jspa?containerType=14&containerID=4700&question=true&subj...

TOPICS
Acrobat SDK and JavaScript , Windows
1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Sep 26, 2016 Sep 26, 2016

If you want to automate the entire process (so you don't have to manually add the text box each time) take a look at addField(); in the JS_API_Reference manual.

There example is how to add a navi button to each page, but is straight forward enough modify it to add a textbox field to the bottom of each page with Try67's code to pull in the file name.

Thanks

Doug

Translate
Community Expert ,
Sep 26, 2016 Sep 26, 2016

You can add a print-only text field that contains the file-name using a simple script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 26, 2016 Sep 26, 2016

Could you please make a example Script for printing test?

Thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 26, 2016 Sep 26, 2016

Create a text field called "FileName", set it as Hidden, but Printable and then go to Tools - JavaScript - Set Document Actions and as the Will Print event enter this code:

this.getField("FileName").value = this.documentFileName;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 26, 2016 Sep 26, 2016
LATEST

If you want to automate the entire process (so you don't have to manually add the text box each time) take a look at addField(); in the JS_API_Reference manual.

There example is how to add a navi button to each page, but is straight forward enough modify it to add a textbox field to the bottom of each page with Try67's code to pull in the file name.

Thanks

Doug

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines