Add date-timestamp to PDF

Hi,
Is there a way I could add current date-timestamp to the PDF, when the PDF is opened or printed?
I read the iTEXT documentation and it seems its possible to add javascript to the PDF document using iTEXT and this javascript will get executed when the PDF is opened.
I was successful in adding the "this.print" javascript; however, I am still struggling to figure out how to add "this.addWaterMarkFromText" javascript. I know I can use the iText API to add watermarks, however, I want to use the Adobe Javascript instead. This exercise is just to figure out how to add javascript to PDF.
This would help me figure out how to use various Adobe javascript events such as "WillPrint" to dynamically add the timestamp just before the Print button is clicked.
Any help will be highly appreciated.
Thanks,
Shilpa.

Hi Shilpa,
Please note, I am using C# in my example code, but the solution is similar in Java.
To answer your question regarding using javascript events like Will Print, one way to add a timestamp by first creating a (blank, readonly) field and adding it to your document using iText using, say iTextSharp.text.pdf.TextField. Then you assign javascript to the WillPrint event with writer.SetAdditionalAction(PdfName.WP, PdfAction.JavaScript(jScriptBeforePrint, writer))where writer is an instance of iTextSharp.text.pdf.PdfWriter.
The javascript, in this case jScriptBeforePrint, will change the value of the field you created earlier to contain the date-timestamp value. For example, you can use:
this.getField('datestmp').value =\"This document was printed at \" + util.printd(\"HH:MM on mmmm dd, yyyy\",new Date());where datestmp is the name of the field created earlier.
(by the way Will Print is initiated after the clicking of the print button, not before - as per your post).
Callan

