Adding the file name to each page of a pdf

I need to find a script that will allow me to add the file name of a pdf to each page within the pdf. I need the file name to appear in one of the corners of the pdf.
for example if the file name is 001.pdf then I need to somehow attach that so it appears in one of the corners of ach page within the pdf
I have to do this for 20,000 pdf files so any help would be massively appreciated.
thanks
Jim

I assume you have Acrobat Pro for editing, although you don't say.
This should get you started by showing how to extract the name of one file (that you have selected) in the Finder and then to pass this to a JavaScript that is executed by Acrobat:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;">
tell application "Finder"
set theFile to selection as alias
set theTitle to name of theFile
end tell
tell application "Adobe Acrobat Pro"
open theFile
--now add theTitle to the bottom/centre of all pages
do script "this.addWatermarkFromText({ cText: \"" & theTitle & "\", nFontSize: 12, nHorizAlign: app.constants.align.center, nVertAlign: app.constants.align.bottom, nVertValue: 12});"
--uncomment one of these options
--close document 1 saving no
--close document 1 saving yes
end tell </pre>
I just noticed that you want the name in a corner - just change the word 'center' to 'left' or 'right'
Message was edited by: Bernard Harte

Similar Messages

  • Adding the file name and path to a document

    Is there a way to automatically generate the file name and path (i.e. 'P:\ARF530\BACKGROUND\diagram.ai') to a document without having to copy and paste from the explorer window?

    Hi,
    So to select the directory, in the WHNE-BUTTON-PRESSED trigger write,
         :<block_name>.<path_item_name> := GET_FILE_NAME(' ', NULL, NULL, 'Choose any directory.', OPEN_FILE, FALSE);
         IF SUBSTR(:<block_name>.<path_item_name>, LENGTH(:<block_name>.<path_item_name>)) != '/' AND SUBSTR(:<block_name>.<path_item_name>, LENGTH(:<block_name>.<path_item_name>)) != '\' THEN
              :<block_name>.<path_item_name> := :<block_name>.<path_item_name> || '\';
         END IF;and to open the file, write,
    DECLARE
      FT_File  TEXT_IO.FILE_TYPE;
    BEGIN
      IF SUBSTR(:<block_name>.<path_item_name>, LENGTH(:<block_name>.<path_item_name>)) = '/' OR SUBSTR(:<block_name>.<path_item_name>, LENGTH(:<block_name>.<path_item_name>)) = '\' OR :<block_name>.<path_item_name> IS NULL THEN
           MESSAGE('Please Enter file name before continue');
           MESSAGE('Please Enter file name before continue');
           RAISE FORM_TRIGGER_FAILURE;
      END IF;
      FT_File := TEXT_IO.FOPEN(:<block_name>.<path_item_name>, 'w');
    END;Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • Automatic DATE stamp on the file name of each picture

    How do we get the date to be saved in the filename?  such as IMG-20130925 ?? 
    Please.  I would really like to make sure my pictures have the date in the file when saved.
    And where can I find the File Properties... of each picture?
    Thanks!

    Correct. The file naming convention can not be changed.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How can I set the file name and folder for output to PDF from another application?

    I am developing an application in Microsoft Access where the printed reports are to be saved in PDF format for archive purposes. I can send the output to Adobe X, but the default file name is the Access report name and the folder selected is the one last used.
    What I need to do is to create the file with a specific name (which changes for each run) and to a specific folder (which also changes for each run).
    The language I'm using is Visual Basic for Applications which is located in an Access form that controls the report production.
    Any suggestions, please?

    Got it - many thanks.

  • How to change the file name of pdf file in html page?

    Hi,
    Actually my requirement is to upload 50 PDF files containing javascript in each file into flex page with the help of one html page.
    i did the the javascript part by using batch processing.
    now i want to call those pdf files one after another without changing the file name in html page
    the code written in html page is
    <html>
        <body>
            <object id="PDFObj"
                    data="http:\\localhost\pdf\20090807 - Batch 630.pdf"
                    type="application/pdf"
                    width="100%"
                    height="100%">
            </object>
            </body>
    </html>
    So every time i have to change that file name to acess another file.
    Is there is any other way to sort this problem????
    Plz anyone help me to sort out this problem with some code or some example.

    I once had a similar task for creating a webpage that I only use on my computer--a webpage that accesses PDF's and SWF's font previews from a list of fonts as "a href's".  What you must do is utilize the power of the command line, whether on a Mac on a PC or on Linux, Linux being the most powerful (although Mac IS Unix).  You must utilize variables, variable replacement, and then a command to print out the results of a "for" or "while" loop to a text file which will be your HTML file with each individual link automatically built into the HTML code.  You will have a list of 50 links.  If you are simply looking for a GOOGLE type functionality where you click on "Next" and "Previous" you will have to dig deeper into variable replacement--this I don't know how to do yet but there are books for command-line shell interpreters.  One shell interpreter is called "bash" (born-again shell) and there is a book on the market which gives a detailed example of how to replace variables in a shell script.  Again, I don't know how it works.  I will try to learn this at a later time when I am more seasoned with the basics of shell scripting.

  • Should the web page address be included in the file name in the meta data dialog box?

    In the page properties > meta data > below is a field with the label file name: (the the area to type in the field), after the field, it is labeled .html.
    I have 2 questions here.
    1. If I type in http//:www (my page url), do I include .html at the end? I didn't know if this is automatically added because it is off to the side of the field?
    2. If I type in the entire URL address: http//:www (etc, etc).html,    after closing the page properties dialog box, I make it a habit to double check my work. What happens is the http//:www.xxx changes to (htttpwww.xxx). It drops the //: on the URL.
    So would it be better to just type in www.xxx (without the http//:www.xxx)
    and do you type in the .html at the end?
    I am assuming this will help with SEO page ranking or at least makes it easier for the search engines to crawl your site??
    I hope this makes sense.
    Advise would be very helpful.
    Ben

    You are absolutely correct with the URL Ben. Taking your above example, you just need to type in "Services" in the file name and the webpage will be exported as services.html and the URl will be  www.xyz.com/services.html.
    All the webpages (be it parent page or child page) gets physically saved at the root directory of your website on the server (where your website resides).
    This name is just the name of the file using which it is physically stored and called from the server. It does not help search Engines to crawl deeper inside the website.
    As I explained, "name which you wants the .html file to be stored with" here means the name of the physical file which is getting saved on the server.
    Most users leave the file name same as Page name. If you have it different from page name then this will be the workflow :
    Page Name : About
    File Name : test
    domain : www.mysite.com
    Now if you are  using a Menu Widget, it will list "About" in the Menu. And when end user will click on "About" then it will call the file named "test.html" from the server location (where all the files of your website are stored).
    And it will open a page with address "www.mysite.com/test.html"
    Hope I am able to explain the concept of File Name here. Please let us know if you have further queries on this.
    Regards,
    Sachin

  • Can I add the file name and page numbers to multiple pdfs automatically?

    Hello.  Thanks first for taking the time to read this!  We are a small non profit hospice.  Looking to take a large amount of files and put the patients last name (which is the file name) and a page number on the footer of every page of every document.  For example.  File Name Smith.  Smith 1 Smith 2 Smith 3 etc.  However I like to be able to do this to multiple files at once and not have to open each one up.

    Go to Advanced - Document Processing - Batch Processing...
    Click New Sequence and give it a name.
    Now select the sequence you've created, click Edit Sequence, click Select Commands.
    Select Execute JavaScript from the left-hand side, and click Add.
    Now select it on the right-hand side and click Edit.
    Paste the code from my previous post into the window, and click OK twice.
    Now, back in the Edit Sequence window, select the folder you want to run the batch on, and the output folder. Be aware that if you choose the same folder, the original files will be overwritten, so you might want to use a different one.
    Under Source File Options, deselect everything.
    Click OK.
    You're now ready to run the batch sequence!

  • Does anyone know how to use pages so you can export pdfs from the internet and automatically drag words from the document into the file name of the pdf (i.e., author, title of a scientific paper)

    Does anyone know how to use pages so you can export pdfs from the internet and automatically drag words from the document into the file name of the pdf (i.e., author, title of a scientific paper). For example, if I am downloading a paper by smith called "Surgery" that was published in 2002, it will automatically set the file name in the download to smith- surgery 2002. I have heard pages is smart enough to do this.
    thank you

    Pages can export only its own documents. They may be exported as PDF, MS Word, RTF or Text files.
    Pages can import (ie. Open a file as, or Insert a file into, a Pages document) documents in several formats, but won't rename the document as you describe. Documents that can be Opened (eg. Text, AppleWorks 6 WP, MS Word files) are converted to Pages documents, and retain their original names, with .pages replacing the original file extension. Files that can be Inserted (generally .jpg, .pdf and other image files) become part of the existing Pages file and lose their names.
    It may be possible, using AppleScript, to extract the text you want and to Save a Pages file using that text as the filename, but that would depend in part on being able to identify which text is wanted and which is not.
    How will the script determine where the author's name begins and where it ends?
    How will the script recognize the beginning and of the title, an decide how much of the title to use in the filename?
    How will the script recognize the year of publication?
    For papers published in a specific journal, with a strict format for placing each of these pieces on information, or containing the needed information as searchable meta data in the file, this might be possible. But it would require knowledge of the structure of these files, and would probably handle only papers published in a specific journal or set of journals.
    Outside my field of knowledge, but there are some talented scripters around here who might want to take a closer look.
    Best of luck.
    Regards,
    Barry

  • How can I edit the file name of the home page?

    How can I edit the file name of the home page?
    Gr Ammani

    I have a similar issue with regards to the filename...
    When I navigate to my website, it doesnt work unless I actually type the filename at the end of it. Example: type in "www.whitelion.com" (this is my real domain name) and it doesnt work. When I type in "www.whitelion.com/index.html" then it works.
    This is obviously inconvenient because my clients will never know to add the filename to the end of the site.
    Is there any setting or way to get the page to appear by just typing the original domain name without adding the extension?
    Thanks,
    Emelia

  • How to add page count of PDF to the file name?

    I need help with an applescript that can look at a pdf, determine the page count in file and then add that value to the end of the file name in front of the .pdf
    ex.
    original name "map with pages4c.pdf"
    renamed "map with pages4c_48.pdf"
    Any help would be appreciated or suggestions on how this could be done.
    Thanks,
    John

    Hello
    That's quite simple.
    Just replace this chunk of code -
    tell application "Finder"
    set n to f's name
    set f's name to (n's text 1 thru -5) & "_" & p & ".pdf"
    end tell
    with -
    if 10 > p then set p to "0" & p
    tell application "Finder"
    set n to f's name
    set f's name to (n's text 1 thru -5) & "_" & p & ".pdf"
    end tell
    By the way, if there are 10000 files in directory tree, I'm afraid Finder is too slow to get files list. In order to avoid Apple Events timeout error, at least, replace this line -
    tell o to run
    with -
    with timeout of 3600 seconds
    tell o to run
    end timeout
    Or try the following script, which employs find(1) instead of Finder to get files list.
    All the best,
    Hiroto
    --SCRIPT3
    on run
    --main((choose folder with multiple selections allowed) as list)
    main((choose folder) as list)
    end run
    on open aa
    main(aa)
    end open
    on main(aa)
    (* list aa : list of folder aliases *)
    script o
    property ff : {}
    -- confirmation for safety
    set AppleScript's text item delimiters to {ASCII character 0}
    set aa to (aa as Unicode text)'s text items
    set AppleScript's text item delimiters to {""}
    set aa to (choose from list aa default items aa ¬
    with prompt ("You're renaming pdf files in following folder tree(s).") ¬
    with multiple selections allowed)
    if aa = false then error number -128
    -- process each folder
    set k to 0
    repeat with a in aa
    set a to a as alias
    -- get pdf files' POSIX path list (= ff)
    set ff to {}
    set sh to "find " & quoted form of POSIX path of a & " -type f -name \"*.pdf\" -print"
    try
    set t to (do shell script sh)
    on error
    set t to ""
    end try
    set px to count t's paragraphs
    set p0 to 1
    repeat -- in order to avoid stack overflow in getting large number of paragraphs at once
    set p1 to p0 + 3500
    if p1 ≥ px then set p1 to -1
    set ff to my ff & t's paragraphs p0 thru p1
    if p1 = -1 then exit repeat
    set p0 to p1 + 1
    end repeat
    if ff = {""} then set ff to {}
    -- process each pdf file
    repeat with f in my ff
    set f to f as POSIX file as alias
    tell application "Adobe Acrobat 7.0 Professional"
    --open f
    open f with invisible
    tell document 1
    set p to count pages
    close
    end tell
    end tell
    if 10 > p then set p to "0" & p
    tell application "Finder"
    set n to f's name
    set f's name to (n's text 1 thru -5) & "_" & p & ".pdf"
    end tell
    set k to k + 1
    end repeat
    end repeat
    -- decent notice
    tell application (path to frontmost application as string)
    display dialog ("Total of " & k & " pdf file(s) renamed successfully.") ¬
    with icon 1 giving up after 5
    end tell
    end script
    with timeout of 3600 seconds -- just in case
    tell o to run
    end timeout
    end main
    --END OF SCRIPT3
    Message was edited by: Hiroto (fixed typos)

  • How can I remove the list of 20 recently saved items when you click on the arrow on the far right side of the File Name screen for images, web pages, ect?

    When I right click and go save image/page/ect as the file save popup screen appears and on the right side of the File Name bar there is an arrow. If you click the arrow it shows the last 20? items that have been saved and their save location. Is there anyway to not have the list of recent items there or at the very least a way to clear them? I'm running Firefox 17 on Windows 7.
    Also when you save items as you were typing in the name you want to save them as it used to show filenames with the same name as you type that are saved in that directory so instead of typing the whole filename or copy/pasting you could start typing a filename and then hit the up or down arrow, backspace and just change the end of the filename without having to retype the entire filename.
    Hopefully you understand what I mean and can help me fix it, thanks.

    It's in the proper directory. I can scroll down the window on the right and see the files but if I start typing the file name of one of them the autocomplete drop down thing that shows matching file names does not appear. In the back of my mind I'm starting to think a setting got changed and then the list of matching file names stopped appearing but I can't recall what setting may have been changed, if it was a firefox or microsoft change or for certain if anything got changed at all. Yeah I know I'm not helping my own cause but what can you do.

  • Exporting Layers to PNG files using each layer name to create the file name??

    Hi All
    I'm trying to sort the following problem and was hoping somebody here could help with a scripting solution - my knowledge extends as far as actions unfortunately - which I don't think is appropriate for this.
    I've created a User interface in Illustrator with many layers and have exported this as a psd with layers.
    Basically what i'm wanting to do is export every layer as a png file while using the layer name to create the file name - each layer needs to be clipped.
    There is no transparency in the png.
    I've run the export to files script - but the names are too long and there is no anti aliasing.
    I've tried running a script from Illustrator - but it doesn't see sub layers - and doesn't name the layers.
    any help would be appreciated.
    thanking you in advance
    regards
    nate

    Hi,
    We just released this tool: FERRY (http://ferry.thedamarmada.com). It does exactly what you want and a little bit more.
    I think it's worth it a try.
    It comes with a free demo that will export 5 layers.
    Take a look and let us know if it's what you need.
    It could be easily tweaked.
    Jordi

  • How can I insert the file name automatically on all pages?

    I would like that on all pages of my keynote presentations the file name is inserted automatically in a footer as eg in EXCEL and Word.

    Oh yeah! Very similar to that one is Print Window. I use it all the time.
    http://www.printwindowapp.com
    It costs $20 if you want all the extra features the free version doesn't have. But I've always used the free version. Nothing in the paid version I need.

  • Can we remove timestamp which is added infront of the file name, in archive

    Can we remove timestamp which is added infront of the file name of datafile which was imported succesfully , in archive folder, i have a requriment to move file from archive folder  to another folder, but programmer is finding diffficulty in moving the file which has time stamp, he can move file with date stamp, but not able to move file which has time stamp, is there is any option in MDIS.Ini file or anywhere in import manager or console to modify the file names , or remove timestamp when file is moved in archive folder.
    does anyone faced similar issue, require help.........

    Hi,
    Moving file from Ready directory to Archive directory is MDM internal process and I strongly feel it is not possible to control the naming convention of File to be placed in Archive directory.
    But you can explain what problem you developer is facing while moving file from Archive directory to some other directory..then we can think about solution to acheive this. Also on which operating system you MDM server is installed.
    Regards,
    Shiv

  • Previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once before. Recently that isn't happening. How do I get that feature back?

    When downloading, previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once. Now that isn't happening. How do I get that feature back?

    When downloading, previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once. Now that isn't happening. How do I get that feature back?

Maybe you are looking for

  • How can I remove the Endnote Separator Line from Pages?

    Hello! I am creating a book using Pages and have lots of footnotes (Currently running Pages 5.2.2).. There is an Endnote Line Separator which I am trying to remove. Does anyone know how to remove this line? We don't want it in the final design & are

  • WEI could not measure video performanc​e , brand new w530 I7 quad

    WEI could not measure video performance , brand new w530 I7 quad I keep getting this error still have no score at all in the WEI. here is log 60388 (8976) - winsat\logging.cpp:0815: --- START 2013\12\8 19:52:57 PM --- 960404 (8976) - winsat\main.cpp:

  • Integration Engine Message Id in ABAP Proxy

    Hi, I have a scenario sending to XI from CRM using an ABAP Proxy. I need to get the message id generated in the local Integration Engine when a message is sent via the ABAP Proxy or received into the ABAP Proxy. I see there is a way of doing this in

  • Evdre report wizard 5.1 version

    Anybody know how get back to evdre report builder from report/schedule screen, I only find" edit schedule using srug and drop" link. but I would like to edit the schedule using the ecdre builder Thanks,

  • I cannot get safari to work

    I think safari was thrown away how can I get it back I'm using Mac OS X  Version 10.6.4, I have  only basic skills, any help would be great, but please walk me through it, I'm an idiot on this thing. I am so frustrated, I need help Please