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

Print user ID/date on the top of each page

gamalmostafa
Registered: Jun 28 2009
Posts: 5
Answered

We are working within regulated industry so we have to control our documents, after creation the documents we post them in shared directory and allowing the company users to access these document and print it, so what should i do to make users ID and date printed on the top of each page. thanks for help.

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
This will require you have a standard installation that inlcude having each user's system to have a special application folder level script installed on their system. This special file is need to obtain the loginid of the user when Acrobat/Reader is started, as this is the only time one can capture this data. See [url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=945]Security settings prevent access to this property or method[/url] for one method on how to create this application level script.

You can use the 'Will Print' document action to fill in form fields or add a watermark from text using Acrobat JavaScript or fill in the fields or create the watermark from text at the opening of the PDF.

George Kaiser

gamalmostafa
Registered: Jun 28 2009
Posts: 5
Thanks gkaiseril, but sorry i am not IT specialist i am just regular user to adobe, can you explain to me more, is it possible?
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
For all of this scripting and form field creation, you will need Acrobat 6, 7, or 8 Professional or Extended or Acrobat version 9 any version. You can not create the documents in Reader.

See [url=http://www.acrobatusers.com/tutorials/2006/folder_level_scripts]Entering Folder Level Scripts[/url] by Thom Parker on how to enter the linked document level script that I provided.

See [url=http://www.acrobatusers.com/tutorials/2007/07/js_document_scripts]Entering Document Scripts[/url] by Thom Parker for information on entering a document level script.

You can add a text watermark with the following document level code:
// define the inch measurement in pointsvar fPointInch = 72;// get loginName from folder level Identity arrayvar cUserID = Identity['loginName'];// get the current date from the system// and format like 'Jan 1, 1970'var cNow = util.printd('mmm d, yyyy', new Date());this.addWatermarkFromText({// create text to appearcText: 'Date: ' + cNow + ' Userid: ' + cUserID,// define some of text optionsnFontSize: 12, // font size in pointsnTextAlign: app.constants.align.right,nHorizAlign: app.constants.align.right,nVertAlign: app.constants.align.toP,// position 1/4 (0.25)inch from the upper right marginnHorizValue: -(0.25 *fPointInch), nVertValue: -(0.25 * fPointInch),// hide displaybOnScreen: false,// for print onlybOnPrint: true});this.dirty = false; // suppress file save on close

George Kaiser