Get Postscript Name of used Fonts in Document

Hi,
    I need to get postscript font name of fonts used in InDesign Document.  Document Contains both text font and graphic fonts. When I am using the below code its returning text fonts used in document with "MT-Extra" font but "MT-Extra" font is showing as graphic. This line of code is returning text font with "MT-Extra" alone but other graphic fonts are missing. 
alert("Fonts Used in Doc \n" + app.activeDocument.fonts.everyItem().postscriptName)
How can I get all fonts (both text and graphic fonts) name using scripting.  Can anyone help me.
Thanks in advance,
Sudha K

Hi,
   If i use this code alert("Fonts Used in Doc \n" + app.activeDocument.fonts.everyItem().postscriptName) its not returning all graphics fonts.
   Also, list of result fonts name is getting differ by using the below codes don't know why.
alert(getFonts());
Method 1:
alert("Fonts Used in Doc \n" + app.activeDocument.fonts.everyItem().postscriptName)
Method 2 :
function getFonts()
    var usedFonts = [];
    var usedFontsStr = "";   
    var docFonts = app.activeDocument.fonts;
    for(var i = 0; i < docFonts.length; i++)
        var psFontName = docFonts[i].postscriptName;
        usedFontsStr = "#" + usedFonts.join("#")  + "#";
        if(usedFontsStr.match("#"+ psFontName+"#") == null)
            usedFonts.push(psFontName);usedFontsStr = "#" + usedFonts.join("#")  + "#";
    return usedFonts;
Method 1 would return fonts used in document know then why this variation.
- Sudha K

