Batch font face and size change

Hi everybody,
I'm looking to create a batch action/script the will select and change the font face and size in a series of .eps files of barcodes.
I'm not sure if it's a scripting thing because I've never scripted before.
If anyone could point me in the right direction or tell me how to do it (action or script)  I'd be very grateful.
(Each image contains the barcode and three text elements, all Helvetica 24pt which I want to change to OCRB 18.5pt, on about 120 images)
Thanks chaps

Try something like this
#target illustrator
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
Validate User Input.
function validateInput()
     if(dlg.input_panel.input_edt.text == "")
            alert("Error, please define an input directory to convert.", "Error:");
            return -1;
    return 0   
Define input Directory
function getInput()
    var input_folder = Folder.selectDialog( 'Select the directory where you wish to open the files: ', '' );
    if (input_folder != null)
        dlg.input_panel.input_edt.text = input_folder.fsName;
Open an eps file
function openFile(open_file)
    var open_options = new OpenOptions();
    open_options.updateLegacyText = true;
    app.open(open_file, DocumentColorSpace.RGB,open_options);
@Return return the index on the system for a font
function getIndex()
    var fontIndex = -1;
    for(var i=0; i<app.textFonts.length; i++)
            if(app.textFonts[i].name == "ArialNarrow-Bold")
                    fontIndex = i;
    return fontIndex;
Loop through text and change type
function changeText()
    var index_value = getIndex();
    if(index_value > 0)
        var grayColour = new GrayColor();
        grayColour.gray = 100;
        for (var i = 0; i< app.activeDocument.textFrames.length; i++)
                app.activeDocument.textFrames[i].textRange.characterAttributes.textFont = app.textFonts[index_value];
                app.activeDocument.textFrames[i].textRange.characterAttributes.kerningMethod = AutoKernType.AUTO;
                app.activeDocument.textFrames[i].textRange.characterAttributes.size = 10;
            app.activeDocument.textFrames[i].textRange.characterAttributes.fillColor = grayColour;
                for(var j=0; j<app.activeDocument.textFrames[i].textRange.characters.length; j++)
                    app.activeDocument.textFrames[i].textRange.characters[j].characterAttributes.baselineShif t = 0;
                    app.activeDocument.textFrames[i].textRange.characters[j].characterAttributes.leading = 12;
                    app.activeDocument.textFrames[i].textRange.characters[j].characterAttributes.tracking = 0
                    app.activeDocument.textFrames[i].textRange.characters[j].characterAttributes.rotation = 0;
                    app.activeDocument.textFrames[i].textRange.characters[j].characterAttributes.horizontalSc ale= 100;
                    app.activeDocument.textFrames[i].textRange.characters[j].characterAttributes.verticalScal e= 100;
            redraw();
        for( var i=0 ; i < app.activeDocument.textFrames.length; i++ )
            for ( p=0 ; p < app.activeDocument.textFrames[i].paragraphs.length ; p++ )
                app.activeDocument.textFrames[i].paragraphs[p].justification = Justification.CENTER;
                app.activeDocument.textFrames[i].paragraphs[p].selection = true;
        alert("Finished");
    else
        alert("Arial Narrow Bold is not installed on your system!", "Error:");
Save and close File
function saveFile()
    app.activeDocument.close(SaveOptions.SAVECHANGES);
Main
function main()
    if(validateInput() == -1)
        return;
    var input_folder = new Folder(dlg.input_panel.input_edt.text);
    var files_array = input_folder.getFiles( '*.eps' );
    logStatus ("c:\\boarder_report.csv", "SIZE", "FILE NAME", "STATUS");
    logStatus ("c:\\boarder_report.csv", "SIZE", "FILE NAME", "STATUS");
    for(var i = 0; i <= files_array.length; i++)
openFile(new File(files_array[i]));
changeText()
        saveFile();
    alert("Done Processing Files");
Create GUI
function buildGUI()
    dlg = new Window('dialog', 'RPSTL Add Box Tool', [100,100,480,225]);
    dlg.input_panel = dlg.add('panel',[5,10,375,80], 'Input Directory');
    dlg.input_panel.input_txt = dlg.input_panel.add('statictext', [10,12,125,25], 'Browse for Input  Directory:');
    dlg.input_panel.input_btn = dlg.input_panel.add('button', [10,30,110,50], 'Browse');
    dlg.input_panel.input_edt = dlg.input_panel.add('edittext', [120,30,350,50], '');
    dlg.start_btn = dlg.add('button', [250,85,375,110], 'Start Conversion');
    dlg.input_panel.input_btn.onClick = getInput;
    dlg.start_btn.onClick = main;
    dlg.show();
