Putting Date Last Modified on PDF

Is there a way to put the date last modified on a PDF using Javascript? I am trying to organize a folder of PDF maps and the only way I can think of to do it is to print out each map with its file name and date last modified (so we can come back to the folder and delete the duplicates and the really old ones).
The wonderful thread Print File Name with PDF Document has helped me figure out how to put the file name and current date into each pdf as a footer, but when I tried to edit the code to get the date last modified, I get an error.
I will admit that I am a newbie when it comes to Javascript, so any suggestions would be extremely helpful.
My code is as follows:
// SetRemoveFooter
app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Footer", cParent: "File", nPos: 20 });
app.addMenuItem({ cName: "Set Date Time (Filename)", cParent: "Footer", cExec: "SetFooter(1)"});
app.addMenuItem({ cName: " -> Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
app.addMenuItem({ cName: " -> Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(4)"});
app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(5)"});
app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(5)"});
app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
//Set/remove Footer
function SetFooter(ARG)
var FileNM = this.documentFileName
var AcDate = document.lastModified
var AcDateFormat = "yyyy/mmm/dd HH:MM"
var Box2Width = 50
for (var p = 0; p < this.numPages; p++)
var aRect = this.getPageBox("Crop",p);
var TotWidth = aRect[2] - aRect[0]
if (ARG<=3 || ARG==5)
{var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
fd.textSize=6; fd.readonly = true;
if (ARG==1){ fd.alignment="left" };
if (ARG==2){ fd.alignment="center" };
if (ARG==3){ fd.alignment="right" };
if (ARG==4 || ARG==5)
{var bStart=(TotWidth/2)-(Box2Width/2)
var bEnd=((TotWidth/2)+(Box2Width/2))
var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
fp.textSize=6; fp.readonly = true;
fp.alignment="center";
function RemoveFooter(ARG)
if (ARG<=3 || ARG==5) {var x = this.removeField("xftDate");}
if (ARG==2 || ARG==5) {for (var p = 0; p < this.numPages; p++)
var x = this.removeField(String("xftPage"+p+1)); }
Everything worked wonderfully until I added the line var AcDate = document.lastModified
Is there a simple solution or is this a much more complicated problem?
Thanks!

You need to use:
this.info.ModDate
To get the date the opened PDF was last modified.

Similar Messages

  • When I import photos taken from my Windows PC using a flash drive, the photos in iPhoto are dated as the date last modified on PC instead of date picture taken.

    When I import photos to my iMac, taken from my Windows PC using a flash drive, the photos in iPhoto are dated as the date last modified on PC instead of date picture taken.

    Then you need to ask a PC forum how to export the photos there to include the Metadata (specifically the EXIF data)
    If there is valid EXIF data iPhoto uses it (the EXIF data is originally added to the photo by the digital camera) and if there is no EXIF data then the only inofrmaiton IPhoto have available is the file metadata and that is what is used
    You can correct the dates in iPhoto using the batch change data/time command
    LN

  • How to copy files and last modified date

    Does anyone out there know who to copy files files from one directory to another and retain the date time stamp of the source files?
    I've been able to write some code that copies files from one directory to another but I always end up with a Date Last Modified that is based on the current date. I want to retain the date time stamp from the original file that I copied. Is this possible in Java?
    Mike

    Call file.setLastModified() after you close it.

  • Lion: Finder: Column View: Date Last Opened is not show correctly

    Hi Folks,
    I have upgrade my macs from 10.6.8 to 10.7.
    I am using the column view in the finder and I noticed that the
    Date Last Opened is not show correctly in the preview column.
    If I use the the list view and show the column Date Last Opened
    all dates are correct. Using the column view, the Date Last Opened
    allways matches the Date Last Modified.
    The attached screenshot shows an example with the same
    file at in both views mentiond above.
    I have noticed this problem with internal and external drives
    using the filesystem Mac OS Extended (Journaled).
    Is there way known to fix this behavior. In Snow Leopard it worked fine.
    Thank you for your support.

    Same here, however I found a strange work around.
    Go to your applications folder, for instance. Click the gear icon, go to Arrange By, then select Date Last Opened. It will correctly show the last opened time and arrange them accordingly. Switch back to arrange by name and the last opened date reverts back.
    It's not a bug, it's a feature!

  • Can you display a Last Modified Date anywhere on a PDF Portfolio?

    Can you display a Last Modified Date anywhere on a PDF Portfolio?
    Thank you for the help!
    I am using Adobe Acrobat X Pro.

    There is no generic SQL way for this. It depends completely on the features your DBMS offers. With Oracle you'd need to create column which gets updated in a trigger. I believe MS SQL Server offers a special data type for this, which is updated automatically. I don't know about others.

  • How can I display the date a word document was last modified on my web page?

    I have lists of links to word documents on my web pages. I
    want to be able to show the date the word document was last
    modified next to each link. My pages are straight html.
    Thanks.

    >but I would have to go to each individual file (I have
    hundreds) and put this code on each link.
    No, you can use the FileSystemObject to get a list of the
    files in the directory. See if you can adapt this for your site:
    <link href="/CSS/dirlist.css" rel="stylesheet"
    type="text/css">
    <%
    Function FormatSize(SizeInBytes)
    if SizeInBytes > 1024^2 then
    FormatSize = formatnumber(SizeInBytes / 1024^2,2) & "
    MB"
    elseif SizeInBytes > 1024 then
    FormatSize = formatnumber(SizeInBytes / 1024,2) & " KB"
    else
    FormatSize = SizeInBytes & " Bytes"
    end if
    end function
    %>
    <%
    dim parts
    dim part
    dim BrowseLine
    dim RelLink
    dim i
    url = Request.ServerVariables("URL")
    Parts = split(URL,"/")
    for part = 1 to ubound(Parts)-1
    ' calc link
    RelLink = ""
    for i = 1 to ubound(Parts) - part - 1
    RelLink = RelLink & "..\"
    next
    If trim(BrowseLine) <> "" then
    BrowseLine = BrowseLine & "/"
    end if
    BrowseLine = BrowseLine & "<A href=" & RelLink
    & ">" & parts(part) & "</A>"
    next
    ' add "back" link
    BrowseLine = Browseline & "  " &
    "<A href='javascript:history.back();'><img
    src='/images/return.gif' border=0></A>"
    Response.Write "<P class = 'NavTop'>" & BrowseLine
    & "</P>"
    Dim fso
    set fso = server.CreateObject("Scripting.fileSystemObject")
    dim fldr
    dim fle
    %>
    <a href="../index.asp"><img
    src="../images/leftbanner.jpg" width="343" height="70"
    border="0"></a>
    <link href="/CSS/dirlist.css" rel="stylesheet"
    type="text/css">
    </p>
    <p></p>
    <table width="85%" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <th width="63%"><div
    align="left">   Document
    Name</div></th>
    <th width="14%">Size</th>
    <th width="23%"><div
    align="left">  Date</div></th>
    </tr>
    <%
    ' display folders
    for each fldr in
    fso.GetFolder(server.MapPath(".")).SubFolders
    %>
    <tr>
    <td class="FileName"> <a href='<%=
    fldr.Name %>'><img src="/images/folder.gif" border=0>
    <%= fldr.Name %></a></td>
    <td class="FileSize">  <%=
    FormatSize(fldr.Size) %></td>
    <td class="FileDate"><div
    align="left">  <%=
    FormatDateTime(fldr.DateLastModified,2)
    %></div></td>
    </tr>
    <%
    next
    %>
    <%
    ' display files
    for each fle in fso.GetFolder(server.MapPath(".")).Files
    dim ext
    ext = fso.GetExtensionName(fle.path)
    if (ext <> "asp") and (ext <> "scc") then
    %>
    <tr>
    <td class="FileName"> <a href='<%=
    escape(fle.Name) %>'><img src="/images/file.gif"
    width="14" height="16" border=0>
    <%= fle.Name %></a></td>
    <td class="FileSize">  <%=
    FormatSize(fle.Size) %></td>
    <td class="FileDate"><div
    align="left">  <%=
    FormatDateTime(fle.DateLastModified,2) %></div></td>
    </tr>
    <%
    end if
    next
    Set fso = Nothing
    Set fle = Nothing
    Set fldr = Nothing
    %>
    </table>
    <p><a href="/index.asp">Return to Home
    Page</a></p>

  • Storing the last modified date for files in a HashMap

    This method gets a list of all the .java files in the source subdirectory, gets the last modified date for them and stores the file name and last modified date in a HashMap.
    import java.util.HashMap;
    import java.io.FilenameFilter;
    import java.io.File;
    import java.util.ArrayList;
    public class myClass
         public static void main(String[] args)
              HashMap result = getLastModified();
         static FilenameFilter javaFilter = new FilenameFilter()
            public boolean accept(File dir, String name)
                return name.endsWith(".java");
         public HashMap getLastModified()
              HashMap lastModified = new HashMap();
              ArrayList javaFiles = new ArrayList();
              File sourceDir = new File(".\\Source");
              File currentFile;
              long lLastModified;
              //get a list of all the .java files in the source directory
              javaFiles=listFiles(javaFilter);
              //for all .java files get and store the last modified date
              for(int i=0; i<javaFiles.size(); i++)
                   currentFile=(File)javaFiles.get(i);
                   lLastModified=currentFile.lastModified();
                   lastModified.put(currentFile, lLastModified);
              return lastModified;
    }The problems I am getting are:
    >
    The method listFiles(FilenameFilter) is undefined for the type myClass
    and
    >
    The method put(Object, Object) in the type HashMap is not applicable for the arguments (File, long)
    can anyone help? What's the best way to go aobut this?

    Thanks for the replies abenstex I modified it so that javaFiles is now a File[] and made the change you suggested but I still have the second problem, here's the code so far:
    import java.util.HashMap;
    import java.io.FilenameFilter;
    import java.io.File;
    import java.util.ArrayList;
    public class myClass
         public static void main(String[] args)
              HashMap result = getLastModified();
         static FilenameFilter javaFilter = new FilenameFilter()
            public boolean accept(File dir, String name)
                return name.endsWith(".java");
         public HashMap getLastModified()
              HashMap lastModified = new HashMap();
              File[] javaFiles = {};
              File sourceDir = new File(".\\Source");
              File currentFile;
              long lLastModified;
              //get a list of all the .java files in the source directory
              javaFiles=sourceDir.listFiles(javaFilter);
              //for all .java files get and store the last modified date
              for(int i=0; i<javaFiles.length; i++)
                   currentFile=(File)javaFiles;
                   lLastModified=currentFile.lastModified();
                   lastModified.put(currentFile, lLastModified);
              return lastModified;

  • Force Crawler in Maint Mode to Ignore Last Modified Data and Re-Index All

    We are running SES 10.1.8.4 with the Siebel 7.8 data source patches 8533402 and 8624308 to index documents (PDF, XLS, DOC, PPT) via RMI and Decompression Tool in Siebel. This data source is virtually identical to the database data source.
    The crawler will not "fail" if the actual indexing of the attachment file itself fails. For example, if RMI is down on the Siebel server and the crawler runs, SES will index the document metadata returned in the SQL but not the document. If the client then starts the RMI utility and re-runs the crawler, the document that was not indexed will not be re-indexed because the data source's last crawl time is used against the data sources last modified date attribute.
    Here is the pseudo SQL for the initial crawler query in maintenance mode....
    SELECT .... FROM MY_VIEW WHERE LASTMODIFIEDATE > TIME OF LAST DATA SOURCE CRAWL
    We have found a way to update the data source's last crawl time (DS_LAST_CRAWL) in the EQ$_DATA_SOURCE table. For now, we simply are using SYSDATE - 1.
    This will allow the missed document to be returned in the initial query.
    However, it's the crawler's document-level last modified date check within the crawler that is preventing the re-index. Since the document's last modified date is the same as what SES has, SES skips over it thinking it has not changed. True, it has not changed but it was missed during the last re-crawl and we want it to be indexed again.
    The client does NOT want to perform a full re-index because of the anticipated volume of attachments.
    Is there any way to tell the crawler to ignore the document-level last modified date and re-index everything returned from the initial query? Perhaps one of the other columns in the EQ$_DATA_SOURCE (DS_STATUS, DS_CRAWLING_MODE) holds the key?
    Thanks!

    I think it might be possible to set ENQUEUE_STATUS = 'Y' in the table EQ_TEST.EQ$URL. You may need to call eq_adm.use_instance(1) before doing so.
    However I'm not sure of the full implications of doing this - DON'T DO IT ON A PRODUCTION SYSTEM without carefully testing on a development system.

  • Know an extension that searches for the file "last modified" date?

    I am working on a site with 80,000 pages and need to find an
    extension that will search all files within the site and populate
    the date each file was last modified. Know of an extension that
    will assist in this situation? Any ideas will help, thanks in
    advance!

    Ahh, so now your requirements are changing. You do not want a
    simple
    text file output after all, but instead a sortable list. So
    perhaps
    output as a csv that could be sorted within a spreadsheet.
    Altho 80000
    rows?
    It is a bit hard to believe that an organization with an
    80000 page
    website does not have inhouse gurus who could do this in a
    heart beat.
    E. Michael Brandt
    www.divaHTML.com
    divaGPS | divaFAQ
    www.valleywebdesigns.com
    JustSo PictureWindow
    mercuryfenix wrote:
    > I just finished the first scan and was not impressed.
    PageList creates an ugly
    > and nearly useless list of file name, title, path from
    page root, a link to the
    > file, last modified date and time, and some meta
    garbage. To top it all off,
    > you cannot sort it by any of these categories because it
    puts all the data into
    > a lousy html table- useless.
    > I could probably get buy with this, but it would be
    horrible....80,000 pages
    > to scan! O yeah, i forgot to mention it has a very low
    limit to how many files
    > it can scan in one scan!
    >
    > I still am in need of a better extension. Please keep
    helping.
    >

  • How can you find the Last Modified Date of a particular table

    Hi,
    I want to show to the LAST MODIFIED date of a particular table to the user before refreshing the table with new data. Experts please suggest me the way using JDBC-SQL connection.

    There is no generic SQL way for this. It depends completely on the features your DBMS offers. With Oracle you'd need to create column which gets updated in a trigger. I believe MS SQL Server offers a special data type for this, which is updated automatically. I don't know about others.

  • No dates in Last Modified Date or Added Date

    Hello.
    Due to some issues with our servers i'm unable to make any SR's so i hope to recive some answers here instead while that issue gets resolved.
    When looking in the colums "Added Date" and "Last Modified Date" certain activites have no dates there. When attempting to filter all the activities with a filter "Added Date Equals 'Blank' " ie all aktivites who do not have a date in Added Date, the results are 0 activites. I interpret this as the fields are not empty but for some reason the information is not displayed.

    781070 wrote:
    Hello.
    Due to some issues with our servers i'm unable to make any SR's so i hope to recive some answers here instead while that issue gets resolved.
    When looking in the colums "Added Date" and "Last Modified Date" certain activites have no dates there. When attempting to filter all the activities with a filter "Added Date Equals 'Blank' " ie all aktivites who do not have a date in Added Date, the results are 0 activites. I interpret this as the fields are not empty but for some reason the information is not displayed.As far back as I can remember, filtering by either of those fields has never worked.
    There are a number of reasons why the last modified or added date could be blank.

  • How to get last modified date and time of a file which is in apache server.

    Hi ,
    I need to get last modified date and time of a file in remote machine.
    This file is in remote machine which has apache server installed.
    I am trying to get this information by connecting to apache server from client by giving absolute URI of the file to file object.
    URI is got from apache server URL by using toURI method.
    when I use lastModified method , its throwing exception , because scheme of URI is not file.
    I can't give scheme as file because ftp server is not installed on that server
    Is there any other way to get this information .

    No, unless you can use an FTP client.

  • Saving form last modified in LiveCycle Designer as PDF version 1.4

    I have a PDF fillable form that was last modified/saved in LiveCycle Designer. The PDF is currently version 1.7, but I need to reduce it to version 1.4 (for compatibility reasons). The way I normally do this is to open the PDF in Acrobat and use the optimizer to save it down to version 1.4, but with this form I'm getting a message that says "The PDF document contains an Adobe XML form. Such files cannot be optimized." I downloaded the trial version of Designer ES4, but I'm not having any luck taking it down to version 1.4. Does anyone know if  it's possible to save down this kind of PDF to version 1.4?

    LiveCycle PDFs aren't normal Acrobat PDFs, they're an XML file with a wrapper - that's why you can't optimize them.
    You can't save to specific PDF versions, but you can change the target version of the form from Designer. I'm not sure what options Designer ES4 gives you but under the Defaults tab of File>Form Properties you can change the Target Version - I'm using ES2 can can change the compatibility back to Acrobat 7.0.5 (PDF 1.6).

  • BAPI -  user last modified Name, Date and Time in SU01 of a Particular User

    HI Experts,
    After searched a lot in SDN , i am posting this thread,
    I want to know any  Standard BAPI  to give LAST modified User name , time and Date in SU01 of a particular User.
    I checked * BAPI_USER_GET_DETAIL* , its giving LAST modified  time and Date in SU01, But I want Last modified user name as well.
    I have 2 questions related with the above scenario,
    1) Which BAPI gives the details of LAST modified User name , time and Date in SU01 of a particular User.
    2) Any Table is there to give details of LAST modified User name , time and Date in SU01 of a particular User for a time period ,
    For eg : 1 month, if i would have set the time line, it should give the three details .
    Regards,
    Saravana.S

    Hi,
    I am not sure, if there would be any BAPI particularly for giving such particular information. Even if you can, you  might have to call 2 BAPIs, one for finding the list of such users modified within 1 month eg., and then getting the mod date and mod time.
    BAPI_USER_GETLIST - this can be used for searching.. but tricky
    then you have to call another bapi for getting the details.
    One option is you can create a new Z BAPI using the table and get the results.
    Regards,
    Amit Mittal.

  • Search results not displaying correct last modified date

    Hello
    I have a bit of a strange issue.  I have a SharePoint site that was upgraded from SP2010 to SP2013.  A document has been created and uploaded into SharePoint on 1 August 2014 and the file has since been edited.  In the search results the last
    modified date is appearing as '8 January'.  Note that this document was not originally created from a blank one but was instead a Word document that was received by the user and then edited and then uploaded into SharePoint.
    I have checked my locale settings and everything is set to New Zealand.
    I have rerun a full crawl on my search database and this hasn't helped.
    Also, I have multiple sharepoint web applications on my server using the same search service application.  is it best to separate these out?

    Hi Martin,
    As I understand, the issue you encountered is the LastModifiedTime displayed incorrect in search result.
    If you go to CA > Search service application > Search schema, in Managed Properties, type LastModifiedTime, then you will get LastModifiedTime property. Click it and you will find the property is mapped to five crawled properties.
    I’d recommend you create a new managed property and only map it to ows_modified property. Then test the issue again.
    http://spvee.wordpress.com/2013/10/09/content-search-web-part-cswp-sort-by-modified-datetime/
    Regards,
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for

  • How to get the label of parent container?

    Hi I have a Canvas, Its label is "News". I added a text control in it and i want to set its text dynamically from the canvas label. But i dont know how to access the label of the Canvas "without" using the id of the canvas. like <mx:Canvas label="New

  • How do I stretch (or compress) the viewing time of a video clip in Elements 12?

    How do I stretch (or compress) the viewing time of a video clip in Elements 12?

  • How to pass a 'one of' parameter value to a sub-report

    I'm using CRXI. If I have a parameter which is a 'one of', what are my options for passing the values of that parameter to a subreport? Specifically I would like to know: Is this a good solution: convert the 'one of' parameter to multiple formulas(on

  • Dynamic sql query

    Hi, i neeed to create a table of data of other tables which needs to be executed in cursor level, for eg i need to create CURSOR cur IS select object_name from user_objects where object_type = 'TABLE' and object_name like '%JSP%' and rownum<3; creata

  • How do I add button states separately without Photoshop Layers?

    I realize I can make a layered Photoshop file to import buttons and their states into Muse using the "Place Photoshop Button.,.." but I would rather do them individually manually i.e. exporting each state from Photoshop as independent .png files into