Similar Messages

  • Not able to get group name by using memberof class, getting Total groups as 0 even I am member of that group.

    Not able to get group name by using memberof class, getting Total groups as 0 even I am member of that group. Through this memberof class I am trying to find full qualified name(DN) of my group.
    code I have used:
    //specify the LDAP search filter
                   String searchFilter = "(&(objectClass=user)(CN=Username))";
                   //Specify the Base for the search
                   String searchBase = "";
    Also I have used,
                 String searchFilter = "(&(objectClass=user)(CN=Username))";
                   //Specify the Base for the search
                   String searchBase = "ou=ibmgroups,o=ibm.com";
    But in both cases I am getting value for Total groups as 0.
    Code Reference:
    * memberof.java
    * December 2004
    * Sample JNDI application to determine what groups a user belongs to
    import java.util.Hashtable;
    import javax.naming.*;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    public class memberof     {
         public static void main (String[] args)     {
              Hashtable env = new Hashtable();
              String adminName = "CN=Administrator,CN=Users,DC=ANTIPODES,DC=COM";
              String adminPassword = "XXXXXXX";
              String ldapURL = "ldap://mydc.antipodes.com:389";
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              //set security credentials, note using simple cleartext authentication
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              //connect to my domain controller
              env.put(Context.PROVIDER_URL,ldapURL);
              try {
                   //Create the initial directory context
                   LdapContext ctx = new InitialLdapContext(env,null);
                   //Create the search controls          
                   SearchControls searchCtls = new SearchControls();
                   //Specify the search scope
                   searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
                   //specify the LDAP search filter
                   String searchFilter = "(&(objectClass=user)(CN=Andrew Anderson))";
                   //Specify the Base for the search
                   String searchBase = "DC=antipodes,DC=com";
                   //initialize counter to total the group members
                   int totalResults = 0;
                   //Specify the attributes to return
                   String returnedAtts[]={"memberOf"};
                   searchCtls.setReturningAttributes(returnedAtts);
                   //Search for objects using the filter
                   NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchCtls);
                   //Loop through the search results
                   while (answer.hasMoreElements()) {
                        SearchResult sr = (SearchResult)answer.next();
                        System.out.println(">>>" + sr.getName());
                        //Print out the groups
                        Attributes attrs = sr.getAttributes();
                        if (attrs != null) {
                             try {
                                  for (NamingEnumeration ae = attrs.getAll();ae.hasMore();) {
                                       Attribute attr = (Attribute)ae.next();
                                       System.out.println("Attribute: " + attr.getID());
                                       for (NamingEnumeration e = attr.getAll();e.hasMore();totalResults++) {
                                            System.out.println(" " +  totalResults + ". " +  e.next());
                             catch (NamingException e)     {
                                  System.err.println("Problem listing membership: " + e);
                   System.out.println("Total groups: " + totalResults);
                   ctx.close();
              catch (NamingException e) {
                   System.err.println("Problem searching directory: " + e);
    Any help will be highly appreciated.

    Not able to get group name by using memberof class, getting Total groups as 0 even I am member of that group. Through this memberof class I am trying to find full qualified name(DN) of my group.
    code I have used:
    //specify the LDAP search filter
                   String searchFilter = "(&(objectClass=user)(CN=Username))";
                   //Specify the Base for the search
                   String searchBase = "";
    Also I have used,
                 String searchFilter = "(&(objectClass=user)(CN=Username))";
                   //Specify the Base for the search
                   String searchBase = "ou=ibmgroups,o=ibm.com";
    But in both cases I am getting value for Total groups as 0.
    Code Reference:
    * memberof.java
    * December 2004
    * Sample JNDI application to determine what groups a user belongs to
    import java.util.Hashtable;
    import javax.naming.*;
    import javax.naming.ldap.*;
    import javax.naming.directory.*;
    public class memberof     {
         public static void main (String[] args)     {
              Hashtable env = new Hashtable();
              String adminName = "CN=Administrator,CN=Users,DC=ANTIPODES,DC=COM";
              String adminPassword = "XXXXXXX";
              String ldapURL = "ldap://mydc.antipodes.com:389";
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
              //set security credentials, note using simple cleartext authentication
              env.put(Context.SECURITY_AUTHENTICATION,"simple");
              env.put(Context.SECURITY_PRINCIPAL,adminName);
              env.put(Context.SECURITY_CREDENTIALS,adminPassword);
              //connect to my domain controller
              env.put(Context.PROVIDER_URL,ldapURL);
              try {
                   //Create the initial directory context
                   LdapContext ctx = new InitialLdapContext(env,null);
                   //Create the search controls          
                   SearchControls searchCtls = new SearchControls();
                   //Specify the search scope
                   searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
                   //specify the LDAP search filter
                   String searchFilter = "(&(objectClass=user)(CN=Andrew Anderson))";
                   //Specify the Base for the search
                   String searchBase = "DC=antipodes,DC=com";
                   //initialize counter to total the group members
                   int totalResults = 0;
                   //Specify the attributes to return
                   String returnedAtts[]={"memberOf"};
                   searchCtls.setReturningAttributes(returnedAtts);
                   //Search for objects using the filter
                   NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchCtls);
                   //Loop through the search results
                   while (answer.hasMoreElements()) {
                        SearchResult sr = (SearchResult)answer.next();
                        System.out.println(">>>" + sr.getName());
                        //Print out the groups
                        Attributes attrs = sr.getAttributes();
                        if (attrs != null) {
                             try {
                                  for (NamingEnumeration ae = attrs.getAll();ae.hasMore();) {
                                       Attribute attr = (Attribute)ae.next();
                                       System.out.println("Attribute: " + attr.getID());
                                       for (NamingEnumeration e = attr.getAll();e.hasMore();totalResults++) {
                                            System.out.println(" " +  totalResults + ". " +  e.next());
                             catch (NamingException e)     {
                                  System.err.println("Problem listing membership: " + e);
                   System.out.println("Total groups: " + totalResults);
                   ctx.close();
              catch (NamingException e) {
                   System.err.println("Problem searching directory: " + e);
    Any help will be highly appreciated.

  • Creating new user get message "Name is used by an other user"

    10.9.2.
    Trying to create a new user getting the message "Name is used by an other user" under the short name. 
    How can I remove the remnants of this user that I suppose has been transferred when I migrated the users from an old mac to this one?  Becuase it might have been there in the past, but has been deleted.  Needless to say there is presently only one user in the 'Users & Groups' control panel.  And this one is not using this name. 
    I tried in Terminal
    sudo rm -rf /Users/ShortName\\ deleted
    (ShortName to be replaced by the name of the account it refuses to create). This does not make a change.

    I found the solution here:
    http://reviews.cnet.com/8301-13727_7-20102973-263/stubborn-user-accounts-returni ng-when-deleted-in-os-x/
    Thanks to Topher Kessler

  • Problem in Getting host name by using request.getHostName() on solaris 9

    Hi there,
    I'm trying to get the machine name of the system from which the request was initiated by using request.getHostName() on Solaris 9 but it is giving me the IP Address of the machine which har sent the request to the server and the same thing is running on Windows and AIX platform. Can anyone tell me any solution to this problem.
    Thanks in advance.
    Nitin Jain

    Hi Nitin,
    Following is the specification for getRemoteHost()
    "Returns the fully qualified name of the client that sent the request, or the IP address of the client if the name cannot be determined. For HTTP servlets, same as the value of the CGI variable REMOTE_HOST." I think the same would be true for getHostName().....
    So, this can be one possiblity why ur given IP.

  • Help with image file names when using Import Word document feature

    Hello,
    I am using File >> Import >> Word document into an HTML template.  If the Word document contains images, the images are written to the directory specified in my Site Default Image Folder.  Here is my question: As I was teaching myself the Import function, one time the images were automatically named to match the page name.  So for example, if my page is named Create.html, the images would be named Create_image001.jpg, Create_image002.jpg, etc.  I can't remember how I enabled this feature (or maybe I was dreaming) but if anyone knows how to control the name of the images imported from MS Word, please let me know.  I've searched and Googled for hours and can't find a way to control the image file names.
    Thanks in advance,
    Shellie

    I was hoping that this would be fixed in the 10.8.2 upgrade but it has not.  Anyone have any luck?  Earlier today I was trying to write a paper and navigating between 10 pdfs was a nightmare without being able to hover my mouse for the titles like I used to. 

  • How do I resolve a "'FOND' font association usability" error message? I've upgraded to Yosemite and now I get this message when using Font Book to add fonts I've used for years.

    I just updated my MacBook Pro and iMac desktop to Yosemite 10.10.2.
    Now I am having font problems. I tried to add fonts I have used for years using FontBook, but it says 'FOND' font association usability and warns me to not use these fonts.
    This happens on both my laptop and desktop.
    Any idea what to do? I use these fonts (about 12-15 fonts from the Times, Helvetica Neue and Giovanni families) regularly in my work.
    Thanks,
    Scott

    I just updated my MacBook Pro and iMac desktop to Yosemite 10.10.2.
    Now I am having font problems. I tried to add fonts I have used for years using FontBook, but it says 'FOND' font association usability and warns me to not use these fonts.
    This happens on both my laptop and desktop.
    Any idea what to do? I use these fonts (about 12-15 fonts from the Times, Helvetica Neue and Giovanni families) regularly in my work.
    Thanks,
    Scott

  • Get a font's file name from the font's postscript name (on Windows)

    I am trying to obtain the the font file name when the only information I have is the font's 'postscript' name. (Emphasis: the font's name is postscript and not the font).
    For example I have the following postscript name: TimesNewRomanPSMT.
    The real name that is saved in the registry is: Times New Roman (TrueType).
    Is there any way of obtaining that name from the given postscript name?
    Currently I am coding this for Windows, but it should be compatible, or at least have alternative code for MacOS

    Funny. I'm having the same problem and was about to post the exact same question
    In Photoshop, there is "app.fonts", which lets you get a font's postscript name from the font's name. This doesn't exist in After Effects.
    My only hope is that there's a way to get a font's postscript name in Visual Basic. I'll let you know if I find anything useful.

  • How to get the actual font name from a font file?

    Hi
    I have only the font Path I have to get the font name from that path. Any idea how to get the actual font name?
    Thanks,

    I would ask you these questions:
    Why do you need to do this?  What are you ultimately trying to accomplish?
    Are you really asking about the InDesign SDK?
    Do you really need to get the "name" of a font from an arbitrary file?  Or do you want information about a font installed on the system?  If so, what OS?
    Do you need to be able to handle any font format?
    Which font "name" do you mean?
    What language do you want the name in?
    (1) It's not clear what you're trying to accomplish.  A bit more information about your ultimate goal would be helpful.
    (2) This question is not at all specific to the InDesign SDK.  Are you really trying to do something in the context of an InDesign plug-in?  If so, you probably want to look at IID_IFONTFAMILY and the IFontFamily::GetFamilyName function.
    (3) If you are asking more generally, Windows and Mac both have system API calls to get this information, although those tend to deal with installed system fonts, not with arbitrary font files per se.
    Also, you can parse the name table from a True Type or Open Type font without using any system APIs; as True Type and Open Type are well-documented standards.  I would start by reading these:
    The Naming Table
    Font Names Table
    (4) Although there are other standards, such as Type 1 (PostScript) fonts, and True Type Collection files and other formats, especially on Mac.
    (5) Also, when you start down this road, you will quickly realize that your seemingly simple question is actually ambiguous, and that the answer is kind of complicated, because a font can have many names (a family name, a full font name, a style name, a PostScript name, etc.).
    (6) And not only does a font have multiple names, it can have each of those names in multiple languages and encodings.
    Any clarification would make this a better question.

  • How to get the name of a (custom) component

    Hi,
    I would like to know whether there is a way to get the name Xcelsius uses for instance in the Object Browser. Getting the components "name" property doesnt return this information.
    Thanks in advance.

    String myFileName = request.getRequestURL().substring(request.getRequestURL().lastIndexOf("/")+1);
    or with javascript
    <H1><script>document.write(document.location.href.substring(document.location.href.lastIndexOf("/")+1))</script></H1>
    bye! :)

  • Function to get operation name

    please let me know how we will get operation name by using function in the BPEL

    Hi,
    Have a look into the following link, there is no "operation name"... But there's composite name and application name that may be useful for you...
    http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_appx_functs.htm#CJACABGA
    Cheers,
    Vlad

  • How to get the name and the path of the font used in photoshop (not textItem.font)

    I'm trying to get the real name of the font and the path, is there a "easy" way to do it ?
    i need to get the font file (*.ttf or *.otf) and copy to the same directory as the psd file, that's why textItem.font doen't work for me.
    thanks in advance

    You could try this as it looks as if you are using Windows.
    Run the VBS script to create a fontlist file on the desktop.
    Then run the javaScript on the PSD document.
    It should copy the fonts to the same folder as the document, it will also create a text file with a list of fonts.
    It didn't find all the fonts in my test psd maybe because it wasn't in the windows/font folder?
    VBS.
    Set wshShell = WScript.CreateObject("WScript.Shell")
    Set wshSysEnv = wshShell.Environment("PROCESS")
    sMyFile = "c:" & wshSysEnv("HOMEPATH") & "\Desktop\Fontlist.txt"
    Dim objFileSystem, objOutputFile
    Dim strOutputFile
    Set objFileSystem = CreateObject("Scripting.fileSystemObject")
    Set objOutputFile = objFileSystem.CreateTextFile(sMyFile, TRUE)
    Dim str
    Const HKEY_LOCAL_MACHINE = &H80000002
    strComputer = "."
    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")
    strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Fonts"
    objReg.EnumValues HKEY_LOCAL_MACHINE, _
    strKeyPath,arrEntryNames,arrEntryZZZ
    For Each entry in arrEntryNames
    str = wshshell.RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts\" & entry)
           objOutputFile.WriteLine(entry & "," & str)
    Next
    objOutputFile.Close
    javaScript.
    #target photoshop;
    app.bringToFront();
    main();
    function main(){
    if(!documents.length) return;
    try{
    var Path = activeDocument.path;
    }catch(e){
        alert("This document needs to be saved before running this script!");
        return;
    var FontFile = File(Folder.desktop + "/FontList.txt");
    if(!FontFile.exists){
        alert("You need to run the vbs script first to create the FontList file!");
        return;
    var FontList = new Array();
        FontFile.open('r') ;
    while(!FontFile.eof){  
       strInputLine =FontFile.readln();
       if (strInputLine.length > 3) inputArray  = strInputLine.split(",");
       if(inputArray.length == 2) FontList.push([[inputArray[0]],[inputArray[1]]]);
    FontFile.close();
    var PSDtextLayers = getNamesPlusIDs();
    PSDtextLayers = UniqueSortedList(PSDtextLayers);
    for(var a in PSDtextLayers){
        for(var f in FontList){
             var rex = new RegExp;
             rex = PSDtextLayers[a].toString();
            if(FontList[f][1].toString().match(rex,"i")){
                var From = new File("/c/windows/fonts/" + FontList[f][1].toString());
                var To = new File(Path + "/"+  FontList[f][1].toString());
                From.copy(To);
                break;
    var rFonts = new File(Path + "/required Fonts.txt");
    rFonts.open('w');
    rFonts.write(PSDtextLayers.join('\n'));
    rFonts.close();
    function UniqueSortedList(ArrayName){
    var unduped = new Object;
    for (var i = 0; i < ArrayName.length; i++) {  
    unduped[ArrayName[i]] = ArrayName[i];
    var uniques = new Array;for (var k in unduped) {
       uniques.push(unduped[k]);}
    return uniques;
    function getNamesPlusIDs(){
       var ref = new ActionReference();
       ref.putProperty( charIDToTypeID( "Prpr" ), charIDToTypeID( 'NmbL' ));
       ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
       var Names=[];
    try{
        activeDocument.backgroundLayer;
    var i = 0; }catch(e){ var i = 1; };
       for(i;i<count;i++){
           if(i == 0) continue;
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            if(layerName.match(/^<\/Layer group/) ) continue;
            if (desc.hasKey(stringIDToTypeID('textKey'))){
                desc = desc.getObjectValue(stringIDToTypeID('textKey'));
                desc = desc.getList(stringIDToTypeID('textStyleRange')).getObjectValue(0).getObjectValue(stringIDToTypeID('textStyle'));
                var postScriptName = desc.getString( stringIDToTypeID('fontPostScriptName'));     
    Names.push(postScriptName);
    return Names;

  • CS2- How to get the fonts used in a document ?

    Hi,
    Can anyone tell how to find the the fonts used in the document directly without iterating through the text art used in the document.BCOZ if i iterate through each text frame or character my plugin works very slowly.I want to speed up the process of finding & replacing the fonts like wat we do manually in the "Type-> Find Font" menu thru my code.
    Please post ur comments on this .If there is no direct option to find &replace the fonts used in the document ,pls let me know the simplest logic of finding & replacing all occurances of a font in a doc so that my process of doing this should be faster.
    Thanks in advance.
    myRiaz

    As far as I know, there's no way to get a list of fonts in use in a document without iterating over the document and compiling a list by asking every piece of art.
    If you want to trigger 'Type > Find Font' there might be a way to invoke that using Actions (AIActionManager.h). I'm not sure if that would help or not though.
    This probably isn't very helpful depending on what you're doing, but I think this is meant to be handled by using character styles. That way you can change a style and update any related text instantly. Not much help though if you're just trying to write a S&R font plugin.

  • Not getting the Document name when using CSWB

    happy New Year all!
    Am using SP Online.
    I have inserted the Content Search Web Part on a subsite to pull documents from a main list located on the parent site.
    It works ok but the result I am getting is the first line inside the document, so all I get a 10 identical results.
    team meeting
    team meeting
    team meeting
    How can I get the actual document name?
    Thank you
    Pierre
    pgg02

    Hello Sekar,
    I think I figured out the problem but still is strange.  Am trying things but SharePoint Online is extremely slow.
    When I created the library list, I only created 2 columns, one called "Name" the other "Tower", other columns got in like  automatically and are created by:, modified by, modified date.
    I went to edit one of the documents, and that's when I saw a field called "title" which does not appear See below:
    Columns
    A column stores information about each document in the document library. The following columns are currently available in this document library:
    Column (click to edit)
    Type
    Required
    Title
    Single line of text
    Tower
    Choice
    Created
    Date and Time
    Modified
    Date and Time
    Created By
    Person or Group
    Modified By
    Person or Group
    Checked Out To   
    Person or Group
    but in the column ordering screen see
    Field Order    
    Choose the order of the fields by selecting a number for each field under "Position from Top".
    Field Name  
    Position from Top   
    <input name="numSelects" type="hidden" value="3" />
    Name
    <select name="FormPosition0" title="Name: Position from Top"><option selected="selected" value="FileLeafRef">1</option>   <option value="FileLeafRef">2</option>   <option value="FileLeafRef">3</option>         
    </select>
    Title
    <select name="FormPosition1" title="Title: Position from Top"><option value="Title">1</option>   <option selected="selected" value="Title">2</option>   <option value="Title">3</option>         
    </select>
    Tower
    <select name="FormPosition2" title="Tower: Position from Top"><option value="Tower">1</option>   <option value="Tower">2</option>   <option selected="selected" value="Tower">3</option>         
    </select>
     A field called "Name" mysteriously appeared.
    The text in the "Name" fields was the same for all items so that explains why I was getting 10 times the same result.
    I went back to my list and copied the unique file name (library of word documents) into the "Name" field. But now when I am finally able to try the query I get the same results as before.?!
    here is the KQL
    path:"https://proposalforcondo.sharepoint.com"  (FileExtension:doc OR FileExtension:docx OR FileExtension:xls OR FileExtension:xlsx OR FileExtension:ppt OR FileExtension:pptx OR FileExtension:pdf) (IsDocument:"True"
    OR contentclass:"STS_ListItem")
    The result I get is:
    RelevantResults                       
                    (8)           
                        Home.aspx               
                            proposalforcondo.sharepoint.com/Home.aspx.docx                   
                        CARLETON CONDOMINIUM CORPORATION NO. 12               
                            proposalforcondo.sharepoint.com/C12_MINUTES_Oct 28...                   
                        CARLETON CONDOMINIUM CORPORATION NO. 12               
                            proposalforcondo.sharepoint.com/C12_MINUTES_July4_...                   
                        CARLETON CONDOMINIUM CORPORATION NO. 12               
                            proposalforcondo.sharepoint.com/C12_MINUTES_Septem...                   
                        CARLETON CONDOMINIUM CORPORATION NO. 12               
                            proposalforcondo.sharepoint.com/C12_MINUTES_July31...                   
                        CARLETON CONDOMINIUM CORPORATION NO. 12               
                            proposalforcondo.sharepoint.com/C12_MINUTES_June17...                   
                        CARLETON CONDOMINIUM CORPORATION NO. 12               
                            proposalforcondo.sharepoint.com/C12 - MINS_June 25...                   
                        CARLETON CONDOMINIUM CORPORATION NO. 12               
                            proposalforcondo.sharepoint.com/C12 - MINS_June11_...
    Any suggestion?
    Thanks again
    Pierre
    pgg02

  • [JS][CS4]List fonts used in the Document

    Hi to all scripting gurus,
    I have this following script that returns a list of fonts used in the document:
    function fontused(){               var fontscoll = document.fonts;               for(var i = 0; i < fontscoll.length; i++){                       var font = fontscoll[i];                       alert(font.name);                } }
    The above is working OK my problem is that it also list the fonts used in the placed illustrator files (.eps). Is there some kind of parameter or something that i can use so that it only list the fonts used in the text?
    -CharlesD

    Charles
    Doesn't time fly?
    This will give you the idea, if when you find more exceptions add them in a likewise manner.
    The "if" statements check that tables, headers, etc. exists otherwise an error will be throw.
    Enjoy
    Trevor
    P.s. I had planned on updating the script after David highlighted the problem, just didn't get round to it.
    // Script to find fonts in documents which are not just in content pasted from illustrator file
    // By Trevor http://forums.adobe.com/message/4807396#4807396
    var   myFonts="",
            uniqueFonts = {}, n;
    if (app.documents[0].stories.everyItem().textStyleRanges.length > 0) fontsIn (app.documents[0].stories.everyItem().textStyleRanges.everyItem().appliedFont)       
    if (app.documents[0].stories.everyItem().tables.length > 0) fontsIn (app.documents[0].stories.everyItem().tables.everyItem().cells.everyItem().textStyleRanges.everyItem().appliedFont)
    if (app.documents[0].stories.everyItem().footnotes.length > 0) fontsIn (app.documents[0].stories.everyItem().footnotes.everyItem().textStyleRanges.everyItem().appliedFont)
    for (n in uniqueFonts) myFonts+=(uniqueFonts[n])+"\r";
    alert(myFonts)
    function fontsIn (item)
            var l = item.length;
            while (l--) uniqueFonts[item[l].name] = item[l].name;

  • Sharepoint 2010 -Script to get file name from Document Library

    Hi 
    can anybody send be script that works in "SharePoint 2010 management Shell" to get list of file names in document library.
    Thank

    See my updated answer. The double quotes need to be removed. Also note that you need to use $item.File.Name
    and not $item.Name to get the name of the files.
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

Maybe you are looking for

  • HP Support Assistant indicates low disk space on primary station C:

    Hi, My system is a HP Pavilion 500-130ed with Windows 8.1, 64 bits. I'm running version 7.4.45.4 of the HP Support Assistant, currently the most recent version according to same.  I get the message 'low disk space on primary station C:'  (my translat

  • "current encoder settings for bit rate and sample rate are invalid" message

    I have some files I am working with. Details and what happened: Had some music files where I was doing some trimming/splitting. Files worked fine in itunes. Open the files in Quicktime Pro 7 to trim them. Exported to aif. Opened the files with itunes

  • Javax.servlet classes...  very quick to answer

    I have downloaded the javax classes, but I have no idea how to install them... when I try and compile code including import javax.servlet.*; I get the error package javax.servlet.http does not exist. I have installed tomcat 4.0.1, and I have set my J

  • Logout has timed out

    I can't seem to get my macbook pro to shut down, one or another Mac application, Mail, Safari, iCal (pick one) won't shut down and I get the Logout error, forcing me to force quit at least one application. Huge pain to shut down each day.

  • Need to upgrade Photoshop and Premier Elements for new OS

    Our hard disk crashed and when we had it replaced, they upgraded our OS to Windows 7.  How do we upgrade Adobe Photoshop and Premier Elements?