buildGUI();

Similar Messages

  • Creating form - want to change font style and size in more than one field at a time HOW??

    creating form - want to adjust font style and size in more than one field at a time - HOW??

    Select the fields with the mouse, right-click one of them, go to Properties
    and set the settings you'd like them all to have.
    On Wed, Jan 21, 2015 at 8:51 PM, chuckm38840797 <[email protected]>

  • Email font style and size

    Lately my email font style and size setting will not save.  I have to keep setting them each time I type an email. I do not want to use the default style and size. Why is this not working even though I follow the suggested instructions in the Settings area? Thank you.

    I have the same problem as kakingsbury. THIS IS A SUDDEN PROBLEM WITH VERIZON EMAIL. PLEASE SEND A FIX TO YOUR USERS, VERIZON!
    Recipients of my email (browser is Chrome) cannot read it because though I send it in 12 font, they receive it in "too small to read" font even when I change the size to 16. Tried changing from RTF to plain text but since the New Verizon email does not allow email in plain text it automatically adjusts back to RTF. 
    Tried changing the settings in Chrome Advanced settings then logging out and closing browser. Seems to work. Not sure if recipients will be able to read it.

  • Set default font type and size in formcreated using Acrobat X Pro

    I have a word document that I used Acrobat X Pro to create a PDF and then a Form.  The Form has over 200 text fields.  Is there a way to globally set the font type and size to one type, for instance Arial 10 so that when someone opens the Form and fills it in, the global font type and size is preset         

    Are you talking about fields that you create manually or field created with the Form Wizard? Exactly what version of Acrobat are you using? What OS?
    In any case, using a script is a quick and easy approach:
    for (var i = 0; i < numFields; i++) {
        var fName = getNthFieldName(i);
        var f = getField(fName);
        if (f.type === "text") {
            f.textFont = font.Times;
            f.textSize = 9;
            // Other properties go here
    I use this type of thing all the time to quickly alter a form. Such a script isn't added anywhere, just executed (e.g., JavaScript console). Over time a developer can build up a collection of utility scripts that can do all sorts of things to dramatically speed up development. It would be bad if this option were not available.
    If there is a bug, it should certainly be addressed, so don't think I'm arguing against that, but I'm not seeing it on any of my systems. I can successfully set the default field properties by selecting "Use Current Properties as New Defaults". The Form Wizard does not use these defaults, but that's a different matter.

  • Add font types and sizes to ICWC HTML e-mail editor

    Hi,
    I'm working with ICWC e-mail component and I'm wonder to know how can I add more font types and sizes to HTML e-mail editor. At the moment i just have 5 font types and a few font sizes.
    Thanks a lot in advance,
    Nuno Moreira

    Hello Nuno,
    Just try this:
    First you have to upload your .ttf font by using se73 transaction.
    Then you must map it, using this tables:
    SAP: TBTFFONTMAPDEF
    Customer: TBTFFONTMAP
    Just add a line in customer table TBTFFONTMAP with your font (or existing one), and the language that will be used by the users (It accepts wildcard * for all languages)
    And it's done.
    Best Regards,
    Bruno

  • Modifying Java font type and size

    Hi! I'm not sure if this is the right forum for this but I might as well try. I play a lot of Yahoo Chess which uses a java software to launch its program. I'm a new Macbook user and before when I was in Windows/PC, the font type and size setting was okay. Now I barely can read the font whenever I launch Yahoo Chess (using Java) in my Macbook.
    Any help would be appreciated. Thanks!
    Macbook Core 2 Duo with 2 GB Ram   Mac OS X (10.4.9)  

    Hi,
    Which font and font size did you use in your applet? Do you have sample code that could demonstrate the problem? This may have to do with the difference in font aliasing between MS VM and Sun JVM.
    Stanley Ho
    Java Deployment Tech Lead
    Sun Microsystems

  • How can I reset the font type and size on my email. It changed after I updated to Firefox 5.0 and I can't get it back.

    After updating to Firefox 5.0 the font changed on my email. I checked, and the default setting is what I had put in before the update but it's not working. How can I get my email to use the font and type size that I chose? The one that's currently being used (since after the update) is so tiny one can hardly see it. My email program is through yahoo but there doesn't seem to be a way to change it at the email site. I'm not terribly PC savvy so please respond with a detailed/explicit answer. Thanks for any help you can give me with this. I have Windows XP and use Firefox as my browser.

    Hi again...,,yes, I did try the "reset zoom" on the email compose message page and nothing happened. I'm not familiar with add-ons. Went to the address you suggested (DefaultFullZoomLevel) but don't know how to use it. Also, I don't want to enlarge the text on all web pages.....just the email page. By the way, if it makes a difference, I think I forgot to mention that I use AT&T/Yahoo webmail....not Outlook Express or Thunderbird or any other email program. I'm not familiar with those and don't want to change email programs. Thanks again for trying to help with this. I'm beginning to think this problem is "unfixable" and considering changing back to a previous edition of Firefox (IF that's even possible).

  • Is it possible to change the font name and size without having to compile?

    Dear All
    We have one requirement that we need to change the font name and font size at run time dynamically without having to compile all the forms in 6i.
    Is there any way or work around to achieve the same.Kindly suggest us.
    something like using uifont.ali or forms60_defaultfont, or set_item_property
    Thanks and Regards
    Thangaraj.

    Dear All,
    Thanks for your updates, Technically what both of you said is correct. but in application server we used something like ClientDPI to match the client server font with the application server, i need to know that is there anyother way something like this...?
    I have read one document(Note:28397.1 in metalink) saying that using uifont.ali file we can change the font at run time, but i have used this only for report
    Thanks and Regards
    Thangaraj.S

  • Is it possible to change the font style and size of the front panel title?

    Can you change the style and size of the Front Panel Window title?  I seem to have no luck.  I seem to be stuck with only 1 font/style.  I would like to use a superscript for 1 of the letters in the title.  Is this possible?  If it isn't this would be a nice feature to have in the future.  I am using LabVIEW 8.5.1.

    Things like the window title font is a function of Windows - not LV. You can change it globally, but not on a window by window basis.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Flash Application Font-Face and Font-Style

    This is a similar thread to one I posted earlier but this one is
    more detailed to explain my problem
    Does anyone know how to change the programs font-face,
    font-size, font-style etc ... of the console? I'm referring to all
    of the outer workspace area, not the stage.
    I found the image below at some website by google just to
    illustrate:
    http://cis2.stvincent.edu/martincc/introwpd/flash/flashscreen.jpg
    See the panels on the right side?
    Swatches, Character, Sound panels. On my computer, the font
    size for these words and for everything inside these panels are
    microscopic. They are so small it can't be read unless you stare at
    it for a while.
    How do I change the font size or face for these fonts?
    Now you see the top of the screen, where it says "
    File Edit View Insert Modify Text Control Window Help"? All
    of these font sizes are perfectly normal just like everything on my
    computer. I also use Adobe Photoshop CS 8.0 and the panel window
    fonts are perfect as well as everything else, so I know that it is
    a problem only with my Flash 5.0.
    I would appreciate any help you guys can give me, as it takes
    me forever to work on a project, I have to stare for a while to
    figure out what the panel text says.

    anyone have any ideas on how to change the window panel text
    size?

  • Stuttered scrolling and size changing

    If I use the thumbnail size slide bar at the bottom right corner of iPhoto to change the view of either events or faces or photos within albums it is incredibly slow and stuttered, to the point of it taking several attempts to grab and slide the bar. Often the pinwheel/beachball will appear for a few seconds.
    I've checked my activity log and my processor rises to 50%-75% during these attempts, but it does not appear maxed out such as when I'm video editing.
    Also, just scrolling through events thumbnails is a bit stuttered until I've scrolled the full set (ie pulled them all into memory) and then its smooth.
    Why is this? I have plenty of memory (3GB) most of which is currently free, a pretty quick processor 2.8ghz intel dual-co, and all the photos on my internal drive.
    Is there a way I can increase the caching size that iPhoto can use?
    I get really frustrated with slow/stuttered performance but maybe I'm just being to intolerant? I've posted a similar thread on iTunes which I am finding the same problem. I feel like I've got a pretty high end machine so this should all be silky smooth?
    Any tips or help gratefully received.
    Thanks,
    Dan.

    Rebuild the library as follows: launch iPhoto with the Command+Option keys depressed and follow the instructions to rebuild the library. Select the last option.
    Click to view full size
    That can make a significant different in the load speed of iPhoto. You may have to redo it from time to time depending on how much work you do in Faces and Places.

  • @font-face and font licenses

    Hello,
    I'm working with a developer who has a licensed version of Adobe's "Univers" font. Can we use @font-face from CSS 3 to include this font in our website? Or, do we need to use a different type of font-embedding in order to work with the font's licensing type.
    Thanks,
    erichb2010

    I thought you meant font-family. If this font is already included with Snow Leopard, why do you need to embed it? Just refer to it and include a fallback. Windows users won't see the font - bummer for them.
    No, you may not extract the font from the operating system and serve it up on your own web site. You can't include Apple files even if you are writing an application that only runs on Macs. If a resource is available on the system, you can use it. You may not copy it except as a backup. You certainly can't distribute it.

  • Color and size changed when upgraded to photoshop CS5

    Hi, I created a flyer in an older version of photoshop and when I upgraded to CS5 the colors and print size changed. This is particularly distirbing b/c this is a flyer/advertisment for work that was almost at the final stage. They are quite small changes, but changes that need to be corrected just the same. The colors look different (duller) on the screen and in print while the size became smaller when I print (to pdf and the printer). My print settings are the same as before as are my color settings (CMYK). I am fairly new at creating flyers in photoshop, so I am hoping this is a simple fix. Thanks.

    Are you 100% certain you are using the same color profiles throughout? That print size issue might be specific to your printer driver... CS5 has a completely rewritten print handling which may not correctly cooperate with your printer driver or conversely the driver might need to be updated...
    Mylenium

  • Can i change address book font?  and size?

    can I change my address book font and font size?  operating system is OS 10.9

    OK, I just answered my own question.  But since there have been so many questions on this forum over the years - about changing fonts/sizes/colors - I thought I would share what I learned with others.  Remember that I'm using OS 10.9 and Contacts 8.0. and this may not apply to older or future versions:
    Whe you are in "Contacts," click on "File" and drop down to "print."  Click on "Print."
    A printer page will come up.  On this page, look at the lower righthand quadrant.  You are given a choice to select either "layout" or "label."  Click on "label."  Now you will see, the bottom of that block, the word "Font."  Immediately following that word, you will read the name of the font that "Contacts" is pre-set for, which, in my case says "System Font Regualr-12.0."  To change this font, you now click on the button to the right that says "Set."  When you click on "set" a drop down menu will appear.  Voila!  From here you can choose your preferred typeface, color, and font size. 
    Have fun. Glad I could help myself.  Hope this helps you!

  • Font and size changes  in design view  don't appear

    I am using the trial version of Dreamweaver CS3 on my G5 Mac
    (Leopard), and whenever I make changes to the font and font size,
    it does not appear in the design- although the code is there (in
    both the css that I create or specific to the paragraph) and then
    it shows up when I save and go to browser. Is there some secret to
    making the changes viewable as they are being made rather than
    having to go to the browser every time before one can see them? It
    doesn't seem very practical to only be able to view them in a
    browser and not while you are making changes so you know if it is
    what you want... can someone please help me with this? I'd like to
    buy CS3, and use Dreamweaver, but it won't save me any time if I
    have to keep going back to the browser before I can see the changes
    I've made.

    On Sat, 29 Dec 2007 01:44:29 +0000 (UTC), "Norma Jean
    Almodovar"
    <[email protected]> wrote:
    >I am using the trial version of Dreamweaver CS3 on my G5
    Mac (Leopard), and
    >whenever I make changes to the font and font size, it
    does not appear in the
    >design- although the code is there (in both the css that
    I create or specific
    How are you making the changes - using the properties box in
    CSS mode
    - or in an external style sheet.
    ~Malcolm N....
    ~

Maybe you are looking for

  • Change  GL account for valuation classes

    This is vasanth . my client has different 5 plants  . he wants to change gl account for valuation class.because the reason is  (rawmaterial of steel&cement is being stored in spares and stores). The g/l account is 23010001 . This gl account has been

  • How to handle Null value in Database Adapter

    I configured the DA Adapter, with operation type as "Perform an Operation on a Table - Select" and added few where clause parameters (StreetNo, StreetName city, country, state, zipcode)too. If we won't enter any value for any of the column in the tab

  • Acrobat Pro version 8 doesn't create pdf documents using Windows 7

    I run Windows 7 on my PC and have installed Acrobat Professional 8.  When I try to create a pdf (or using the pdf printer), it just hangs up and won't create the document.  Any fixes for this? Thanks.

  • Problem with attachMovie

    I have a movieClip that is a rounded rectangle, with 9-scale slicing turned on, and a linkage of "border" in my library, set to export in first frame. I am attempting to place this as a background behind a code-created text field. My code is as follo

  • Question about comapring schema by toad

    Hi all , I've tried to figure out what is this mean but i couldn't find the answer. i've got a file that is a result of comparing bewteen two schemas by Toad. there is something that i couldn't realize : Object Name                      Object Type