Add current date to PDF documents

This doesn't seem like it should be hard, but I have been unable to find information on how to do it.
I have about 100 PDF files. Somewhere on them, I need to display "Date Printed: dd mmm yyyy", and have the current date displayed.
I don't care whether this is placed at the top of the page, the bottom, or opaque in the background.
I would like to be able to accomplish it using the batch command, but will perform manually if necessary.
I have Acrobat 7 Professional.
Can someone please help me out?

Hi Everyone -<br /><br />Thanks to Dimitri, I was able to do exactly what I wanted to do by using the following code:<br /><br />  // Check for existing field and make sure it's on the first page<br />  var strModName = "DocMessage";<br />    var ofield = this.getField("DocMessage");<br /><br />     // Create Field if it doesn't exist<br /><br />    if(ofield == null)<br />    {<br />       // Field is the width of the page, on the bottom of the page<br />       // and 40 points high (72pts/inch)<br /><br />       for(var i=0;i<this.numPages;i++)<br />       {<br />         var rectField = this.getPageBox("Crop",i);<br />         rectField[1] = rectField[3] + 14; // Set Top<br />         ofield = this.addField({cName: strModName,cFieldType: "text",<br />         nPageNum:i ,oCoords: rectField});<br />         ofield.alignment = "center"; //This is the text alignment of the field<br />         ofield.multiline = true;<br />         ofield.textSize = 8; <br />         ofield.textFont = "Arial";<br />         ofield.display = display.noView; //This is hidden on the page but printable to make viewable change to display.visible or noView<br />        ofield.readonly = true;<br />       }<br />    }<br /><br />    // Add Field to Document Script<br />    var strJS = 'var ofield = this.getField("DocMessage");';<br />    strJS += 'ofield.value = "Intellectual Property of My Company - CONFIDENTIAL. ";';<br />    strJS += 'ofield.value += " Document printed " + util.printd("ddmmmyyyy",new Date()) + ".";';<br />    this.addScript("AddMessage",strJS);<br /><br />However - Now I would like to change the message to say that the document expires on a future date. For example, 14 days from today. I found an example of how to do this on page 266 of the Adobe JS Scripting Guide and have followed it to the letter, but it is not working. Here is the modified code:<br /><br /> // Check for existing field and make sure it's on the first page<br />  var strModName = "DocMessage";<br />    var ofield = this.getField("DocMessage");<br /><br />     // Create Field if it doesn't exist<br /><br />    if(ofield == null)<br />    {<br />       // Field is the width of the page, on the bottom of the page<br />       // and 40 points high (72pts/inch)<br /><br />       for(var i=0;i<this.numPages;i++)<br />       {<br />         var rectField = this.getPageBox("Crop",i);<br />         rectField[1] = rectField[3] + 14; // Set Top<br />         ofield = this.addField({cName: strModName,cFieldType: "text",<br />         nPageNum:i ,oCoords: rectField});<br />         ofield.alignment = "center"; //This is the text alignment of the field<br />         ofield.multiline = true;<br />         ofield.textSize = 8; <br />         ofield.textFont = "Arial";<br />         ofield.display = display.noView; //This is hidden on the page but printable to make viewable change to display.visible or noView<br />        ofield.readonly = true;<br />       }<br />    }<br /><br />    /* Create a date object containing the current date. */<br />    var d1 = new Date();<br />    /* num contains the numeric representation of the current date. */<br />    var num = d1.valueOf();<br />    /* Add fourteen days to todays date, in milliseconds. */<br />    /* 1000 ms/sec, 60 sec/min, 60 min/hour, 24 hours/day, 14 days */<br />    num += 1000 * 60 * 60 * 24 * 14;<br />    /* Create our new date, 14 days ahead of the current date. */<br />    var d2 = new Date(num);<br />    // Add Field to Document Script<br />    var strJS = 'var ofield = this.getField("DocMessage");';<br />    strJS += 'ofield.value = "Intellectual Property of My Company - CONFIDENTIAL. ";';<br />    strJS += 'ofield.value += " Document expires on " + util.printd("ddmmmyyyy", d2) + ".";';<br />    this.addScript("AddMessage",strJS);<br /><br />The resulting output is simply: "Intellectual Property of My Company - CONFIDENTIAL." The part of the message regarding the expiration date doesn't even show up.<br /><br />Anyone have any suggestions?

