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

Apply dynamic custom stamp on PDFs

New Here ,
Dec 30, 2019 Dec 30, 2019

Copy link to clipboard

Copied

Hi,

 

Is it possible to apply a dynamic custom stamp to every pages of a PDF file, print it, and then save it?

I already have the following working in javascript console, and I would like to be able to apply the following code to many PDFs not involving the javascript console so my user don't have to copy/paste the code in the javascript console.

 

for(var j=0;j < this.numPages; j++){
this.addAnnot({
page: j,
type: "Stamp",
author: "cyeung4",
name: "BERS Time Stamp",
rect: [454, 510, 538, 641],
AP: "#ZJ1LQSvWRiacxXY_xMhkgC" });
}

this.print({
bUI: false,
bSilent: true,
});

app.execMenuItem("Save");

TOPICS
Acrobat SDK and JavaScript

Views

74

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 Expert ,
Dec 30, 2019 Dec 30, 2019

Copy link to clipboard

Copied

If you have Acrobat Pro you can run that code on multiple files as a part of an Action, via Tools - Action Wizard.

It also has a built-in command for saving the file and printing it, although you can also do that in your script (not with the execMenuItem command, though).

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 Expert ,
Dec 30, 2019 Dec 30, 2019

Copy link to clipboard

Copied

The answer is Yes, and it looks like you already have a script to do it. Although I wouldn't use the Save menu item.

See this article on automation scripts for Acrobat.

 

https://www.pdfscripting.com/public/Automating-Acrobat.cfm

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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 Expert ,
Feb 14, 2020 Feb 14, 2020

Copy link to clipboard

Copied

LATEST

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