Dynamic Stamps: Correct way to clone and edit

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
M P
User
Posts: 8
Joined: Thu Dec 01, 2016 10:42 am

Dynamic Stamps: Correct way to clone and edit

Post by M P »

Hello PDF XChange Community,

I have a dynamic custom stamp with javascript which I like to copy and slightly modify the copy.

If I copy just the stame file in
%appdata%\Tracker Software\PDFXEditor\3.0\Stamps

and then modify it, every time I select the new stamp the old
stamp is placed. I assume there is an ID insde the file? Can I modify this ID?

If I use Stamp Pallett->New->"Stamp from File" or "Stamp from active document" the form fields
and the javascript is lost.

I'm shure this problem is not new but I didn't find anything in the forums.

Greetings
Michael
lev
User
Posts: 258
Joined: Fri Apr 11, 2014 1:18 am

Re: Dynamic Stamps: Correct way to clone and edit

Post by lev »

Michael,

Here's a brief step-by-step:
  • Backup you existing stamp collection
  • Import your stamp (all fields will be stripped upon import)
  • Open your stamp collection located at C:\Users\[username]\AppData\Roaming\Tracker Software\PDFXEditor\3.0\Stamps
  • Copy and paste all fields from your original stamp into the one in your stamp collection
  • Make sure there's

    Code: Select all

    console.println("Stamp Name:" + event.source.stampName);
    line at the top of the script
  • Save your stamp collection (I add -1 at the end of the original file name since saving with the same name is not an option)
  • Delete file with your original stamp collection (the one without -1 at the end)
  • Open Editor and open the Javascript window (Ctrl+J)
  • Stamp a document with your new stamp. Copy stamp name from the Javascript window to the clipboard
  • Open your stamp collection
  • Open the script and change stamp name to the the one in the clipboard. Look for

    Code: Select all

    event.source.forReal && (event.source.stampName ==
  • Save your stamp collection (delete -1 at the end of the file name)
  • Delete file with -1 at the end of the name
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8592
Joined: Wed Jan 03, 2018 6:52 pm

Re: Dynamic Stamps: Correct way to clone and edit

Post by TrackerSupp-Daniel »

Hi, All

Thank you, Lev, for providing those instructions, Hopefully they can help many others.

Have a great day!
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply