Print Page | Close Window

Update Author Metadata from Dynamic Stamp Field

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: JavaScript
Forum Description: Discussions relating to the use of JavaScript within PDF.
URL: http://forums.planetpdf.com/forum_posts.asp?TID=1231
Printed Date: 13 Dec 2019 at 3:55am
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


Topic: Update Author Metadata from Dynamic Stamp Field
Posted By: mhoney
Subject: Update Author Metadata from Dynamic Stamp Field
Date Posted: 29 Jun 2014 at 11:34am
Hi,

I am hoping you might be able to give me some guidance.  

I have a script which places a dynamic stamp graphic onto a pdf document.  

The stamp has a series of fields on it (populated by a dialog box) and when the stamp is placed the fields are no longer accessible.

What I need to do is store one of the fields (invoiceNo) into the document metadata author field.  

However the dynamic stamp is contained in it's own document and I cannot access the field from the document being stamped.

For example (to make it clearer):  

The dynamic stamp template name is dynStamp.pdf.  

I am applying the stamp to a document called invoice.pdf.  A dialog box field called invoiceNo populates a field on the stamp before it is placed.

I need to write the invoiceNo data to the Author metadata field on the main document being stamped.  The issue I am having is that if I try to do it with code in the stamp file it is referring to the stamp file document rather than the invoice.pdf document. I can't seem to bring across the information to the pdf file being stamped.

If you could offer some advice that would be great.

Thanks.


-------------
Michael.



Replies:
Posted By: gkaiseril
Date Posted: 29 Jun 2014 at 5:32pm
Hard to tell without seeing the code you are using in your stamp.
 
It is certainly possible to update fields within a stamp from the identity object and field objects, but this only occurs before the stamp is placed. Once placed the stamp contents are flattened. So you need to make sure the needed fields are filled in before placing the stamp or prompting for the missing data.
 
http://acrobatusers.com/tutorials/dynamic_stamp_secrets - Dynamic stamp secrets  by Thom Parker
 
He also has a book about PDF stamps for sale on Amazon.


Posted By: mhoney
Date Posted: 06 Jul 2014 at 12:07pm
Hi  gkaiseril,

Thanks so much for your assistance.  I managed to solve the problem by using event.source.source which effectively is like a link to the document being stamped.

Pretty much what I was trying to do was trigger a dialog box before the stamp is placed and send information (the invoice number from the dialog box) back to the title metadata on the file being stamped (which all occurs before the stamp is turned into a final graphic).

All is working much to my joy!...I actually have the book by Thom Parker called All About Stamps in Acrobat but will definitely check out the one more specific to Dynamic stamps (I wasn't aware of that book).

Thanks for your direction, it really helps.  Some of these techniques in Acrobat have quite powerful applications in business and really helping me.

Michael.


-------------
Michael.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net