Similar Messages

  • APEX-PDF-Reports: Add ID and some more Data to the PDF-Filename

    Hi,
    I have create in APEX a Report Layout and a Report Query to export some data to an PDF-File (I am using BI Publisher).
    This works fine but now I need to add the ID and some other informations to the file-name.
    Because if the user create some PDF-Files he should be able to see, what file is for which data...
    How I can do this?
    Regards,
    Mark

    Hi Marc,
    thank you for your answer but it does not work for me.
    I have create the page process and if I click the button I have for few seconds the hour-glas. I think the BI Publisher is generating the file but I dont have a download-message and also the file is not saves automatically.
    This is my page process:
    declare
        v_filename varchar2(1000);
    begin
        v_filename := 'Checkliste_' || :P70_TECHNIK || '.pdf';
        APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT (p_file_name => v_filename,
                                           p_content_disposition => 'attachment',
                                           p_application_id      => 119,
                                           p_report_query_name   => 'Checkliste',
                                           p_report_layout_name  => 'Checkliste',
                                           p_report_layout_type  => 'xsl-fo',
                                           p_document_format     => 'pdf');
    end;I have also tried it with p_report_layout_type => 'rtf' because the layout is a rtf-file, but also no luck.
    Have you a idea why I cant download the file?
    Regards,
    Mark

  • How can I add an expiration date to a pdf file?

    How can I apply an expiration date to a pdf document in Acrobat Pro X? Can this be done in Acrobat XI?

    Read this:
    http://forums.adobe.com/thread/1085319?tstart=0

  • Submission timestamp on PDF form

    How do I add a timestamp to an enabled PDF form? Need to document original date form is submitted/printed

    http://help.adobe.com/en_US/acrobat/X/standard/using/WSAC8084C2-14F7-4841-9EF8-92106D22C3D B.w.html#WS8b24479264ec42284efd56d112be2a22ee6-8000
    It CANNOT be done with Reader, only Acrobat can enable timestamping.

  • What are the reasons for disabling the saving of data in a PDF?

    I seem to have had more than my share of encounters lately with PDF files that have editable fields but have their data saving capability disabled.
    In some of these situations this has been an absolutely maddening inconvenience.
    When I attempt to bring this to the attention of whomever's responsible I get brushed off.
    One person's response was: Actually the majority of the PDF forms I have are Adobe reader and you cannot make changes electronically at all.  The reason for this is to make sure that the documents are not altered in any way.  The <companies creating the PDFs> must make sure that changes are not being made to their forms. 
    I just don't understand that.  How is entering and saving data 'altering' a PDF?
    Is this just bone-headed bureacracy, an urban legend, or is there some fundamental practical matter I am not aware of?

    Saving a filled-in form has always been disallowed with Adobe Reader, formerly known as Acrobat Reader. Though there are a few exceptions...
    History lesson:
    Forms features were first introduced in Acrobat 3. As you might imagine, a number of folks wanted to be able to save filled-in forms using Acrobat Reader. Since this functionality simply was not a feature of Reader, it was not possible. If you wanted to save a filled-in form, you needed to use Acrobat (Exchange).
    Upon recognizing the potential market for a product that they could sell, Adobe developed and released Acrobat Business Tools, which was a version 4 product. It was positioned between Reader and Acrobat, was reasonably priced, and allowed users to save filled-in forms, apply digital signatures, and add comments. Unfortunately, this was marketed poorly and did not achieve commercial success.
    The next iteration was a similar product named Acrobat Approval, which was a version 5 product. It too could save a filled-in form, but was in some ways more limited than Business Tools, and suffered a similar fate. That is, it was not a market success. It was however distributed for free to US taxpayers on the IRS tax products CD-ROM.
    The next idea from Adobe - which was a good one - was to provide for a means of embedding usage rights in a PDF document. These rights would allow Reader to do things it normally would not be able to do, such as saving a filled-in form, adding comments, importing/exporting form data, creating new pages using templates, connecting to databases and web services, etc. At first, the only way to enable these usage rights was with an expensive product from Adobe, so the potential was initially not realized.
    With the release of Acrobat 7, Acrobat users were able to add some usage rights, such as commenting. While this was a welcome addition, folks still wanted to be enable forms to be saved with Reader. Finally with the release of Acrobat 8 Pro, users were able to enable forms to be saved with Reader, but it came with licensing restrictions. In short, if the licensee distributed the form for more than 500 recipients, the licensee could use data from no more that 500 copies of a particular form that was returned to them, including hardcopies. This was great for forms used inside of an orginization, but not so great for forms that needed to be used by the general public. Still, it was a very useful feature for a majority of businesses for internal forms, the vast majority of which have fewer than 500 employees.
    Acrobat 9 or 10 didn't change things. Adobe still wants to capitalize on this market, which certainly is not a bad thing for Adobe and their stockholders. The US IRS forms have long been saveable with Reader because they licence Adobe Reader Extensions, which provides revenue for Adobe.
    Note that some third-party PDF viewers allow users to save filled-in forms whether or not the documents have usage rights. Such software has a different marketing model than does Adobe Reader/Acrobat, and rides the coattails of Adobe by taking advantage of the popularity of PDF forms.

  • How to programmatically add rectangle to a pdf file ?

    How to programmatically add rectangle to a pdf file ?
    There is several page pdfs, non-vector, black and white.
    Users are color blind and have disabilities.
    To train them, one adds a rectangle at a certain lower-left point and width,height specified for a page.
    The idea is to give the script the page and coordinates and size of rectangle to be added programmatically. Green rectangles are acceptable as the cones are most sensitive there.
    Also, additional feature to add bookmarks on the left in the order these rectangle data is provided to the script.
    The script could be "hard-wired" by a list of the rectangle coodinates, and page number, pasted inside acrobat and run or entered into acrobat in some way.
    Your script would help many disabled people who are distributed through out the world.
    Feel free to contact me by email if you wish.
    Dying Vets

    P.S.
    This rectangle does not have to be a full annotation rectangle which needs user,date and a lot of info.
    Something minimal like this would suffice
    1 0 0 RG % red for stroke color
    200 300 50 75 re
    As you can see that the native unit of the pdf file is the "point" having 72 in an inch.
    The file dpi would be given. However, one could assume that pixel for the rectangle lower-left and width/height are given.
    From the pixels and dpi, the points could be calculated if desired.

  • How do I input data to a pdf form in Acrobat 8.1.6?

    There's probably a simple solution for this but I'm wracking my brain trying to figure out how to input data to a pdf form using Acrobat 8.1.6, or how I can make the pdf file data field input ready? Thanks. 

    If you created the form Go back to Acroabt and go to advanced menu and choose:
    Extend Features in Reader. then save.
    Now open Reader and you can add information and save. (limit 500 instances per pdf).
    Now if you created the form and have Acrobat make sure Acrobat in not in Forms Edit Mode.
    Just type in your information and save.
    Caution make sure that you finished all corrections and edits. because once you confer reader right you can not edit the form. you can edit the form items you fill in, but not the form itself.
    to correct the form design you have to go back to advanced reader rights and save a copy without rights. make changes then confer rights again.

  • How can I embed XML data in a PDF?

    I want to embed XML data in a PDF so the file can be scanned for the data behind the document. Is there a standard way to do this?
    For example, if the PDF is a bank statement, the embedded XML would be the individual's account number and bank balances. It would not include any of the standard text in the statement such as the bank name, etc.
    I've read up on the XMP spec but that seems to be more metadata about the document (title, subject, etc.). And there is tagged content but that is an alternate view of the entire document.
    ??? - thanks - dave

    Although the XMP block is stored in XML, you can't just embed any XML file. The block has to follow the standard, which means that each data packet needs to be defined in a schema - as the name suggests, XMP is eXtendable so you can define new schema for local use, but you can't mess about with the standard ones and randomly add new tags. The schema itself isn't embedded in the file, it's referenced by a unique ID and URI. of course having a data packet in a custom schema doesn't mean any software will see it - Acrobat's Advanced Search can be told to scan the XMP block but  search engines only tend to bother with the basic tags such as 'title' and 'description'.
    To see what's currently in a PDF, open Document Properties > Description > Additional Metadata > Advanced.
    You can save the current XMP block as a text file (.xmp extension), and replace/append other XMP files. If you click the "i" icon on the top right of the Advanced dialog you can access system profiles - these can be created in other applications such as Bridge, but there's no profile manager in Acrobat itself.
    For technical information on working with XMP and creating new schema, see http://www.adobe.com/devnet/xmp.html
    Note that the XMP SDK for CS6 does not work in the Acrobat Family.

  • Using OBIEE Scheduler to export and save data in excel/pdf

    Hi
    Is it possible to use obiee scheduler and run particular reports and export the data into excel/pdf and save this file at given location on server.
    env: obiee 11g/linux OS
    Thanks for any ideas.

    Hi,
    Yes it is possible.
    As per my knowledge we don't have such option but we can do one way.
    Using IBOTS you can store specific report and specific time in specific location.
    Note : Using JS script.
    Are you going to implement this way send me your mails id will send you js script for doing this.
    Re: Auto SAVE to excel -- Please refer this thread.
    Create js file using the below script and add this js scrif in your ibot advanced tab.
    var FSO = new ActiveXObject("Scripting.FileSystemObject");
    var foldername = 'D:\IBOT'
    if (FSO.FolderExists(foldername))
    var fileName = foldername + "\\" +Parameter(1);
    var fooFile = FSO.CopyFile(Parameter(0), fileName, true);
    else
    FSO.CreateFolder(foldername);
    var fileName = foldername + "D:\IBOT" + Parameter(1);
    var fooFile = FSO.CopyFile(Parameter(0), fileName, true);
    Thanks,
    Satya

  • I want to extract data from a PDF using Java

    I would prefer to extract data from a PDF and convert it to XML. Is there an API that will convert a PDF to some Adobe format XML? Ideally I would like to add some JAR files to my classpath, similar to PDFBox. I don't want to install a bunch of server side componets or anything like that.
    Thanks!

    Thank you for the reply!
    If I installed the server side components, how would a Java client invoke a service to export data from a PDF? RMI, Web Services?

  • How to add Table element in PDF form in Webdynpro

    Hello Everybody,
    I am developing one application in Webdynpro using PDF form in it. I wantable control in PDF form. I read somewhere that we can add table control in PDF form. But i didnt find how to add the same. So if anybody knows then please help me.
    Thanx in advance...
    Bhavik

    Hi All,
    Please follow these steps to create tables in adobe interactive forms.
    Lets us take this example. We want to display employee information. The following fields are the one that we are going to display:
    1. employeenumber
    2. First name
    3. last name.
    First insert a "interactive form UI element" in the view. Create a value node and bind it to the data source of the UI element.
    Create a subnode called "Employee".
    Create 3 value attributes to display the 3 values.
    Open the form designer. Insert a subform. change its type to "flow content"(default is position content) and in the next drop down, choose the value as type "table".
    insert one more subform into this subform. change its type to "flow content" and from the dropdown, choose the value as "table row" and in the tab "binding", click the checkbox "min" and have its value as 1.
    now drag the elements from the data hierarchy into the second subform.
    save the form in the designer.
    go to the view implementation and populate the nodes with the value. if this is within a loop, the content of the second subform is repeated giving the user a "table".
    I hope the steps are clear.
    Regards,
    Chander

  • CRIO-9068 time synchronization and data timestamping - the Big Picture

    I'm working with a number of cRIO-9068 chassis that are distributed over a large physical area. I wish to timestamp data acquired be these chassis with microsecond resolution and relative accuracy. The various documents that I've run across hint at how this might be accomplished but none of them really describe the overall architecture for synchronization of chassis clocks over a network and acquisition of the local clocks for the purpose of data timestamping. Is there a document that addresses this topic?

    http://www.ni.com/pdf/manuals/376007a.pdf:
    Using the Internal Real-Time Clock
    The system clock of the cRIO-9068 is synchronized with the internal high-precision real-time clock at startup. This synchronization provides timestamp data to the controller. You can also use the internal real-time clock to correct drift of the system clock. Refer to the Internal Real-Time Clock specification in the Specifications section for the accuracy specifications of the real-time clock.
    What are the "system clock" and "real-time clock"? How are they related? How does the synchronization provide timestamp data to the cRIO-9068 controller? How does the internal real-time clock correct drift of the system clock?
    http://www.ni.com/pdf/manuals/373185a.pdf:
    No theory of operation whatsoever.
    Note: https://forums.ni.com/t5/LabVIEW/cRIO-9068-amp-NI-TimeSync/td-p/2838178 suggests that NI-TimeSync may not be available for the cRIO-9068:
    Currently NI-TimeSync 1.3 is not supported on Linux RT. This is something that's in the works but there is no ETA.

  • Post Calculation Computation for Date/Timestamps

    Hello,
    I would like to know how to apply Post Calculation Computation for Dates/Timestamps?
    I had trouble trying to add this to the Post Calculation Computation area:
    TO_CHAR(:P1_TARGETDATE, :DEFAULT_DATE_TIME_MASK);
    or should it be something more like:
    SELECT
    TO_CHAR(:P1_TARGETDATE, :DEFAULT_DATE_TIME_MASK) FROM DUAL;
    What would be the correct code to allow me to format a date/Timestamp where a Application Variable of DEFAULT_DATE_TIME_MASK could be used as well. (I dont want to use the existing Format Mask.)

    Just a hunch, but you might be having a problem because of the double quotes. Oracle likes single quotes. You also might want to forgo the quotes entirely.
    As for an invalid number, is it possible that one of the values that you are adding might be NULL. You can't add NULL to a number or you get an error. There are two solutions to that. One would be to do an NVL around each number you are adding (changing it to zero if the value is NULL). The second option (and easier option) is to use the SUM function. Mathematical functions like SUM and AVG ignore those values that are NULL.

  • Anyway to "UN" Ken Burns stills globally or as default bringing in jpeg's?  New to iMovie. I have 3 titles that build.  First is logo, add prod't name second line, add date 3rd line.  They shift when dissolving between them. Title function NG for this.

    Anyway to "UN" Ken Burns stills globally or as default bringing in jpeg's?  New to iMovie. I have 3 titles that build.  First is logo, add prod't name second line, add date 3rd line.  They shift when dissolving between them. Title function NG for this.
    The people at the Apple store gave me a long, tedious workaround which is open Pages and bring in logo.  Export it as a PDF.  Open the PDF in Review and then "Save As" a jpg to the desktop and drag and drop into the imovie.  Even with this process, the text will sometimes shift.  When it works, it looks good, the logo comes up, then the second line fades in under it as part of the build and then the third line completes the graphic.  It would something this easy and straight forward would be easy. 
    HarveyV

    I did the work around for the titles/jpg's in this short video. 
    I'll try your fix on the next one.  I have 22 short 3-5 minute videos to produce
    and I'm on number 5.  This should save me a bunch of time. 
    It would appear that you know more than the guy at the Apple Store. 
    Thank goodness for on-line forums.
    I already tried fixing them individually as you suggested,
      by going the crop/fit route.  However, even then,
      the second in the series had always shifted. 
    The first and the third images lined up, but not number 2.. 
    So  I brought in all the images, (1, 2 and 3).  
    and then the 2nd image again and put it in the third position
    in the sequence on the time line. I deleted the "original" 2nd image.
    So I had 1, 3, then 2.  Then I dragged and dropped the correct number two
    into position two and it worked.  So what happens is that the
    client logo appears, then that stays put and the next line dissolves in
      and then the third dissolves in.  They are three separate titles, but they
    are aligned perfectly so that they build as I dissolve between them.
    I think the problem with the edit copy route would be that while
    I could edit/copy the logo, I couldn't position text through the
    iMovie text function exactly as it only gives you middle or bottom third etc.
      Each title with the product name is positioned individually depending on
    length and number of lines. By going through Pages, I can position the logo
    and the text exactly.  Also, some logos are horizontal, while others
    are square etc., so text positioning is crucial.Anyhow,
    I'll try the global approach for the next one and see how that works.
      Thanks very much for your insight and especially for your prompt reply.
    I trust you're inside on this gorgeous July 4th because you're
    making money on your computer. ;-)HarveyVOn 7/4/2011 3:57 PM, Apple Support Communities Updates wrote:
    > Apple Support Communities <https://discussions.apple.com/index.jspa>>>>       Re: Anyway to "UN" Ken Burns stills globally or as default>       bringing in jpeg's? New to iMovie. I have 3 titles that build.>       First is logo, add prod't name second line, add date 3rd line.>       They shift when dissolving between them. Title function NG for...>> created by AppleMan1958 > <https://discussions.apple.com/people/AppleMan1958> in /iMovie/ - View > the full discussion > <https://discussions.apple.com/message/15552380#15552380>> ------------------------------------------------------------------------>> I am baffled by what you are asking...but if you are asking how to > turn off the Ken Burns effect, you can do it for future photos you add > by going to File/Project Preferences and setting the default initial > photo placement to FIT or CROP rather than Ken Burns.>> For a global change on photos that are already in your project, pick a > photo. Open the Rotate, Crop, Ken Burns Tool. Select FIT or CROP.  > Exit the tool. Now select this same photo and EDIT/COPY.>> Now, EDIT/SELECT ALL.>> Finally, EDIT/PASTE ADJUSTMENTS.../CROP ADJUSTMENTS.

  • Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.

    Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I  am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
    Pls explain me the steps for adding data from xml to B1 quotation step by step.
    thanks and regards
    Priya

    Hi,
    Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
    Thanks,
    Gordon

