Stamps and Layers

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

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

rkanther
User
Posts: 10
Joined: Wed Jun 19, 2024 7:02 am

Stamps and Layers

Post by rkanther »

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?
----
Thanks 4 @ll
Ralph
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Stamps and Layers

Post by Stefan - PDF-XChange »

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
rkanther
User
Posts: 10
Joined: Wed Jun 19, 2024 7:02 am

Re: Stamps and Layers

Post by rkanther »

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
----
Thanks 4 @ll
Ralph
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 11345
Joined: Wed Jan 03, 2018 6:52 pm

Re: Stamps and Layers

Post by Daniel - PDF-XChange »

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,
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
Mathew
User
Posts: 606
Joined: Thu Jun 19, 2014 7:30 pm

Re: Stamps and Layers

Post by Mathew »

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?
Take a look at the examples with the library I posted here:
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
User avatar
Dimitar - PDF-XChange
Site Admin
Posts: 2285
Joined: Mon Jan 15, 2018 9:01 am

Re: Stamps and Layers

Post by Dimitar - PDF-XChange »

Thanks for the input, Mathew.
rkanther
User
Posts: 10
Joined: Wed Jun 19, 2024 7:02 am

Re: Stamps and Layers

Post by rkanther »

Thanks Mathew. I'll test it!
----
Thanks 4 @ll
Ralph
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Stamps and Layers

Post by Stefan - PDF-XChange »

:)