Minumum and Maximum pointsize in the active document with font name

hi
How to find the font with point size in active document and how to get the minimum point size and maximum point size used in the active document with font name
Thanks in Advance.

Okay, that does look good (without testing it). Does it do its job?
I think it can be made a bit more efficiently by not running over all text frames, but rather over all stories in the document -- a small change, the rest can stay the same.
You can also try turning the gathering of used data around. It appears you are now pushing every item immediately into your array, then weed out duplicates. (For my thoughts on the latter, see below!) It might be quicker and more memory-efficient to scan your present array to see if the new item is already in there, and only push when it's not. (Bonus points for a binary tree implementation -- the fastest possible way! But a linear search on the entire array, or on a sorted array and bailing out if you go "past" the current item, may be fast enough.)
(On Weeding out duplicates; you might want to skip this, as it won't be necessary for the above:)
Your function UniteSame sorts out and removes duplicates by comparing every item to every other one; then it sorts the array. An alternative can be to
1. Sort the array
2. Create a new empty one
3. Push an item of the original onto the new one.
4. Skip items of the original list while they are the same as the bottom one of the new list.
5. Until you run out of items.

Similar Messages

  • I try to 'Print booklet' and receive an eror that "the active document uses multiple page sizes..."

    I try to 'Print booklet' and receive an eror that "the active document uses multiple page sizes..." but all the pages on my document are in the same size (as far as I know)
    How can I deal with this eror?

    This seems to be a bug, and so far the only workaround I know is  to copy/paste everything into a new file.

  • How can I print ONLY the active document?

    Whenever I go to File/Print the darn PSE 9 program sends all of the working files in the bin to the printer. I've searched online for 2 hours now looking for an answer.
    I like to work with having several to many files in the 'bin' and prefer to only print the active file I'm currently working on without having to close the 'working files' before I can print. How can I print ONLY the active document or file in the project bin? Please help, I've upgraded from PSE 3 to PSE 9 and really like the updated features, but this one pain in the neck default is getting the best of me.

    Thanks for your help, that works nicely. It is good to have control of the printer again.

  • How to Select the Document just back of the Active Document

    If there are 5 documents open in photoshop I want to select the document just behind or back of the Active Document , using script.
    One of my friend suggested me the bleow script, but it is selecting the previous document, not exactly the document back of the active document.
    please help me.
    var id85 = charIDToTypeID( "slct" );
        var desc21 = new ActionDescriptor();
        var id86 = charIDToTypeID( "null" );
            var ref11 = new ActionReference();
            var id87 = charIDToTypeID( "Dcmn" );
            ref11.putOffset( id87, -1 );
        desc21.putReference( id86, ref11 );
    executeAction( id85, desc21, DialogModes.NO )

    I had the same problem. I did not want to go back to the "last viewed" doc but to the doc opened before the active one.
    I use this on F1 key to go back to the previous opened document (index order -1).
    It works great.
    #target photoshop
    // Go back to the last opened doc. If it is the oldest opened one it does not give error window and stays on it.
    if(documents.length>0) {
        var thisIndexImage = getActiveDocumentIndex();
        var theDocs = app.documents;
        if ( thisIndexImage != 0 ) {
            var openedBefore = theDocs[thisIndexImage - 1];
            } else {
            var openedBefore = theDocs[0];
        app.activeDocument = openedBefore;
    } else {
        alert ("You need to have any opened documents to apply this script.")
    // Functions
    function getActiveDocumentIndex(){
         var ref = new ActionReference();
         ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
         return desc = executeActionGet(ref).getInteger(stringIDToTypeID('itemIndex'))-1;

  • Call a function when the active document is closed

    Hi friends
    I have a portion of my script (at true a specific function) that I´d need to be executed every time the user close the app.activeDocument in Photoshop.
    I know there´s a Photoshop script called "Script Event Manager" where we can associate actions and scripts with events (like closing the document). I´d not like to use this script because..as I told...it´s not my entire script to be runned when closing a file..but only a function.
    Tried to search in the Script Event Manager for any event called "onClose" () but sure there´s nothing.
    How could I insert an event in the body of my own script that calls a function every time user close the active document?
    Thank you a lot for the help
    Best Regards
    Gustavo.

    As I said before the close event is really not that useful. In addition to the document already being closed the event descriptor will only have the path to the closed file if it was saved as part of the close event.
    But if you want to play around with this to see if it will be helpful to you here is one way. You will need to add the notifer. This only needs to be done once unless it is removed.
    app.notifiersEnabled = true;
    app.notifiers.add( "Cls ",new File('~/desktop/closeEventHandler.jsx') );
    Then for the event handler script, something like this.
    try {
        if (arguments.length >= 2) {
        var filePath;
        var desc = arguments[0];
        if( desc.hasKey( stringIDToTypeID('in') ) ) filePath = desc.getPath(stringIDToTypeID('in'));
        if( filePath != undefined ) alert( decodeURI( filePath ) );
    } catch (e) {}

  • Digitally Sign All Signature Fields in the Active Document

    I have a script which will sign a single digital signature field by the field name.
    I need to revise the script so it will sign multiple/all signature fields in the active document without having to put the field name in the script, as the field names will vary with each document.
    Can anyone please advise how to modify the script to sign all fields in the active document regardless of the field name?
    function myOtherTrustedFunction()
    app.beginPriv();
    // Get and login to security handler
    var oSigHdlr = security.getHandler( "Adobe.PPKLite" );
    oSigHdlr.login( "123","/c/Documents and Settings/name/Application Data/Adobe/Acrobat/10.0/Security/FirstNameLastName.pfx");
    // Setup Signing Properties
    var chk = this.getField("Checked");
    if (chk != null) {
    // Apply Signature and save back to original file
    var bRtn = chk.signatureSign({oSig:oSigHdlr, bUI:false, oInfo:{password:"123"}});
    app.endPriv();
    Any assistance will be most appreciated.

    Thank you for your help, the script will now count only the signature fields which have not been signed.
    I have added the second part of the script to then sign all of the blank signature fields.
    The script is only signing one of the digital signature fields instead of all of the blank signature fields.
    Can you please advise how I can modify the script to sign all of the blank signature fields?
    var count = 0;
    for (var i = 0; i < numFields; i++) {
        // Get the current field object
        f = getField(getNthFieldName(i));
        // If it's a signature field and not already signed, increment counter
        if (f.type === "signature" && !f.value) {
            count++;
    var myEngine = security.getHandler( "Adobe.PPKLite" );
    myEngine.login( "123", c/Documents and Settings/name/Application Data/Adobe/Acrobat/10.0/Security/FirstNameLastName.pfx" );
    // Sign the field
    f.signatureSign( myEngine,{password: "123"});

  • How can I rip a 10" x 10" post script file from InDesign 6, it keeps telling me "the active document

    How can I rip a 10" x 10" post script file from InDesign 6, it keeps telling me "the active document uses multiple pages sizes and won't print.  My page sizes are all 10" x 10"

    Please post in the InDesign forums here http://forums.adobe.com/community/indesign/indesign_general. They will be able to help you.

  • I have upgraded to Pages 5.0.1 and now I cannot print or pass along "comments" in the text of a document. I previously was able to convert the Pages document, with comments, to a "Word" document so that others could view the edited text. How do I do that?

    I have upgraded to Pages 5.0.1 and now I cannot print or pass along "comments" in the text of a document. I previously was able to convert the Pages document, with comments, to a "Word" document so that others could view the edited text. How do I do that?

    When you installed Pages v5, it automatically moved the older Pages ’09 v4.3 into /Applications/iWork '09 folder. If you want normal comment interoperability, you are advised to resume using the older version of Pages. Newer, is certainly not better with Pages v5.

  • I created a 5x7 postcard document in Word with text boxes and graphics.  When I converted it to PDF, some of the items were missing, even though they were in the boundaries of the page and looked fine on the Word document.  What happened, and how do I fix

    I created a 5x7 postcard document in Word with text boxes and graphics.  When I converted it to PDF, some of the items were missing, even though they were in the boundaries of the page and looked fine on the Word document.  What happened, and how do I fix it?  I'm trying to upload the PDF version to Vistaprint.  Thanks.

    Reader doesn’t create pdf files. You can use Acrobat (ask in that forum) to create pdfs. You can subscribe to the Adobe PDF Pack which has a create pdf functionality (please ask in that forum), or you can use a third party utility such as ghostscript, cutepdf, or Microsoft’s own PDF creation capability. For third party pdf creation you will need to ask in a forum dedicated to that software as fellow users of Reader are unlikely to have the knowledge to help.

  • I have a new iMac running OS 10.9 when I use the Command S shortcut it no longer saves the active document it speaks it instead.

    I have a new iMac running OS 10.9.  When I use the Command S shortcut in any of my apps (numbers, text edit etc), it no longer saves the active document it speaks it instead.  How can I revert to the save shortcut function?

    have you looked in
    system preference->Dictiation & speech if it's assigned there?
    or system preference->accessibility if it's assigned there?

  • How can I get the windowRef of the active document window?

    Hello,
    Hou could I get the ADMWindowRef of the active Document window in Illustrator CS4- CS5? I can not use ADMWindowSuite1  because is On Mac OS only.
    Thank you very much to Everybody.

    There's no API for this, not if you want to make use of it in a useful way. You have to write Windows API code to do it. I reccommend using Spy++ to suss out the structure. Frankly, it's pretty annoying. It'd be extremely helpful if the API provided this, but it doesn't.

  • Pages 09 - Portrait and Lanscape view in the same document?

    Is it possible to have landscape and portrait layout in the same document?

    Tim,
    You're welcome. I don't concern myself much with what Word can or can't do. The issue here is just how to get the job done in Pages with its supporting cast. You may Provide Pages Feedback and if enough voices are heard, you might get your wish. http://www.apple.com/feedback/pages.html
    By the way, Preview is a wonderful program, in my mind. The more you use it, the more you will depend on it.
    Jerry

  • Why can't I copy and paste portions of the Word document that I just converted from a PDF file?

    Why can't I copy and paste portions of the Word document that I just had converted from a PDF file on your site?

    Hi,
    I am moving your posting to Adobe CreatePDF forum.
    Hisami

  • Anyone know how to stop the "activate" box from blocking usage of a perfectly legal copy of Ilisten? I want to help my dyslexic grandson and this box, including the activation code, keeps popping up, keeping me from using the software. I activated the pro

    Anyone know how to stop the "activate" box from blocking usage of a perfectly legal copy of Ilisten? I want to help my dyslexic grandson and this box, including the activation code, keeps popping up, keeping me from using the software. I activated the program and did a few profile building sessions, now it pops up each time I start the program, blocking me from using it. Help sure would be appreciated.
    Jay

    I looked at your post this morning and did not know enough to respond, other than to find out that links to iListen now go to newer, renamed software. Considering it's been nine hours with no response, I'm suspecting few people here have experience with that software. You could contact the current copmany that used to sell that package and see if they have any archived support info.
    BTW: please check you entry for "Mac OS" in your profile. It says iOS, which cannot run on an iMac. iOS is the system for phone and iPads but can't run on Mac computers. Do "About this Mac" from the Apple menu and see what it says about the OS version. Should look like this:
    If the "Processor" line says "Intel," you have a newer Mac than the old modles this forum covers; Intel iMac have their very own forum here:
    iMac (Intel)

  • What is the impact of business area and cost center in the sales document

    Hi all
    I have small doubt regarding what is the impact of bussiness area and cost center in the sales document... what is the uses of these (bussiness area, cost center) is help full for sd module
    can any one reply plz....
    Thanking you

    Hi,
    Business Area determines where the revenue should be allocated when you sell a material or a service.
    For eg: If your customer is in say Mumbai and he is ordering for a service in Delhi (say DIAL - Delhi International Airport Limited) then based on the terminology.
    Your customer would belong to B Basis Business Area - WHERE THE REVENUE IS COMING FROM or WHERE YOUR CUSTOMER BELONGS TO (SALES OFFICE).
    Whereas your DIAL sales will belong to A Basis Business Area - WHERE THE REVENUE IS GOING TO.
    Cost Center would determine where your allocate your cost to.
    Say Rounding Off can be used as a cost element, because some sort of revenue is lost when figures are roudned off..
    Hope it clarifies your doubt.
    Reward points if satisfactory
    Regards
    Ravi.D.Mansharamani

Maybe you are looking for