Add filename to an illustration

Hi, I'm very "green" with scripting. I would like to automatically add the name of the file next to my illustration. I'm working in Illustrator CS4 on Windows XP. For example, the file name would be "12345-001" and that would be added in a specific font and size next to my illustration. These files would be in ".ai" format. Thanks for any help you may have.

This may get you started. It should create a text frame below the artwork. Then place the files name and center the text.
#target illustrator
function main() {
if (app.documents.length == 0) {
alert("Please have an 'Illustrator' document before running this script.");
return;
var docRef = app.activeDocument;
with (docRef) {
var docName = name.substring(0, name.lastIndexOf('.'));
var thisPad = 18; // Points gap
var artBounds = visibleBounds;
var textTop = artBounds[3] - thisPad;
var textLeft = artBounds[0];
var textWidth = artBounds[2] - artBounds[0];
var textHeight = 24;
//var myFont = textFonts.getByName('Swiss721BT-Roman');
var rectRef = pathItems.rectangle(textTop, textLeft, textWidth, textHeight);
var areaTextRef = textFrames.areaText(rectRef);
with (areaTextRef) {
contents = docName;
textRange.paragraphAttributes.justification = Justification.CENTER
//textRange.characterAttributes.textFont = myFont;
textRange.characterAttributes.size = 18;
main()

Similar Messages

  • How can i add filename on a document in pages 5.1 ?

    I am allways using a template to make documents, that I save under different names. How can I add the (changed) filename in the footer of a saved document ?
    It is important to me to print the filename on document, to find and edit it on my mac later.
    In MS Word it is easy to automaticaly add filenames, path, author and other filedata to the document. I can't find how to do that automatically in Pages templates.
    I saw earlyer answers to this question on this community, but they don't work as I expect, or only on earlier versions of pages.....  I trust there is an easy way to do this.
    Can someone help me please ?

    That function, present in "Pages 09" (i.e. Pages 4.3) , was not included in Pages 5.0-5.1.  (Nor were nearly 100 other such features, from mail merge and bookmarks to non-contiguous text selection, 2-up page viewing and the ability to set alternating left/right margins, headers & footers.Version 5.1 is also notably buggy. One work around, or partial work around, is to click the file name at the top of the window document. You can then select the filename, copy it  and paste it whereever you like. As far as I can see, however, there is no way to include the path: all you get is the filename and extension.

  • I want to add hyperlink in the illustrator file and want the output in the PDF

    I want to add hyperlinks in the illustrator file and want the output in the PDF.
    I tried to add the multiple hyperlinks on the text and images in the illustrator by using the attribute panel but the links are not working in the published PDF.
    Is there is any other method to create a hyperlink in the illustrator?
    Can anybody help me out in this
    Thanks

    Interesting, Carlos.
    There's another method by JET: Re: hyperlinks in Ai

  • How do I automatically add filenames as keywords?

    I want my filename to always be added as a keyword/metadata.

    darn okay. i name them according to a hr/mm convention for race photos. then they only have to search for the hh/mm.
    thx for the help though
    Show me your passion and I'll immortalize it.
    Scott [email protected]om
    Date: Wed, 17 Feb 2010 09:40:46 -0700
    From: [email protected]
    To: [email protected]
    Subject: How do I automatically add filenames as keywords?
    First, I still don't understand why anyone would want to search by file name if search by keyword was available.
    Putting the file name into a keyword essentially defeats the purpose of keywords. If you have 1000 files in your Lightroom Library Module, then you have 1000 distinct keywords, and I can't see how that is useful to anyone.
    But the bottom line is that I don't think Lightroom has the capability of putting file name into the keyword field.
    >

  • Add filename AND rotate to match mask angle?

    Hello,
      I'd like to be able to automatically add a document's filenmame to a series of masked files. Thanks to a previous question (http://forums.adobe.com/thread/547382?tstart=0) I have a series of 'panels' files that have all been saved out from a master file. There are hundreds of them and that last script was a giant help.
      I could probably figure this out if it weren't for the fact that some of the documents contain masks that are not rectangles. All masks have perfect vertical edges and most have horizontal tops and bottom. However, quite a few have angled top and/or bottom edges.
      Any advice on how I can create some javascript that can automate the process of labeling these files? This could be run on a series of files, or one at a time if needed. It would have to:
    1) determine the filename of the document being 'labeled'
    2) insert the text into the mask path item as the top item in the mask.
    3) determine the angle of the top of the mask
    4) rotate the text item to match the mask angle if other than horizontal
    5) inset the label from the edge slighlty (configurable in the script?)
    6) Outline the lable text
    I have attached a sample file that roughly illustrates the kind of file the script might be used on.
    Thanks,
    Tony

    Hi, first thanks and second i have good news.
    As you may have noticed KERNELS parameter usually changes and thus the rule does not apply, but the path /dev/input/by-id don't change, so:
    Create a udev rule:
    ## /etc/udev/rules.d/99-fix-jsx-eventx.rules ##
    SUBSYSTEM=="input", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="0745", KERNEL=="js[0-9]*", RUN+="/usr/local/bin/fix-jsx-eventx.sh"
    Then create the script to change permissions:
    ## /usr/local/bin/fix-jsx-eventx.sh ##
    #!/bin/bash
    sleep 5
    chmod a-r-w "/dev/input/by-id/usb-Microsoft_Microsoft®_2.4GHz_Transceiver_v7.0-if02-event-joystick"
    chmod a-r-w "/dev/input/by-id/usb-Microsoft_Microsoft®_2.4GHz_Transceiver_v7.0-if02-joystick"
    The "sleep 5" is necessary because the eventX is not immediately created, making that permissions aren't applied correctly.
    # chmod +x /usr/local/bin/fix-jsx-eventx.sh
    After that, reload rules
    # udevadm control --reload
    Then replug the device and voilà! Both problems solved, get rid of fake joystick and working multimedia keys.
    Bye!"
    PD: Google translated...
    Last edited by ThecaTTony (2015-05-01 07:43:00)

  • Add filename and path to Designer form footer.

    I am somewhat of a novice at creating forms in Livecycle designer and need help adding a filename and path to the footer of a form after clicking on the "save as' button.  I have not found any answers anyplace so help would be greatly appreciated ASAP. Thank you!!

    Create a field on your masterpage. Get rid of the caption, appearance=none and set as Protected. Also set your width to expand to fit. In the layout:ready event of your field, add this JavaScript:
    this.rawValue=event.target.path
    That should do it.
    Kyle

  • Is there any way to add filename as text on videos

    I'm using Premiere Pro CS4 on Windows.
    I've got 100's of clips.  I need to pick out a few of them for a video I''m doing...
    They are AVCHD clips (individual Videos).  So I can either open each one of them in something like VLC Player or watch them on the preview window within Premiere.
    I would like to pull all clips into Premiere Pro and have it add the filename to the videos and render it as something I can just sit and watch.  Then when I see a clip I like, just note the filename.
    Does anyone know of a way to get Premiere Pro to automatically add this data to each clip on the timeline?
    Thanks,
    Doug

    Typically this is done why sitting in front of the NLE.

  • Weird Z and Y key swap and arabic filename problems in Illustrator CS3

    Hi
    I am having some very weird problems with Illustrator CS3.
    At completely random times, the software starts to think my Y and Z keys have swapped places. i.e. When I type anything or use any shortcuts, the opposite letters appear and are used.
    Also from time to time, when I save a file, the filename is written in Arabic and I have to rename the file again in Explorer to correct this.
    Both of these problems are random and a restart or Illustrator usually fixes both of these. But what a pain and waste of time.
    Anyone else getting problems like this?
    Oh, I'm using Windows Vista.
    Thanks
    Mr M

    My guess is, it is related to Windows. Try to press shift and ctrl at once if the problem occurs. The keys should be switched back...
    You have probably installed more than one keyboard in Windows. Shift-ctrl is the standard way to switch between them. You can change this in the Windows keyboard configuration file.
    I had this problem with a German and a VS keyboard installed.

  • Automatically add Creator metadata to Illustrator files?

    I'm trying to figure out a way for Illustrator to grab the "Owner" information (what you see when you command+I the .ai in the Finder) and copy that into the Creator metadata field everytime the file is altered and saved.
    Any ideas on how to do this? I'd like this process to be invisible, because there's no way I'll get all our designers to remember to enter in their name as Creator everytime they alter a file.
    We just need to keep track of who touched which file last, and Version Cue just won't work with our workflow...
    Laker's tickets? Headscratch? Land in Montana?
    TIA!
    Travis.

    You can add stuff manually in the File>File Info
    It might be possible to script this information into the File Info
    All that info will come up in Acrobat under File>Document Properties.

  • XI: Combine File - add filenames at bottom

    When combining files (e.g. jpg) to 1 PDF I would like to add the source filename + date (EU format) at the bottom of the each page.
    It would roughtly be as follows:
    the combine files steps as usual
    then a sequ that adds the original filename+date at the bottom of the image
    see below
    Regretfully the filename stamper isn't really suitable for this job (it only adds the name of the 'produced' filename, so, 'binder.pdf' or whatever other output filename).
    Any suggestions?
    Acrobat XI Pro
    Thanks
    =

    File stamper uses the the name of the open PDF not the source PDF. I would convert the files to PDFs and stamp them before merging them.

  • HOWTO Automator: Add filename to PDF header?

    I have a list of PDF files to which I would like to add a text (filename of the PDF file) in a header of that same file (with white background box if possible). It is a sort of a watermark but with dynamic text.
    For example  234.pdf > add "234.pdf" to a header of the 234.pdf > save changes

    This workflow works for me
    The results
    Message was edited by: Frank Caggiano - Added screen shot of output file

  • How to add greek letters to illustrator file?

    Hi all,
    I am trying to add some greek letters to my plot in Illustrator cs3. But I really do not know how to do that. Someone help me please.
    Thinks in advance.
    Rainingpeace

    >...use your character map utility to copy&paste them into AI.
    Assuming you have the necessary font(s), you can also use the Glyph palette/panel in Illustrator.

  • Add filename as a keyword tag

    Is there a way to automatically add the filename of the picture as a keyword tag to the picture itself?
    I ask this because the pictures I upload to Flickr, for example, just show the filename value if the metadata field Title is empty, otherwise it uses the value from Title and Caption, metadata fields I use to describe the pictures. So, I end up losing the information to link the local picture to the published one.
    I understand that doing this, if possibile, would hugely increase the number of keyword tags: 2000 pictures = 2000 different keyword tags used by a single picture. And that could slow down LR.
    Anyone have an idea?

    See
    Filename as a keyword. A simple Forum Search would have brought this up. IT isn't that old.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Trying to add filename and path in footer of Word doc and it only lets me "Convert to PDF"?

    I am running MS Office 03 and just installed Acrobat 9.0 Pro. When I try to insert the Filename and Path from the insert option of the footer properties, it only gives me the option to "Convert to PDF". I don't know why it's doing this, but it started after the install of Acrobat 9.0. What should I do?

      To get the path ... event.target.path;
    To get the file name .... event.target.documentFileName;

  • Elements 6.0 How to Add Filename in Organizer????

    How kdo yo0u get the filename to show in the organizer window with the details view on? I had Elements 3.0 and you could change this under Edit>Preferences but it doesnt givhat option in 6.0. Is there a different way to have the filename be listed in addition to the date etc? Please help!

    Cliff,
    Thank you so much for your prompt response! I really appreciate it.
    Steve

Maybe you are looking for

  • Error While Submitting the Custom Report

    Hello, We have requirement on reports 6i to customise a standard report 'Sales Journal By Customer'. Requirement is we need to add a new fields in the layout. We have copied the standard program and parameters and defined a new custom program and als

  • How do I save changes to album info in "Get Info?"

    I know this has been asked before, but I haven't found any answers related to recent versions of iTunes. Running latest version on Windows 7.  When I make changes to fields in the "Get Info" screen on an album, the changes don't save -- when I go to

  • Spry Menu Issue

    My page is here:  http://www.healthquestpt.com/lwh/ The first 2 tabs dropdown menus work fine, the rest just arent there.  Please help.  Thanks!!

  • How to store more data in data base column

    hi   i want to store 801 values in one column of data base. i tried but i was able to store/write only 10 values.can any boly help me in this matter........ Abhimaniu

  • When trying to use YouTube on Apple TV, I get error "No content was found"

    When trying to use YouTube on Apple TV, I get error "No content was found". I was able to use the YouTube before on the Apple TV, and suddenly I am getting this error for that last month. Please advise. Thank you.