Dynamic stamp file name
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 15
- Joined: Mon Mar 18, 2024 3:25 pm
Dynamic stamp file name
Hi,
I have a question about dynamic stamps. I have created a dynamic stamp with a text box, like they did in this video;
https://www.youtube.com/watch?v=qOALVMeasKY
I used this code to get the first part of the file name in the text box;
var fileName = this.documentFileName;
var firstPart = fileName.split('_')[0];
event.value = firstPart;
The code works for the file I made it in, but when I use the stamp in a different file it still returns the file name of the file I created the stamp in. Can anyone help me with how I can make the stamp working for all documents?
Best regards,
Evie
I have a question about dynamic stamps. I have created a dynamic stamp with a text box, like they did in this video;
https://www.youtube.com/watch?v=qOALVMeasKY
I used this code to get the first part of the file name in the text box;
var fileName = this.documentFileName;
var firstPart = fileName.split('_')[0];
event.value = firstPart;
The code works for the file I made it in, but when I use the stamp in a different file it still returns the file name of the file I created the stamp in. Can anyone help me with how I can make the stamp working for all documents?
Best regards,
Evie
-
- Site Admin
- Posts: 1797
- Joined: Mon Jan 15, 2018 9:01 am
Re: Dynamic stamp file name
Hi Evie,
Welcome to our forum.
Can you provide us with a copy of the stamp file you created, if possible?
Regards.
Welcome to our forum.
Can you provide us with a copy of the stamp file you created, if possible?
Regards.
-
- User
- Posts: 15
- Joined: Mon Mar 18, 2024 3:25 pm
Re: Dynamic stamp file name
Hi,
I have now included the file, I hope this is what you requested.
Best regards,
Evie
I have now included the file, I hope this is what you requested.
Best regards,
Evie
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Dynamic stamp file name
Hello Evie,
Please try with
var fileName = event.source.documentFileName;
When you are using "this" - you get the name of the file where that code is located - your stamp collection.
When using the event.source - you get the name of the file in which that event was triggered - your target document
Kind regards,
Stefan
Please try with
var fileName = event.source.documentFileName;
When you are using "this" - you get the name of the file where that code is located - your stamp collection.
When using the event.source - you get the name of the file in which that event was triggered - your target document
Kind regards,
Stefan
-
- User
- Posts: 15
- Joined: Mon Mar 18, 2024 3:25 pm
Re: Dynamic stamp file name
Hi Stefan,
So that means the new code is
var fileName = event.source.documentFileName;
var firstPart = fileName.split('_')[0];
event.value = firstPart;
is that correct?
Because when I use that code, I get the following error; \Console:Exec:1: TypeError: event.source is null.
Can you tell me what I did wrong?
Best regards,
Evie
So that means the new code is
var fileName = event.source.documentFileName;
var firstPart = fileName.split('_')[0];
event.value = firstPart;
is that correct?
Because when I use that code, I get the following error; \Console:Exec:1: TypeError: event.source is null.
Can you tell me what I did wrong?
Best regards,
Evie
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Dynamic stamp file name
Hello Evie,
Can you please share with us the stamp collection that you are creating - not just the file with the stamp already placed on it?
I'd like to take a look at that stamp and the code inside of it and should be able to advise further after that.
Kind regards,
Stefan
Can you please share with us the stamp collection that you are creating - not just the file with the stamp already placed on it?
I'd like to take a look at that stamp and the code inside of it and should be able to advise further after that.
Kind regards,
Stefan
-
- User
- Posts: 15
- Joined: Mon Mar 18, 2024 3:25 pm
Re: Dynamic stamp file name
Hi Stefan,
How do I share that?
Best regards,
Evie
How do I share that?
Best regards,
Evie
-
- Site Admin
- Posts: 6903
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
Re: Dynamic stamp file name
Hi, Evie
There are two places the stamps are stored, per machine and per user locations. See here for details: https://www.pdf-xchange.com/knowledgeba ... ers-to-use
You can just copy the PDF n the stamps folder and send it to us:
Kind regards,
Paul - Tracker Supp
There are two places the stamps are stored, per machine and per user locations. See here for details: https://www.pdf-xchange.com/knowledgeba ... ers-to-use
You can just copy the PDF n the stamps folder and send it to us:
Kind regards,
Paul - Tracker Supp
You do not have the required permissions to view the files attached to this post.
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
-
- User
- Posts: 15
- Joined: Mon Mar 18, 2024 3:25 pm
Re: Dynamic stamp file name
Hi,
This is the file I made for the stamp, but this is the same one I shared earlier. So I might have done it wrong.
Best regards,
Evie
This is the file I made for the stamp, but this is the same one I shared earlier. So I might have done it wrong.
Best regards,
Evie
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Dynamic stamp file name
Hello Evie,
Apologies - I saw the file with the background and I thought that this was a file where you've already placed the stamps.
Turns out you would actually need event.source.source.documentFileName.
Please check the attached updated copy of your file (place it in your %Appdata%\Tracker Software\PDFXEditor\3.0\Stamps folder).
The first field would now correctly display the name of the target file when you use that stamp over another document opened in the Editor.
Kind regards,
Stefan
Apologies - I saw the file with the background and I thought that this was a file where you've already placed the stamps.
Turns out you would actually need event.source.source.documentFileName.
Please check the attached updated copy of your file (place it in your %Appdata%\Tracker Software\PDFXEditor\3.0\Stamps folder).
The first field would now correctly display the name of the target file when you use that stamp over another document opened in the Editor.
Kind regards,
Stefan
You do not have the required permissions to view the files attached to this post.
-
- User
- Posts: 15
- Joined: Mon Mar 18, 2024 3:25 pm
Re: Dynamic stamp file name
Hi Stefan,
No worries. I have copied the file you send to the right place, but when I place the stamp on another document it still returns the name of the stamp document.
I also have another question about the stamp. I have now made de stamp om the picture, but I would like the stamp to be only the text box. Is that possible? I did see the option to make a stamp out of the part you selected, is that the right way?
Best regards,
Evie
No worries. I have copied the file you send to the right place, but when I place the stamp on another document it still returns the name of the stamp document.
I also have another question about the stamp. I have now made de stamp om the picture, but I would like the stamp to be only the text box. Is that possible? I did see the option to make a stamp out of the part you selected, is that the right way?
Best regards,
Evie
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: Dynamic stamp file name
Hello Evie,
Yes - you can customize your stamp and remove anything but the form field if that is all you want!
Please find attached a new sample of your stamp.
Please place that in
%Appdata%\Tracker Software\PDFXEditor\3.0\Stamps
Then restart the Editor and after that try to actually use the stamp in a document.
The initial preview would indeed show you the long string text, however once you place that on the document's page - it should display the correct document name!
This is the preview for me: And this is the result once the stamp is actually placed on the page:
Kind regards,
Stefan
Yes - you can customize your stamp and remove anything but the form field if that is all you want!
Please find attached a new sample of your stamp.
Please place that in
%Appdata%\Tracker Software\PDFXEditor\3.0\Stamps
Then restart the Editor and after that try to actually use the stamp in a document.
The initial preview would indeed show you the long string text, however once you place that on the document's page - it should display the correct document name!
This is the preview for me: And this is the result once the stamp is actually placed on the page:
Kind regards,
Stefan
You do not have the required permissions to view the files attached to this post.
-
- User
- Posts: 15
- Joined: Mon Mar 18, 2024 3:25 pm
Re: Dynamic stamp file name
Hi Stefan,
It works now, thank you so much for your help!
Best regards,
Evie
It works now, thank you so much for your help!
Best regards,
Evie
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London