Add Curent Date & Time to PDF when Printed

This is my first post so please excuse any ignorance.
Basically we are in the process of creating electronic copies of SOP’s and putting them on our file server for all staff to access. Due to regulations, when these SOP’s are printed they would need to have the current date and time in which the SOP was printed, ideally like a watermark faded diagonally across the page but even if it was something on the bottom or top this would also do the trick.
It should read "Only Valid on Date of Printing - <Current Date><Current Time>
Could somebody please tell me if something like this is possible by incorporating JavaScript into the PDF.
Any assistance I would be grateful.
Thanks.
Keith.

GKaiseril
Thank you so much, I got it and it worked perfect courtesy of "hardDriver2". For anybody else who is looking to do this see below.
// Description: This script adds a text field to the left side of all
// pages. It also sets a doc level JavaScript that executes when the
// document is printed and fills the field with date.
// Add field to each page of form
var inch = 72;
for (var p = 0; p < this.numPages; p++) {
    // create rectangle quads for field
    var aRect = this.getPageBox( {nPage: p} );
    aRect[0] = 0.0;
    aRect[1] = 0.0;
    aRect[2] = 26.0;
    aRect[3] = 792;
    // now construct text field to fill with date information
    var f = this.addField("PrintField", "text", p, aRect )
    f.delay = true;
    f.textSize = 16;
    f.textFont = font.HelvB;
    f.textColor = color.black;
    f.alignment = "center";
    f.readonly = true;
    f.print = true;
    f.hidden = true;
    f.delay = false;
for (var p = 0; p < this.numPages; p++) {
    // rotate the text 
    var f = this.getField("PrintField." + p)
    f.rotation = 90;
// Adds a doc level script to populate text field when doc prints from
// Acrobat or the free Adobe Reader. Note: the '\r' character represents a
// carriage return.
var myWillPrintScript = 'var f = this.getField("PrintField"); \r' + 'f.hidden = false; \r' + 'var d = new Date(); \r' + 'var year = d.getYear()+1900; \r' + 'f.value = "THIS DOCUMENT ONLY EFFECTIVE ON " + (d.getMonth()+1) + "/" + d.getDate() + "/" + year; \r'
var myDidPrintScript = 'var f = this.getField("PrintField"); \r'
                           + 'f.value = ""; \r'
                           + 'f.hidden = true; \r'
// Now set the scripts to execute on the Will/Did Print events.
this.setAction("WillPrint", myWillPrintScript);
this.setAction("DidPrint", myDidPrintScript);

Similar Messages

  • How do you add a date/time stamp to photo before printing?

    How do you customize a photo?  I want to add a date to a photo before printing.

    Some Image Editors That Support layers:
    Photoshop Elements 11 for Mac - $79
    GraphicConverter - $40
    Rainbow Painter - $30
    Imagerie - $38
    Acorn - $50
    Pixelmator - $60 
    Seashore - Free
    GIMP for Mac - Free
    Xee 2.1 - free
    OT

  • TS4079 Why when I ask Siri to remind me does it not allow me to add a date/time to the reminder?

    I have recently started getting problems with my Siri. when I ask it to remind me, it takes the details but then doesn't allow me to add a date or time. It used to do that but no longer. What's the point in having a reminder that can't remind you?

    Toyita wrote:
    I have put the relationships of my closer friends and family to be used when making phone calls.  When I ask Siri to say "call my husband" for instance, it answers me "My name" I am not permitted to do so... Why is that? What am I doing wrong?  Location services are on, and it works with anything else.  I need it most for phone calls.  Please help.  I am using an iPhone5
    If my previous tip had not worked, the alternative is to make sure FaceTime is enabled under Settings > General > Restrictions. If Restrictions are Enabled, FaceTime must be toggled to ON.

  • Printing LOGIN ID, DATE, TIME in PDF

    How to automatically print login ID, date, time in PDF

    You can read the 'identity' object in JavaScript but as I said before, it's forbidden to access it from a script inside the PDF file - only during batch, console and application initialization events.

  • How can I make the current date/time be sent when emailing as XML?

    I'm creating a form for a customer to use for submitting print jobs. This customer will be emailing the XML form data, which will in turn be converted into a production order. I'd like to make the PDF form capture my customer's system time, so that I know when they filled out the form. I COULD just leave that up up the customer and use required current date and time fields, but that provides the ability for the customer to falsify that information.
    Is there any good way to capture the current date/time in the XML data, so that the customer doesn't need to nor has the ability to?
    Any suggestions would be great!

    You can use the following methods getHours(),getMinutes(), and getSeconds() from the date object to obtain the values for hour,minute,and second.
    Click here to see an example:
    http://66.34.186.88/LiveCycleSamples/.3bbc2f4b.pdf

  • Java code to show current date & time on PDF

    Hi,
    I have no experience with Java whatsoever and I am hoping somebody out there will be able to help me. Basically we are in the process of uploading all our SOP's to a public share on our Network. Due to regulatory reasons everytime the document is opened it will need to show the current date which will also show when printed. I have adobe 9 pro and see there is a area that you can input Java code so with the power of Java im sure this can be done. Ideally this would be like a watermark across all the page diagonally faded into the background of each page on the PDF.
    Only Valid on Date of Printing
    Date Printed: <Current Date>
    Any help would be much appreciated.

    Are you sure you haven't committed one of the cardinal sins of the Java-ignorant by confusing it with Javascript?

  • Automatically prompt to save PDF when Print Preview for Purchase Order?

    We recently upgraded to EP7.
    I have an end user that does our PO's.
    She swears up and down that she used to be able to go into any given PO, be it new or existing, and click on the print preview button. She says when she did this she was prompted to save or open the file.
    She is set to PDF Preview when doing a print preview of the PO.
    When we first upgraded the system, it was broken. When she tried to do this it would give you a Page Cannot Be Displayed error as in unable to find the page. We learned that there was an issue with name resolution within the system. We fixed this and now she can view the files as PDF when doing a print preview.
    But she still claims it did not used to work like this that when she went to preview she would be prompted to save or view which worked great for her because she could click save, save it to her computer, and then email it to whomever she needed to send it to.
    Seems clear to me that that when you do PDF Preview that an SAP browser session is created and sent to an web site (internal to SAP of course) to view the PDF. How can I tell SAP to give me the option to view or save?
    For now the user is repeating the output when she needs to reprint another copy of the PO.
    I should also say that we use Free PDF Creator. After setting her default printer to this, she says that now when she creates a new PO, it is working like before. So its possible that the prompt was the one from PDF Creator.
    The user says she swears she could simply print preview would allow her to save local. I never saw it for myself prior to the upgrade.
    Anyone seen this before or can offer any clues? Is there away to issue output at print preview?

    How did you fix 'page cannot be displayed' error?
    It looks like issue was at browser/pdfreader side.

  • How to automatically open date/time field (calendar) when end user tabs to that field

    Have two calendar fields...calendar 1 and calendar two
    Is there a way to have the calendars automatcally open when field is either clicked on or tabbed to?
    thanks

    You can try one work around:
    Add another UDF time with plain text field.
    Implement post-insert event handler to insert time value in this field. In the event handler you can write the code to put time in the format you want.
    regards,
    GP

  • Add current Date/Time to a database note?

    If we set the database note when we are loading the cube, what would be the syntax to set the current date/time?<BR><BR>For example...<BR><BR>ALTER DATABASE <NAME> SET NOTE <COMMENT><BR><BR>What would go in <COMMENT> in order to set current date/time?<BR><BR>Cheers!

    Hi Philip,
    There is an SAP formula variable to supply the current date in a formula. I think it is 0F_ADAY...install it from business content if you cannot see it in the query designer (formula box, under formula variables) and try using it.
    Hope this helps...

  • Size of text is too small for pdf when printed

    When I finished filling in the pdf - the text is too small when I printed out the form.

    How did you fill that form: using Adobe Reader?
    When printing, did you check the Page Sizing & Handling options on the Print panel?

  • How to show masked links in PDF when printing?

    Hello
    Ive got a PDF where some hyperlinks are masked behind certain words. For digital use of this document this is fine. However when printing I would like to have the full link to be printed (eg as a comment or on top of the word which contains the link). Is there a possibility to do this with Acrobat?
    thanks

    Hello there,
    Thanks for posting. Unfortunately, I'm afraid you're in the wrong forum; this is the forum for questions specific to Acrobat.com (www.acrobat.com), and we are not able to help with questions about other Adobe products and services. If you're using Adobe Reader free software, I recommend posting to the Reader forum, where your questions is more likely to get a helpful response:
    http://forums.adobe.com/community/adobe_reader_forums
    Sorry not to be of more help! Good luck.
    Best,
    Rebecca

  • How to display masked links in PDF when printing?

    Hello
    I have several PDF's which contain hyperlinks masked behind words. I would give readers of this document to print out the PDF. However, as the links are masked they wouldnt be able to use the document in print form. Is there any way to have these links shown when printing?
    thanks

    Hello there,
    Thanks for posting. Unfortunately, I'm afraid you're in the wrong forum; this is the forum for questions specific to Acrobat.com (www.acrobat.com), and we are not able to help with questions about other Adobe products and services. If you're using Adobe Reader free software, I recommend posting to the Reader forum, where your questions is more likely to get a helpful response:
    http://forums.adobe.com/community/adobe_reader_forums
    Sorry not to be of more help! Good luck.
    Best,
    Rebecca

  • JPEG 'Date&Time' is lost when files transfered

    Hi
    This is really annoying - can anyone help pls? I take photos on camera and download into iPhoto. Friends give me their photos too etc. iPhoto orders these correctly by date (when the photo was taken), regardless of the file name (DSC0097 etc) as there can be many different file labels, depending on he source. However, when you copy the file to a new folder, eg to external hard disk, the file loses the original Date/time info. The 'Date Modified' or 'Date Created' of the new file is simply the date of tranfer of this new file. How can you ensure the original date and time information is retained?
    thanks

    RichardCooke
    iPhoto gets the date and time of the Photo from the Exif metadata that is part of the Photo’s File. When you export to the Finder the file is arranged by the File data, because the Finder is not saavy to the Exif. However, open the exported file in a photo app and you will see the date and time are correct.
    Organisation in the Finder is alpha-numeric. So one way to duplicate the listing is to batch the titles of the photos using Photo -> Batch Change command. Give the pics consecutive numbers and export from iPhoto using the File -> Export command. Set the Filename to Title.
    Regards
    TD

  • Add applescript date/time output to Automator email Subject

    I'm having a big issue with this new forum format (which is awful IMHO) but thats not my problem at hand...
    My problem is getting the output of an AppleScript to show the correct time in a Lion (+latest patches) new Mail subject line.
    This is the "Run AppleScript" action (working fine)
    on run {input, parameters}
              set FutureDate to (current date) + (6 * days)
              set FutureDate2 to date "11:00:00" of FutureDate
              return FutureDate2
    end run
    This is "View Results" action (output as expected - during testing),
    {date "Saturday, 1 September 2012 11:00:00"}
    The "Set Value of Variable" action (has been set to, without marks),
    Variable: <NextSaturday>
    This is "View Results" Action output (still looking good - during testing),
    {date "Saturday, 1 September 2012 11:00:00"}
    And in the "New Mail Message" action (the rest of email not shown),
    Subject = <NextSaturday> @ The Park
    This should deliver a nice output in the actual new Mail message, however the Subject line time is now incorrectly shown....
    Subject = 2012-09-01 10:00:00 +0000 @ The Park
    I have tried this without the second "View Results" Action (part of fault finding) yet still have the same problem. Sending with the <Current time> Variable works correctly, meaning it probably has something to do with the Date/Time preferences in Lion; located in the UK but on BST at the moment.
    Maybe I am missing something but after quite a bit of reading this should be possible, but I cannot understand how to overcome this issue.
    All help gratefully receieved.

    It does look like an issue with coercing an AppleScript date object to an ISO date string - you can just coerce the date to text in your Run AppleScript action.  The way you set the time gives an error on my machine (note that as of AppleScript 2.1, a date string must exactly match one of the system date formats), it should be something like:
              set FutureDate to (current date) + (6 * days)
              set time of FutureDate to (11 * hours)
              return FutureDate as text

  • Please add a date/time stamp to each entry in the list of sites with accepted/blocked cookies.

    It would make it easier to find which site it is that I just blocked, that now prevents me from loading the page. (ConOps: Go to list. Sort by date/time. Delete all entries from the past few minutes.)

    You can see all permissions including for cookies for the current tab on the "Tools > Page Info > Permissions" window.

Maybe you are looking for

  • Remote site can call but home base cant

    Hello all, This going to be a bit of a long post, so I'll ask forgiveness at the beginning and at the end. Recently we upgraded a few remote sites form a 64 k connection up to t1's.. At the remote sites we had single line phones plugged into a vwic a

  • Variance between GL inventory account balance and OPM inventory value

    Hi everyone, I am using OPM actual costing method (PPAC), I have set profile option GMF: Book Allocations using current period basis to YES. Assume that we have a product x with openning balance Quantity = 20 TONs and Vale = 100$ (Unit cost = 5$). As

  • Thin White Line on Right side of project when viewed from web....

    I have double checked flash, design and code and I can't seem to correct the small thin white line appreaing to the right of my movie. Have you all heard of this issues and if so, redirection to the appropriate thread would greatly help. Thanks again

  • PANIC! where can I buy a sightflex from?

    Anyone know where I can get a sightflex from in the UK? I need it for a birthday present this weekend so would appreciate any leads you may have. Powerbook G4 Aluminium G4 dual 500   Mac OS X (10.4.8)  

  • Is it possible to enable Keypress in fullscreen out of CS5?

    I do a lot of multimedia presentations for events/awards/summits using flash where I have to assign numbers/letters to call certain screens (eg. a speaker screen) at any time, and I understand Adobe have disabled the keypress functions entirely when