These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Need help with custom editable interactive Stamp/form

jones
Registered: May 27 2011
Posts: 12

having a slight problem that i don´t seem to be able to figure out.
 
I have to stamp pdf drawings regulary with custom editable stamp.
 
The form/stamp/interactive stamp has custom graphics behind
and have to include these fields.

Date field: editable or automatic. doesn´t matter
Docum. No. field: Editable
Revision No. field: Editable
and then couple of Check boxes.
 
The way i have done this so far is that i just made a editable
form... fill it out, save it as tiff, then copy/paste to the pdf drawing.
 
Would be nice if it was possible to make kinda interactive stamp or sum
of it..
click the stamp, Fillout the information needed and choose location for the
stamp on the drawing..
  
hope some could help me out..
 
Best regards..
David

My Product Information:
Acrobat Pro 10.0.2, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Have you read this article?
http://acrobatusers.com/tutorials/2007/02/dynamic_stamp_secrets

Stamps are not directly editable. The image on the stamp is just that, an image. The stamp file can contain interactive fields that are set before the stamp is flattened and applied to a document. But once applied the stamp data is set in stone.

Not to say there aren't lots of stamp tricks that can make it seem as if the stamp is more editable for dynamic than it really is. For example, the stamp data could be stored in the stamp contents so that an automation tool has access to the original data. The automation tool can display a popup dialog to the user for collecting new data, or modifying the old, then delete the old stamp and create a new one with the new info. To the user it appears as if the stamp was modified, but in reality it was deleted and replaced.

Watch the "Stamps Gone Wild" video at www.pdfscripting.com

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

jones
Registered: May 27 2011
Posts: 12
Thanks for the answer.
Im gonna check out that article and have a look at the video to see if it helps

This sounds like something close to what i was thinking.
Just the question how to make it happen :)

thomp wrote:
For example, the stamp data could be stored in the stamp contents so that an automation tool has access to the original data. The automation tool can display a popup dialog to the user for collecting new data, or modifying the old, then delete the old stamp and create a new one with the new info. To the user it appears as if the stamp was modified, but in reality it was deleted and replaced.
I didn´t mention it.. but the fields on the stamp would just have to be editable
at first... when on the pdf drawing they should be Static..

best.
David
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Building a dynamic stamp that display a popup dialog for entering data is not too difficult of a task, it's all in the article.

Integrating that stamp with an automation tool is a different story. That takes a bit more work and some awkward steps. If you're interested, detailed info and examples are a available at the website in my signature block.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

jones
Registered: May 27 2011
Posts: 12
Thanks alot for your help..

I´m nearly there.
- I´ve added Automatic Date field.
- The document name is now automaticly being picked up from the name of the doc. the stamps beying put on.
- The revision No. is filled out in a pop up when inserted.

So that only leaves out the Check boxes i need to have in,
could you point me the right way regarding those?

also one thing.. The document name is autom. filled out. xxxxxxx.pdf is it possible
to make it so it leaves out the ".pdf" the file extension info?

Best regards
David

thomp wrote:
Building a dynamic stamp that display a popup dialog for entering data is not too difficult of a task, it's all in the article.Integrating that stamp with an automation tool is a different story. That takes a bit more work and some awkward steps. If you're interested, detailed info and examples are a available at the website in my signature block.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The document name is just a string. Use standard string operators to slice off the ".pdf".
See this article: http://acrobatusers.com/tutorials/2006/string_splitting.

Check boxes are more complicated. The app.alert box will display a single check box.
see this article: http://acrobatusers.com/tutorials/2006/popup_windows_part1

But if you need something more complex you'll have to go with a custom dialog.
see this article: http://acrobatusers.com/tutorials/2006/popup_windows_part5




Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

jones
Registered: May 27 2011
Posts: 12
Im not at all well into Javascripting ;)

For the field, i have this code already
event.value = event.source.source.documentFileName;

