Dynamic stamps for beginners PART-1: Name and Date

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
snarf2000
User
Posts: 4
Joined: Fri Dec 15, 2017 10:27 am
Contact:

Dynamic stamps for beginners PART-1: Name and Date

Post by snarf2000 »

OK, you want to create a Dynamic Stamp?
Here is how to do this with babysteps 😊

1-
First of all, create an image that
will be the canvas of your stamp.
In this example it’s created in
MS Word (size 6x4 cm).
1.png
With the sniping tool from Windows
select the space of your canvas. Make it as big as your stamp needs to be. It’s in the paste option now.
I use Irfanview (free photo editor) to paste in the image and save as a GIF transparant image.
(select the white color for transparancy.)

2- Now the PDF Xchange part begins.
Open PDFX and open the stamps pallette.
Create a new stamp from file and select you just saved image.
Give the stamp a nice name and save it in a new library.
If all is correct (with transparancy) the the stamp is slightly blue in the stamp pallette if you move your mouse over it.
Good job, on to the next step.

3- Now close PDFX and browse to the folder on your computer and locate:
"c:\Users\YOUR_USER_NAME\AppData\Roaming\Tracker Software\PDFXEditor\3.0\Stamps\53246532145184691649.pdf"
The numbered name of the PDF is different then mine 😊
Move this file and save it for example on your desktop folder.
(You can’t edit a stampfile when it is in use in PDFX)
Give it a new name so you know what file this is. Let name it “MyStamp.pdf”.


4- Now open PDFX and open the “MyStamp.pdf” from the desktop.
At this moment you can edit the stamp but it looks like it’s a regular PDF, and it is !
OK, let’s edit.

5- Insert a line in your stamp and add two textfields like i did.
2.png
2.png (13.8 KiB) Viewed 345 times
6- For testing purposes, save the pdf.
(It’s still located at the desktop)
Close PDFX and Copy the saved file to the stampfile location:
"c:\Users\YOUR_USER_NAME\AppData\Roaming\Tracker Software\PDFXEditor\3.0\Stamps\MyStamp.pdf"
Now open the PDFX and open a new blank file (CTRL-N and enter).
Go tot he stamptool and place your new stamp on the blank page.
In the stamp tool you will see that the two text-boxes are white ☹
Yes, these boxes are not transparent, but we will do this in the next step.

7- Lets make the text-boxes transparant.
Open the stampfile on the desktop and select one textbox.
Rightclick on it and click on properties.
Look for the fillcolor and select “None”, and repeat it fort he second textbox. Done.

8- Now more fun.
Go to Forms on top of PDFX en select Textbox
and place it next to “Name” and another textbox
next to Today’s date.
You will notice that there are Text1 and Text2
placed inside the fields.
3.png
3.png (14.52 KiB) Viewed 345 times
For now Save the file before losing some work.

9- Lets make the fields smart.
First select Text1 and rightclick to open properties (if it isn’t open allready)
almost at the bottom you will find: Value calculation: NONE.
Change that to “Custom Action.
If you did that, a step below there is now the option “Calculate action: Run a JavaScript”.
Click on the three dots at the right.
Now there is suddenly the “JavaScript Window” 😊
Past the folowing in this field next to 1.
event.value = identity.name; and click OK.
Next select the datefield en do the same as above.
Past in the text :
event.value = (new Date()).toString();
AFDate_FormatEx("dd-mm-yyyy");
and save your work.
Close PDFX, copy the dektop-file to the stamp location and overwrite the old file.
Open PDFX and test your stamp.
4.png
4.png (13.32 KiB) Viewed 345 times
Just a last few words:
If a stamp is placed on a PDF it will behave like an old rubber ink stamp.
It is FINAL, you can't edit the stamp when it is placed.
You couldn't do it also in the old days 😊
Snarfs Private Stamps.pdf
(8.77 KiB) Downloaded 21 times
COMMING UP: Dynamic stamps for beginners PART-2: Editable field(s)
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: Dynamic stamps for beginners PART-1: Name and Date

Post by TrackerSupp-Daniel »

Hello, snarf2000

Thank you for this post, did you know that we already have some KB articles with details on how to do this at the moment? Also, I should note that we are planning a "Dynamic stamp helper" feature for sometime during Version 10, so this process will be much easier in the future.

https://www.pdf-xchange.com/knowle ... p-Creation

Kind regards,
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