What i want:
I would like to create a stamp where the user can decide whether it is transparent or not.
My idea:
The finished stamp has already a dynamic date field which offers the possibility to change the format via user form. In addition, I would like to insert a white rectangle on a new layer ("BG") in the background and then control it via script.
Is it even possible to control the layer (on/ off) after placing and before inserting the stamp?
Stamps and Layers
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 10
- Joined: Wed Jun 19, 2024 7:02 am
Stamps and Layers
----
Thanks 4 @ll
Ralph
Thanks 4 @ll
Ralph
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Stamps and Layers
Hello rkanther,
Wouldn't it be much easier if you just have two variants of the stamp - one with and one without the transparent background that you plan to add? Doing it via JS might be possible however I do not think you can control the visibility of non field elements of a dynamic stamp - so it would really be much simpler if you just have two versions of the stamp.
Kind regards,
Stefan
Wouldn't it be much easier if you just have two variants of the stamp - one with and one without the transparent background that you plan to add? Doing it via JS might be possible however I do not think you can control the visibility of non field elements of a dynamic stamp - so it would really be much simpler if you just have two versions of the stamp.
Kind regards,
Stefan
-
- User
- Posts: 10
- Joined: Wed Jun 19, 2024 7:02 am
Re: Stamps and Layers
Hello Stefan,
It is certainly easier for one stamp at the moment. At the moment it was only a technical consideration whether it would work at all. If you have a lot of stamps and have to keep two variants for everything, it becomes confusing and no longer maintainable.
Ralph
It is certainly easier for one stamp at the moment. At the moment it was only a technical consideration whether it would work at all. If you have a lot of stamps and have to keep two variants for everything, it becomes confusing and no longer maintainable.
Ralph
----
Thanks 4 @ll
Ralph
Thanks 4 @ll
Ralph
-
- Site Admin
- Posts: 11345
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Stamps and Layers
Hello, rkanther
You can certainly try, but as Stefan said, I am unsure if this is possible to accomplish with the JS access stamps have. You can learn more about using JS in PDF context here: https://opensource.adobe.com/dc-acrobat ... croJS.html
Kind regards,
You can certainly try, but as Stefan said, I am unsure if this is possible to accomplish with the JS access stamps have. You can learn more about using JS in PDF context here: https://opensource.adobe.com/dc-acrobat ... croJS.html
Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- User
- Posts: 606
- Joined: Thu Jun 19, 2014 7:30 pm
Re: Stamps and Layers
Take a look at the examples with the library I posted here:rkanther wrote: ↑Wed Jun 25, 2025 7:35 am What i want:
I would like to create a stamp where the user can decide whether it is transparent or not.
My idea:
The finished stamp has already a dynamic date field which offers the possibility to change the format via user form. In addition, I would like to insert a white rectangle on a new layer ("BG") in the background and then control it via script.
Is it even possible to control the layer (on/ off) after placing and before inserting the stamp?
viewtopic.php?t=45879
If you put annotations into the stamp, you can change their properties (ie transparency of a rectangle) during the stamp script.
The stamps in this example change the opacity of a background mask: viewtopic.php?p=192281#p192281
-
- Site Admin
- Posts: 2285
- Joined: Mon Jan 15, 2018 9:01 am
Re: Stamps and Layers
Thanks for the input, Mathew.
-
- User
- Posts: 10
- Joined: Wed Jun 19, 2024 7:02 am