Maybe you are looking for

  • How can I delete permanently a old Apple id?  my devises keep defaulting to my old id.

    problem:  I originally had a Apple ID that used a different email address.  I had to delete that email address as it was not accessable anymore.  I created a second Apple ID. But my iphone keeps defaulting and asking me for the password for my first

  • Run Time Error in e-commerce crm 5.0 when creating new order

    Hi all, I am getting Run Time Error in e-commerce crm 5.0 when creating new order, shopping basket is comming , but while creating order , getting run time error. Thanks, Nagesh

  • Receive File Adapter - Error in CallSAPAdapter Name not known

    Using xml to File Adapter. Just want to store the xml file somewhere ie on XI Server in folder E:\usr\sap\interface\XMLfiles Getting error in Adapter Engine - Exception caught by adapter framework: Object not found in lookup of CallSAPAdapter. Delive

  • Java won't wont work outside of my browser

    Well things inside my browser work perfectly but things outside my browser just don't work at all like when I click run on something it comes back as "'JAVA' is not recognized as an internal or external command,operable program or batch file." Does a

  • My Creative Audigy Software Experience, Chapte

    It was a dark and stormy night. After fighting for days trying to get my speaker calibration software to fart out a sound, ANY sound, I decided to uninstall my Audigy software and drivers and start over. . Found a Creative program on my harddri've th