Should i add those to the end of the code
var fileExt = myFilename.split(".").pop(); or
var fileNmRoot = myFilename.split(".").shift();

Don´t seem to do anything for me.. well .. it probably splits up the text
so i need another line of code to take off the ext. right?

thomp wrote:
The document name is just a string. Use standard string operators to slice off the ".pdf".
See this article: http://acrobatusers.com/tutorials/2006/string_splitting.

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
try this:

event.value = event.source.source.documentFileName.split(".").shift();

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

jones
Registered: May 27 2011
Posts: 12
Thankx for the answer..

I had figure it out..
Did it like this.

var fileNm =event.source.source.documentFileName;

event.value = fileNm.split(".").shift().substr(0,18);



thomp wrote:
try this:event.value = event.source.source.documentFileName.split(".").shift();
jones
Registered: May 27 2011
Posts: 12
maby one thing you could help me out with..

It´s all working fine..
unless the automatic date field.

I have many users and they are using different versions of Acrobat.
It´s working fine in Acrobat X.
but the date is not beying picked up in Acrobat 8 for example.

using this code.
event.value = (new Date()).toString();
AFDate_FormatEx("yyyy.mm.dd");

any ideas?

Best David
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Don't use the that format function!

Use the regular date formating

event.value = util.printd("yyyy.mm.dd", new Date());

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

kezzie
Registered: Jul 20 2011
Posts: 1
Hi Thom
I've signed up just so i can get your expertise!! I'm trying to create a custom interactive stamp in 9.0 pro where I can enter a field and then stamp the pdf. All i need is the Java Script. A lot of this is very forein to me, and all looks like jibberish. I am the only user who will use the stamp. I just need the stamp to have a field that asks for the "Document Number" where i can add a unique doc number and then stamp. Can you help me???
jones
Registered: May 27 2011
Posts: 12
Hi.

Thomp is the end of all needs :) he´s been a great help to me..

you can at least have it two ways..
You can make the stamp automaticly pick up the doc. number, if the real document name is the same as the document number should be.
or you can make the stamp give you a pop up that asks for the document number and write it in the given field..

best regards.
David


kezzie wrote:
Hi Thom
I've signed up just so i can get your expertise!! I'm trying to create a custom interactive stamp in 9.0 pro where I can enter a field and then stamp the pdf. All i need is the Java Script. A lot of this is very forein to me, and all looks like jibberish. I am the only user who will use the stamp. I just need the stamp to have a field that asks for the "Document Number" where i can add a unique doc number and then stamp. Can you help me???
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Have your read this article? Dynamic Stamp Secrets? It covers everything you need to know to create such a stamp. The script you need is provided in the article. However, scripting does require some skill. Not a great deal, but you will have to spend some time learning how to use JavaScript.


Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

jones
Registered: May 27 2011
Posts: 12
Thomp two little things you could maby help me out with..

The way the stamps are categorised. The stamps goes under their Category.
Is it possible the have them like.. Category/sub category/Stamps..
Because i have stamps for one particular thing / loads of persons / and six stamps per person... and also couple of other kind of stamps.. so it would be nice beying able the divide them into folder according to type..


one thing also... Each stamp has it´s name, In acrobat 7 those names appear under the stamps. but in Acrobat X they don´t appear..
is there some setting that allows me to choose if they should be seen or not?

best Regards
David



thomp wrote:
Have your read this article? Dynamic Stamp Secrets? It covers everything you need to know to create such a stamp. The script you need is provided in the article. However, scripting does require some skill. Not a great deal, but you will have to spend some time learning how to use JavaScript.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Unfortunately the stamps categories have only a single level of hierarchy. It's been like that for a long time. You should see my stamps list, it covers the screen and I have to scroll the menus.

Acrobat X changed a great number of things in the Acrobat UI. They didn't do a very good job with stamps, the names are just one thing, there are others.

