How insert file name in PDF document. Batch process.

Community Beginner ,
Feb 18, 2019 Feb 18, 2019

Copy link to clipboard

Copied

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, Macintosh, Windows

Views

856

Likes

Translate

Translate

Report

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

Adobe Community Professional , 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});

Likes

Translate

Translate
Adobe Community Professional ,
Feb 18, 2019 Feb 18, 2019

Copy link to clipboard

Copied

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

});

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Acrobat DC SDK Documentation

Likes

Translate

Translate

Report

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