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

Changing DocumentID via JS

New Here ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

I have 2 custom stamp files that share the same DocumentID (I built one off the other). I'm unable to use both stamps at the same time and I believe it's because they share a DocumentID.

They both show up in the stamp menu, but when I select Stamp 2 the one that shows is Stamp 1. IT also shows Stamp 1's thumbnail where the second should be. If I remove Stamp 1 I can use the second stamp just fine.

Since I can't edit the DocID thru notepad (corrupts the pdf), how would I be able to do this via Javascript?

TOPICS
Acrobat SDK and JavaScript , Windows

Views

142

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 Expert , Jul 20, 2018 Jul 20, 2018

What makes a stamp a stamp is that it is marked as a page template. The stamp name is the first part of the page template name. This is what you need to change. There are different ways to do this. Acrobat automatically creates a new stamp name when you create a stamp using the built-in stamp tools.  If you just copy a file the stamp name remains the same.

So the easiest way to get your new stamp is to:

1. Move the stamp file out of the Acrobat Stamp folder.

2. Open acrobat and go to the Stamp Tool

...

Likes

Translate

Translate
Community Expert ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

The Document ID comes in two parts. Each time you save a PDF, one of the parts changes, so you can't have the same DocIDs.

More likely it's because the stamp names are the same. This is the same as the template name for the stamp page in the PDF. How exactly did you build the one from the other?  Did you edit the page template name for the stamp?

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
New Here ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

They have different "Titles" under document properties if that's what you mean by name.

I made changes to Stamp 1 and 'saved as' to a different PDF with a different title. Is there something else I need to change?

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 ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

What makes a stamp a stamp is that it is marked as a page template. The stamp name is the first part of the page template name. This is what you need to change. There are different ways to do this. Acrobat automatically creates a new stamp name when you create a stamp using the built-in stamp tools.  If you just copy a file the stamp name remains the same.

So the easiest way to get your new stamp is to:

1. Move the stamp file out of the Acrobat Stamp folder.

2. Open acrobat and go to the Stamp Tools

3. Select "Create" under the "Custom Stamp" menu

4. Load your file as the image for the stamp,

This will get you a new stamp name.

You can also do this by manually editing the file and changing the Template name.

Here's are some articles that discuss the details of manually manipulating stamps.

https://acrobatusers.com/tutorials/dynamic_stamp_secrets

PDF Stamp Annotations

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
New Here ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

LATEST

I appreciate your help. It looks like the page template name was they key.

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