How To Make A Dynamic PDF Stamp

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi this is David at PDI automation station in the last video I showed you how to make a static PDF stamp from scratch and you're looking at it right here it's just a one-page PDF but it is a template and that's how we get a stamp in this video I'll show you how to add some dynamic fields to that stamp the first thing I'm going to do is add those fields I'm going to press shift ctrl 7 to go into form editing mode then I'm going to select the text amp and I'll just add 4 text fields to this PDF I'm going to put the fourth one over here and I'm going to expand these and here's a little trick to to resize a bunch of fields just select them all and right click on the one that you want the size to be like and then you'll see set fields to same size you can do height width or both I'll just do both and then I'm gonna rename these fields I'm just gonna resize that one so let me go into the properties the general tab for the name this is where my scripts gonna go so I'm just gonna call this field script and you can name these fields whatever you want but it's a good idea for scripting if you name them something that's easy to remember that coincides with the stamp so in this one I will put a mount and notice I don't have to close and open this properties box every time I can just click on the next field and you see the name change there so this one I'm going to call approve and the last one I'll just call that date so what we're gonna do is we're gonna have a user response to fill in the amount approved by is going to pull from the Adobe identity automatically and the date we're gonna have it insert today's date automatically so if you go to the identity you can go to edit preferences identity or you could simply press ctrl K in Windows the preferences come up you see the identity and we're gonna pull this right here name which is David Dee next thing I'm gonna do is show you my script that I have for this calculation script in a text file and it's always going to start like this with a stamp you have an if statement with two statements inside there you have a vent dot source dot for real which means that just means there's a stamp that's in action right now and you also have a vent source that stamp name that means it's a specific step and this step name is actually the AP or appearance of the stamp it says X X that's not what it is I'm going to show you how to get time we'll just paste it in there there's a couple ways you can get that if you open the console while you're in this template or stamp file press ctrl J I'm just gonna type this dot template templates this template and run that script it says object template equals hash tag my test step equals my test step this my test step is the the name of the stamp and this is the AP which is what we're looking for so I'm gonna copy that confusing cuz it's the parents or the AP but in the script it says stamp name I'll just paste that there and I'm gonna close this console I can show you another way also to get that name so you just went to a different document here and I'm actually gonna stamp that my stay of category here's the stamp I'll just go ahead and stamp with that static stamp I will now select it you can see it's selective I'll open the console again and I get it tight this selected nots square brackets with a zero period ap selected or not means the annotation or the stamp that's selected the zero means it's the first one selected it's actually the only one but you can select five and then decide which one you're talking about here so there's only one selected so it's zero period capital ap I'll run that and you see the same result hashtag my test in let's go back here and let's go I'm gonna exit control or feel that any mode shift control seven and I'm gonna go back to the tax file file so let's do the the identity first the name so put this jet field approved period value equals just type identity period name let's do the date [Music] tell you again of that field equals and this is how you get today's data in a specific format type util period print D bracket and then this is the format in the quote so I'm gonna go month slash day slash full year for wise comma then just click this is the date object due date brackets and then one more breath to close out that state so now let's do the respond for the amount so the user so it'll be a pop-up respond to when the user selects that stamp so again I'm gonna go this cap field this time is value equals three spots and what I have inside these quotations is just the label on that response field so I'll just put a mount cold quotes and that should do it let me select all this control a copy at control C and then let's just put that into this this a custom calculation in this field I could do it in one of these fields but then instead of this died get field I would put event died value but I like to keep all my scripts in a separate field so let's go edit and paste ctrl V save that close it and I'm gonna save the staff now I'm just gonna click this Save icon here go back to my blank let's delete this I don't need it let's restate that and see what happens and there's my amount pop-up which is put one thousand dollars and there you see my one thousand dollars my identity that pulls from the Preferences from the name and then you see today's date right there I'm going to show you something else that might happen here this is kind of an issue with the response box if I put cancel and I end up still with my name and still with the date but it says the amount is null we don't want that in the stamp there's a couple things you can do there we can go back and change our script write an if statement that says don't put anything here if if the response is null or another way is we could put a custom format script into this amount field so go on format and custom edit I'm just gonna put equals nothing blank that is my right put some quotes around this there so that worked so if you click in this field that's the value as null but it's gonna display nothing which is perfect right so I'll save that go back to the step let's do it again and I will put a number 44 can you see the number 44 let's stamp it again I'm gonna cancel this so it should say no in there but it says nothing in there and that's what we want and that's all there is to it yeah thanks for watching see you next time
Info
Channel: PDF Automation Station
Views: 146,133
Rating: undefined out of 5
Keywords: Adobe, Acrobat, PDF, Dynamic, Stamp, Popup, Automatic, Date, Identity
Id: DePWr_1lnYg
Channel Id: undefined
Length: 10min 37sec (637 seconds)
Published: Wed Nov 14 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.