Adding Watermark to PDF from text file

New Here ,
Jun 05, 2018 Jun 05, 2018

Copy link to clipboard

Copied

Dear All,

I need to add hundred Watermark in one PDF File and save each watermark pdf with each name. I have a text file which includes the watermarks.
I already see the java script function but I don´t find much information I need. I found this piece of code and even not able to transform in my requirements - see

this.addWatermarkFromText({

cText: "Text",

nTextAlign:app.constants.align.center,

cFont: "Helvetica-Bold",

nFontSize:36,

aColor: color.red,

nStart: this.pageNum,

nOpacity: 0.5

});

Capture.JPG

Anyone knows who to find a solution for this ?

Thank you very much

TOPICS
Acrobat SDK and JavaScript

Views

244

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
Adobe Community Professional ,
Jun 05, 2018 Jun 05, 2018

Copy link to clipboard

Copied

You need to better explain what you want to achieve. Do you have a list of PDF file with a watermark for each one that you want to add, or do you have a single PDF that you want to add multiple watermarks to, saving it under a different name each time?
Also, what version of Acrobat do you have?

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
New Here ,
Jun 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

I will try to explain - I have a pdf file and a text or csv file with 100 names - I need each name as a watermark in a separate pdf file. So as a result I have 100 pdf, saved as a new pdf with the name from the text file.

I have Adobe Acrobat DC 2015

Thank you

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
Adobe Community Professional ,
Jun 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

LATEST

OK, you will need to write a script that reads in the text file (you can use the readFileIntoStream method of the util object), and then adds the watermark to the file, saves it, and then closes and re-opens it. Alternatively, you can use a text field, which makes things much easier, as you don't have to re-open the file after each import. It does have more limited appearance properties, though. For example, it can't be rotated.

I've developed (paid-for) tools that can do either one of these tasks.

If you want to use form fields:

Custom-made Adobe Scripts: Acrobat -- Mail Merge and Email PDF Files

If you want to do it with a watermark:

Custom-made Adobe Scripts: Acrobat -- Batch Watermark A PDF File

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