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

How insert file name in PDF document. Batch process.

Community Beginner ,
Feb 18, 2019 Feb 18, 2019

I have 200+ documents. I need to paste (insert) on the page (no matter where, but preferably in the upper right corner) the document file name. How can I do that?

Thank you.

TOPICS
Acrobat SDK and JavaScript , Windows
4.7K
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

Community Expert , Feb 18, 2019 Feb 18, 2019

Create an Action that executes this JavaScript code and then saves the file:

this.addWatermarkFromText({

    cText: this.documentFileName,

    nTextAlign: app.constants.align.right,

    nHorizAlign: app.constants.align.right,

    nVertAlign: app.constants.align.top,

    nHorizValue: -72, nVertValue: -72

});

Translate
Community Expert ,
Feb 18, 2019 Feb 18, 2019

Create an Action that executes this JavaScript code and then saves the file:

this.addWatermarkFromText({

    cText: this.documentFileName,

    nTextAlign: app.constants.align.right,

    nHorizAlign: app.constants.align.right,

    nVertAlign: app.constants.align.top,

    nHorizValue: -72, nVertValue: -72

});

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 Beginner ,
Feb 18, 2019 Feb 18, 2019

Thank you, it works. How to change the location of the file name, I understood. Is it possible to choose the font size?

Thanks again

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
LEGEND ,
Feb 18, 2019 Feb 18, 2019
LATEST

This is the documentation you need for the doc.addWaterMarkFromText method

Acrobat DC SDK Documentation

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