Apply Stamp Tool to All Pages in a PDF?

New Here ,
Mar 09, 2012 Mar 09, 2012

Copy link to clipboard

Copied

Is there a way to have Acrobat Pro X apply a stamp to all pages in a document? For example, if I am sent a set of plans that I want to mark "Not Approved", is there a way to click the Not Approved Stamp on page one and have it apply to all pages in the document?

Thanks!

TOPICS
Comment review and collaborate PDF

Views

68.9K

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

Community Beginner , Aug 01, 2014 Aug 01, 2014
Hi Again,Thanks for replying so fast. I now tried the below code as you suggested but it still gave a syntax error. I am copying/pasting all information from the console:// Assume that the stamp is the only// annot on the pagethis.syncAnnotScan();var annt = this.getAnnots(this.pageNum)[0];var props = annt.getProps();for(var i=0;i < this.numPages;i++){props.page = i;if(i != this.pageNum)this.addAnnot(props);}SyntaxError: syntax error1:Console:Execundefined

Likes

Translate

Translate
Guru ,
Mar 09, 2012 Mar 09, 2012

Copy link to clipboard

Copied

Thom Parker had a solution of sorts on AcrobatUsers.com:

http://acrobatusers.com/forum/javascript/automatically-add-stamp-all-pages-pdf/

Hope it helps you out.

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
Engaged ,
Jan 07, 2013 Jan 07, 2013

Copy link to clipboard

Copied

Hi Sabian, have you gotten this work?

I copied the following script (below) from the thread, but can't seem to get it to work...

// Assume that the stamp is the only// annot on the page

var annt = this.getAnnot(this.pageNum)[0];

var props = annt.getProps();

for(var i=0;i lt this.numPages;i++){

props.page = i;

if(i != this.pageNum)

this.addAnnot(props);

}


I ran it the java consule but it gives me an error about missing an ;

Not sure whats wrong.

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 ,
Jan 07, 2013 Jan 07, 2013

Copy link to clipboard

Copied

That one line should be:

