2 Replies Latest reply on Apr 14, 2015 12:46 AM by CarlosCanto


    elDudereno Level 3

      I am trying to put together a script for printing among other things. I was browsing Jongware's "Illustrator CS6 Object Reference.chm" in the printing section and I came across "TrappingType".


      I'm jumping to conclusions here; if I print via javascript I can have it do the trapping for me (I am already aware of the pathfinder fly-out menu trapping)? I searched the forum for "TrappingType" and I found nothing. Am I drawing the wrong conclusion from this information? Does anyone have an example script using this feature?





        • 1. Re: TrappingType
          Silly-V Adobe Community Professional

          I would like to know more about this. If someone can please write a good paragraph on this subject, I am all eyes!  According to OMV:



          OMV description: "The trapping type"    <--- DUH?  Sometimes I think they used a script to split the title-case object name into separate words, and inserted "The " as a prefix.


          Enumerated values:

          IGNOREOPAQUE : 3


          OPAQUE: 2

          TRANSPARENT: 1

          • 2. Re: TrappingType
            CarlosCanto Adobe Community Professional & MVP

            TrappingType is the returned value of the .trapping property, it doesn't say, but I assume it's read-only since it's in the "inkInfo" (info) object in the "Ink" object.


            from the reference

            // Displays the current documents inks in a text frame
            var docRef = documents.add();
            var textRef = docRef.textFrames.add();
            // assemble a string of the inks in this document
            var sInks = "";
            var iLength = activeDocument.inkList.length;
            for(var i=0; i<iLength; i++) {
                sInks += docRef.inkList[i].name;
                sInks += "\r\t";
                sInks += "TrapType = " + docRef.inkList[i].inkInfo.trapping; // TrapType = TrappingType.NORMALTRAPPING
                sInks += "\r\t";
                sInks += "Frequency = " + docRef.inkList[i].inkInfo.frequency;
                sInks += "\r\t";
                sInks += "Density = " + docRef.inkList[i].inkInfo.density;
                sInks += "\r";
            textRef.contents = sInks;
            textRef.top = 600;
            textRef.left = 200;



            your options for setting Trapping


            select your group

            app.executeMenuCommand ('Live Pathfinder Trap'); // unfortunately, it brings up the Dialog


            or, record an action setting trapping via PathFinder flyout menu, then play your action via javascript, this way the dialog won't show up, but it will use previously used settings.