Similar Messages

  • Current Date on PDF Document

    I have a current pdf document created in Adobe Acrobat 9.0 Professional. At the bottom of each page, I would like for the current date to be displayed whenever someone prints a copy of the document. Can anyone give me an easy way to do this? I added a footer thinking originally that it would automatically update to the current date but I see that it doesn't. It just displays the date of the last update. Thanks.

    First, Reader can not add form form fields or water mark by JavaScirpt. This means one can not add a watermark reliably before printing, so one needs to use a form field, and that form field needs to exist before the PDF is opened by Reader. You need to add a 'read only' form field to each page of the PDF and if you give them all the same name, you only need to change the value of one of the form fields. There is no way to add a footer by JavaScript.
    There are a number of ways to change the value of the field before printing so if you want the date the form was sent to the printer, you will use the 'Will Print' document action to change the value of the field which will cause the field to be updated when any 'print' is requested from Acrobat's menu, Acrobat's tool bar, or an added button field. And you will have to add a custom JavaScript that obtains the date object, formats the date object,  and sets the value of your field object.
    The referenced link is to JavaScript that adds the field and the necessary JavaScript to work.
    You can cut and paste the following into the script for the 'Will Print' action:
    // get the field
    var field = this.getField("PrintField");
    // get the date object
    var odate = new Date();
    // format the date
    var cDate = util.printd('mmm d, yyyy', oDate)
    // set the field value
    field.value = "THIS DOCUMENT WAS PRINTED ON "+ + cDate;

  • Add hidden data to pdf

    HI
    I need to save some data to pdf document but i want these data be hidden and with preview the document nothing show
    but plugin can read these data
    how can i insert data?
    to where?
    do i have any limitation to add data for example size or ...
    I read 32000 but in sdk I don't know use which function or layer
    thanks for your attention

    I just find this
    http://partners.adobe.com/public/developer/indesign/register/prefix_reg.do
    is this correct ?

  • How do I highlight/add comments on a PDF document in IPages on IPad Air?

    How do I highlight/add comments on a PDF document in IPages on IPad Air?

    PDF readers
    GoodReader
    -- With GoodReader on your iPad/iPhone, you can read virtually anything, anywhere: books, movies, maps, pictures.
    -- sync with Dropbox, OneDrive, SugarSync and any WebDAV, AFP, SMB, FTP or SFTP server
    -- The types of annotations that can be created and edited in GoodReader include typewriter text boxes, popup comments ("sticky notes"), text highlights, freehand drawings, lines, arrows, rectangles, ovals, cloudy shapes, text underlines, strikeouts, text insertion marks. 
    http://www.goodiware.com/
    PDF Expert – the PDF handling app for the iPad. "It allows you to markup documents with highlights and handwriting, insert text and stamps, sign and even merge PDFs."
    https://itunes.apple.com/us/app/pdf-expert-5-fill-forms-annotate/id743974925?mt= 8
    iAnnotate – turns your tablet into a world-class productivity tool for reading, marking up, and sharing PDFs, Word documents, PowerPoint files, and images.  Has a secure document edition designed for corporations.
    http://www.branchfire.com/iannotate/

  • Add Current Date  - What timezone is used to display value

    When adding the Add Current Date Transformation to get the 'processing date', what determines the date/time that is presented? Where does it pickup the timezone and can this be tailored?
    Thanks.

    Might just be a display issue. Right-click on the date/time in the Results Browser to see the time zone. You can also change your view of the date/time if you want to. A blue dot will appear in the cell to indicate that you are displaying the value in a different time zone.
    If you want to process the data in a certain way ('stamp it into a given timezone' different from the server timezone) you could use the data type converters to convert to string and back to date/time with the options set to the timezone you want.
    I believe there is a property that can override the Director Time Zone on the server but it is not normally used.

  • Current Date in PDF

    Help - I am converting a Word file to PDF.  I need the PDF (without being a form) to include a date that updates to the current date each time the file is opened.  Can anyone help me?

    It's OK, I'll explain it. So here's what you do:
    - Create a new Text Comment on the first page in the location where you want the date to appear and select it using the Object Select tool under Tools - Interactive Objects.
    - Open the JS Console by pressing Ctrl+J.
    - Enter the following code into the console window, select it with the mouse and press Ctrl+Enter:
    this.selectedAnnots[0].name = "DateAnnot";
    this.selectedAnnots[0].readOnly = true;
    this.selectedAnnots[0].lock = true;
    - Go to Tools - JavaScripts - Document JavaScripts.
    - Create a new item, let's call it "scripts".
    - Delete the default code that is generated and paste this code instead into the window:
    this.getAnnot(0, "DateAnnot").contents = util.printd("mm/dd/yyyy", new Date());
    Feel free to adjust the date pattern string, as you see fit.
    - Click OK, Close, and then save the file. Each time you open it from now on the text comment will contain the current date.

  • Logotype and Current Date in PDF - Web Applications

    Is possible to insert an image (company logotype) and a text (title and date) in PDF generate through “Printed Version” functionality? The generated PDF only contains result table of the report.
    By the way, how can I insert current date in a web application? I don’t want to use javascript because javascript would return de time/date of the end user computer.
    Thanks in advance.
    Best regards,
    Raphael Barboza

    Hi Raphael,
    Q1) Is possible to insert an image (company logotype) and a text (title and date) in PDF generate through “Printed Version” functionality? The generated PDF only contains result table of the report??
    A)In PDF Print Properties you should be able enter "Title and Date" and also When you define command sequence make sure to call "Analaysis Item only" otherwise the whole template will be downloaded to PDF. Please play with the properties when defining Command Sequence.
    Q2) how can I insert current date in a web application? I don’t want to use javascript because javascript would return de time/date of the end user computer ???
    A) Use Web Template "TEXT ITEM" and in the web item properties "LAST UPDATED or KEY DATE" is the property you should assign.
    Sorry I dont have my system as of now to send you code for these but they are pretty easy.
    thanks,
    Deepak
    SAP BI Consultant
    D N Tech

  • Copying Data In PDF Documents

    Am I missing something? Sometimes I am able to copy text and numbers out of certain PDF documents but not others. Is there a "lock" on the data and is there a way to get around this?
    Thanks in advance.

    >Is there a "lock" on the data
    Maybe. Or they could possibly be a scanned document so there wouldn't be any "data" to copy.

  • Javascript adobe indesign to add/delete parts of pdf document and adjusting layout on pages

    as a very new beginner i Adobe InDesign, and defining me as a dummie!, I'm making a interactiv pdf form for leaders. in this form, depending on what they check out in the first page, different parts in the pdf document has to be added/removed (not only buttoms at textfields, but also text in the form). and preferably, the layout should adopt to those changes. I have tried by exporting the file into Adobe Acrobat pro, using Tools/forms/addaction - add/hide element. Unfornately, that only removes textfiels, buttoms .... but not text. it doesn't either adjust layout. The alternativ would be to use the action import new pdf file, which I manage. Meanwhile, I Wonder how it is possible in a same document. Can somebody help me to succeed in making this interactiv form come true?! tx,

    A PDF form is not appropriate for this. You'd have better luck with some
    sort of an HTML app.

  • Replacing net due date with current date in invoice document

    Dear all,
    We  are having a functionality of replacing the net due date in the current date  with reference to the Posting area entry. in the invoice document .Can anybody tell me where and in which event we can maintain this .
    Susmita

    The obvious answer here is to have payment terms which are due immediately, and then set the transaction to use the posting date as the baseline date - that is done in the main/sub definitions within the TE305 customizing.
    regards,
    bill.

  • 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...

  • Javascript code to add current date and time in a textfield on click of a button

    Hi,
    I have done a lot of googling .....But could not found a viable solution to populate a text field in LC Designer ES 8.2 and above at runtime with the current date/time. on click of a button. I need Javascript code and not formcalc.
    Please help .
    Thanks
    Kapil

    I have found a solution for you - 3 variants for you:
    Textfeld1.rawValue = util.printd("dd.mm.yyyy HH:MM", new Date());
    Textfeld2.rawValue = util.printd("dddd d. mmmm yyyy HH:MM ", new Date());
    Textfeld3.rawValue = util.printd("date{EEEE, D. MMMM YYYY} time(de){HH:MM:SS Z}", new Date(), true);
    I hope this is helpfull,
    Mandy

  • Add current date to filename of a scheduled report (Info 7.5)

    Can a file be scheduled in Info 7.5 to export with the current date to the file name (ex.  job_postings_dd_mm_yy.xls)?

    Hello,
    Seagate Info has been out of support for years so no one here would be able to help you. I moved this to the Enterprise forum also.
    I don't recall any option but if the UI doesn't give you the option to change the name then no it likely wasn't something you could do. You could although create a batch file that would rename it using a Process extension, I think 7.5 had that ability, it's been so long now.
    Check the Administrators Guide on functionality, is about all I can suggest.
    Thank you
    Don

  • Downloaded new numbers app.  Now no table headings.  Solution?  Also in table headings/title want to add current date as did in old numbers.  How do I do it?  Thanks

    Down loaded new numbers app.  Now no table headings.  Solution?  Also. How do I include current date as part of new table heading, I had this included in old numbers spreadsheet title?

    Hi,
    Do you mean no table name?
    Or table header row?
    You can get the current date in a table heading with NOW, which in the formula editor now looks like this:
    Which you can format this way:
    SG

  • I have scanned a document and saved it to desk top - when I have then attached to an email it says no plug and attachments don't send. How do I add plug in so pdf documents can be attached and opened.

    I have scanned a document and then saved it to desktop. It has saved as a pdf. When I have then attached it to email and sent - an message comes up saying no plug ins - The recipent couldnt open files. How can I rectify this so that I can attach pdf pleaase

    search the app store for PDF Writer. I've found a lot that will convert documents to PDF, but none yet that will write within the PDF. One thing you want to avoid are cloud based apps. Any of them that talk about editing on the cloud, etc, aren't going to be as standalone as you want.
    It's possible, if you can take your template PDF, turn it into a word document that you can edit, you can then convert that to PDF...kinda a workaround way to do what you want. And apps that convert to PDF are much easier to find

Maybe you are looking for

  • Company code problem in Controlling area Tcodes

    Hi All, We are following role based authorisation for creating roles for FI/CO module and we are seggregating roles as per the company codes.We are assigning Tcodes like KO01,KO02,KO03(Internal order) and KS01,KS02,KS03(cost center) which are connect

  • My ipad 2 home button has stopped responding completely.  Any suggestions

    My ipad 2 home button has stopped responding completely.  Any suggestions?

  • Palette view not showing the contents of palette set

    Hi! I am new in the community, so "Hi everybody!" and thanks for your help My problem: I have a scientific camera that has its own drivers and VI's for Labview. I have installed the camera properly, and I have already created a folder and copied the

  • After 8.1 update iTunes is all jacked up

    After going through the usual software update process, my iTunes now looks like this: http://dl.getdropbox.com/u/318749/Picture%201.png No controls whatsoever.. media plays fine via keyboard shortcuts. No idea what's going on. Have re-installed & re-

  • Use of Iphone

    can i use my iphone without activating AT&T now(register later) means use it as an ipod touch... also i won't try to use it with other network,only register later Message was edited by: Abousteit Message was edited by: Abousteit