If you're interested in really getting into this, then sign up at www.pdfscripting.com. There are articles and examples that cover just about every aspect of PDF stamps, including automating the application of specialty dynamic stamps. Much of is targeted at the Architecture/Engineering/Manufacturing industries.

Take a look at the Stamps Gone Wild video.


Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

jones
Registered: May 27 2011
Posts: 12
thomp wrote:
Unfortunately the stamps categories have only a single level of hierarchy. It's been like that for a long time. You should see my stamps list, it covers the screen and I have to scroll the menus.Acrobat X changed a great number of things in the Acrobat UI. They didn't do a very good job with stamps, the names are just one thing, there are others.

If you're interested in really getting into this, then sign up at www.pdfscripting.com. There are articles and examples that cover just about every aspect of PDF stamps, including automating the application of specialty dynamic stamps. Much of is targeted at the Architecture/Engineering/Manufacturing industries.

Take a look at the Stamps Gone Wild video.
Hi again...
Always new problems ;)

I´ve made the stamp to my likings and all´s working fine.
6 checkable checkboxes, Date that´s manually typed in
And the document name is automaticly picked up from the doc name
and split up to document name and revision no:

But now people need the same stamp but the document name is going to change.
More letters and won´t be split up.

So is there some way i could solve this without having two stamps?
Would it be possible when the stamp is beying inserted to choose for that field
weither to use this script or another one?

best regards
David... and thanks for all the help above


thomp
Expert
Registered: Feb 15 2006
Posts: 4411
jones wrote:
So is there some way i could solve this without having two stamps?
Would it be possible when the stamp is beying inserted to choose for that field
weither to use this script or another one?
Yes, it's called an "if" statment. But you need some condition to use for the decision. May be an input on the UI that's displayed when the stamp is applied.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

jones
Registered: May 27 2011
Posts: 12
thomp wrote:
jones wrote:
So is there some way i could solve this without having two stamps?
Would it be possible when the stamp is beying inserted to choose for that field
weither to use this script or another one?
Yes, it's called an "if" statment. But you need some condition to use for the decision. May be an input on the UI that's displayed when the stamp is applied.
Guess i have to dig around a little..

So for example, if i had 2 invisible checkboxes. If the 1st is checked go with that script for the other field and vice versa.. Or probl. some other more simple way.

best David
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
One check box will do.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

jones
Registered: May 27 2011
Posts: 12
thomp wrote:
One check box will do.
Solved it with documentFileName.length since the filenames had different lengths..

Thanks anyway...
Best
David
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Good Job!! that's the kind of thing you need to be looking for. Another related option would be to test the format of the file name with a regular expression.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

Daniel J Cox
Registered: Mar 27 2009
Posts: 1
Is it possible to edit or clear a digital signature once it has already been placed in the Dig Sig Field?

I have several co-workers that are just opening the dynamic PDF, filling out their fields and then digitally signing the form. The only problem is that the dynamic PDF has now been "overwritten" so the "blank dynamic" form that was on the server contains the information of that one person.

Did that question make any sense?

Help in Washington DC.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The main use for a digital signature is to Lock a file down. The signature doesn't necessarily block a user from making changes, instead it is a way to verify the file has not changed since signing, and track any changes that have been made.

Forms, and especially Dynamic LiveCycle forms, that are changed after signing are a real problem for the whole digital signature concept. Generally, forms should not be changed after signing, and clearing a signature basically invalidates the document. It can be done, but it defeats the purpose of signing the doc in the first place, so it should only be done when validation is not important. For example, if a previously signed document needs to be analyzed and marked up. In this case the doc in being put back into a working process and the signature gets in the way.

It is possible to clear a signature with a simple reset operation. But there's a catch. The signature can only be reset by the owner of the signature. If this is not possible, then there is another way. I wrote a plug-in for just this purpose, but it's not free. It's available for download by members at www.pdfscripting.com


Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script