for(var i=0;i < this.numPages;i++){

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
Engaged ,
Jan 07, 2013 Jan 07, 2013

Copy link to clipboard

Copied

i tried that before (changing lt to <) but if still get an error.

I'm not sure if I'm doing something wrong, but I opened a 2 page PDF, placed a stamp on the first page, and then opened the java console and pasted the code...

The error returned is:

MissingArgError: Missing required argument.

Doc.getAnnot:1:Console undefined:Exec

===> Parameter cName.

undefined

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 ,
Jan 07, 2013 Jan 07, 2013

Copy link to clipboard

Copied

There's another error in the code. The first line should be:

var annt = this.getAnnots(this.pageNum)[0];

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
Engaged ,
Jan 07, 2013 Jan 07, 2013

Copy link to clipboard

Copied

George,

That did the trick.

If I was as well-versed in Acrobat javascript, I would have caught that small error. Hopefully, this will help someone else in the near future.

Thank you for your input.

S

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 ,
Oct 09, 2013 Oct 09, 2013

Copy link to clipboard

Copied

I have used this script a lot lately then all of the sudden it has stopped working. Is there anything I could be doing wrong?

I am using:

// Assume that the stamp is the only

// annot on the page

var annt = this.getAnnots(this.pageNum)[0];

var props = annt.getProps();

for(var i=0;i < this.numPages;i++){

props.page = i;

if(i != this.pageNum)

this.addAnnot(props);

}

Thank you for your help.

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
Most Valuable Participant ,
Oct 09, 2013 Oct 09, 2013

Copy link to clipboard

Copied

Are there any error messages in the console?

You should probably add a call to this.syncAnnotScan() at the top of the script.

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 ,
Oct 09, 2013 Oct 09, 2013

Copy link to clipboard

Copied

That was perfect it just needed a call function.

Thank you for your help. Is there a good place to look up Java script commands for adobe?

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
Most Valuable Participant ,
Oct 09, 2013 Oct 09, 2013

Copy link to clipboard

Copied

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 ,
Aug 01, 2014 Aug 01, 2014

Copy link to clipboard

Copied

Hello guys,

I was trying to use the below code in order to apply the same stamp (that has already been added to the first page) to all pages in the PDF document.

// Assume that the stamp is the only

// annot on the page

call to this.syncAnnotScan()

var annt = this.getAnnots(this.pageNum)[0];

var props = annt.getProps();

for(var i=0;i < this.numPages;i++){

props.page = i;

if(i != this.pageNum)

this.addAnnot(props);

}

Well since I don't usually use javascripts I cannot understand whether the above will work regardless of the name of the stamp, or whether I should add the call to this.syncAnnotScan() somewhere else. I tried a few variations of putting the above funciton somehwere elese like on top but I got the below errors during my tries:

MissingArgError: Missing required argument.

Doc.getAnnot:1:Console undefined:Exec

===> Parameter cName.

undefined

SyntaxError: syntax error

1:Console:Exec

undefined

undefined

Can someone advise me what the code order should be, whether the syntax is correct and if there is anything I should change in order to add the stamp name to the code script.

Your help is highly appreciated.

Thanks

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
Most Valuable Participant ,
Aug 01, 2014 Aug 01, 2014

Copy link to clipboard

Copied

The error message is about getAnnot, but in the code you posted this method is not used. Are you sure the code you posted is actually the code you're using?

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 ,
Aug 01, 2014 Aug 01, 2014

Copy link to clipboard

Copied

Hi,

I've tried a few variations of the code but nothing worked. The code I tried with is:

// Assume that the stamp is the only

// annot on the page

call to this.syncAnnotScan()

var annt = this.getAnnots(this.pageNum)[0];

var props = annt.getProps();

for(var i=0;i < this.numPages;i++){

props.page = i;

if(i != this.pageNum)

this.addAnnot(props);

}

The error that it returned for it is:

SyntaxError: syntax error

1:Console:Exec

undefined

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
Most Valuable Participant ,
Aug 01, 2014 Aug 01, 2014

Copy link to clipboard

Copied

This is not valid code:


call to this.syncAnnotScan()


Use this instead:


this.syncAnnotScan();

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 ,
Aug 01, 2014 Aug 01, 2014

Copy link to clipboard

Copied

Hi Again,

Thanks for replying so fast. I now tried the below code as you suggested but it still gave a syntax error. I am copying/pasting all information from the console:

// Assume that the stamp is the only

// annot on the page

this.syncAnnotScan();

var annt = this.getAnnots(this.pageNum)[0];

var props = annt.getProps();

for(var i=0;i < this.numPages;i++){

props.page = i;

if(i != this.pageNum)

this.addAnnot(props);

}

SyntaxError: syntax error

1:Console:Exec

undefined

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
Most Valuable Participant ,
Aug 01, 2014 Aug 01, 2014

Copy link to clipboard

Copied

Works fine for me. Make sure you select all the code, and just the code,

when you run it.

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 ,
Aug 01, 2014 Aug 01, 2014

Copy link to clipboard

Copied

Hi again,

Thanks a lot - didn't realize that - such a silly thing. It works perfectly now and will save me a couple of hours work every month.

Cheers!

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 ,
Dec 23, 2014 Dec 23, 2014

Copy link to clipboard

Copied

How do you adjust for current page rotation and default user space?

Thanks.

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
Most Valuable Participant ,
Dec 24, 2014 Dec 24, 2014

Copy link to clipboard

Copied

Only with a script.

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 ,
Jul 08, 2016 Jul 08, 2016

Copy link to clipboard

Copied

I get the below error msg

[Markup    1 0c54b1bf-eb32-4c4d-921e-ade99cd1a898]

when I try to run the code in console

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 ,
Jul 08, 2016 Jul 08, 2016

Copy link to clipboard

Copied

That's not an error message, at least not a complete one. Is there any more?

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 ,
Jul 10, 2016 Jul 10, 2016

Copy link to clipboard

Copied

Sorry... it gives the mark up message but works fine...

But is there any way I can add this to custom calculation script of a particular stamp. I have a dynamic stamp with some details... I want that to be sealed in all pages when the user stamps it in document. They may not be able to run the script in console individually.

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 ,
Jan 12, 2020 Jan 12, 2020

Copy link to clipboard

Copied

Complete Solution of Stamping Multiple pages of PDF in just single Click

 

http://all4u.com.pk/how-to-stamp-multiple-pages-in-pdf/ 

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 ,
Oct 04, 2019 Oct 04, 2019

Copy link to clipboard

Copied

Thanks for posting. The above code works.

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