4 Replies Latest reply on Nov 4, 2016 4:54 PM by Obi-wan Kenobi

    Resizing anchored graphics

    phyllisj9 Level 2

      Okay, I'm looking to see if there's any easy way around this dilemma:

       

      I have a bunch of tiny anchored graphics that are inline throughout a document.  I just had to make all of them smaller, so I resized the original graphic files.  My problem is that the anchored graphics in the document then changed their scaling so that they're all still the same size (they all blew up to 119%).  I need every one of them resized to 100% with the frame then fit to the graphic.  Is there any non-manual way of doing that?  So far, I'm having to select each-and-every one of them individually.  Transform object doesn't seem to work.  And they're actually difficult to grab because they're pasted inline.  They all have an object style applied, but it doesn't look like there are any options within the object style to change percentages, etc.

       

      Any suggestions?

       

      Thanks, Phyllis

        • 1. Re: Resizing anchored graphics
          craigb33847621 Level 1

          It's a little quicker if you use find/replace.

           

          Fix one of them manually. Highlight the anchored object hidden character in your text (turn on hidden characters if they aren't). Cmnd or ctrl-c to copy it. Then in find/replace, choose the GREP tab, select markers/anchored object markers from the special characters to search flyout. Then in the replace field choose other/clipboard contents, unformatted from the special characters to replace flyout.

           

          If they're all the same anchored object you can do a replace all. If not, you may have to use the change/find to selectively replace them one at a time.

          1 person found this helpful
          • 2. Re: Resizing anchored graphics
            SJRiegel Adobe Community Professional & MVP

            Before relinking, go to your file handling preferences, and uncheck Preserve Image Dimensions When Relinking.

            1 person found this helpful
            • 3. Re: Resizing anchored graphics
              phyllisj9 Level 2

              Thanks!!!  Both of these responses are very helpful.  :-)

              • 4. Re: Resizing anchored graphics
                Obi-wan Kenobi Adobe Community Professional

                Hi,

                 

                Without more info! … Something like this!

                 

                /*
                    Written by Michel Allio [2016/11/05]
                    See: https://forums.adobe.com/thread/2231639
                  
                    + Undo!
                    
                    At your own risk!
                */ 
                
                
                app.doScript("main()", ScriptLanguage.javascript, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Update Anchored Graphics To 100%! …");
                
                
                function main()
                {  
                    
                    var myDoc = app.activeDocument;
                    var myGraphics = myDoc.allGraphics;
                
                
                    var savedHorizontalMeasurementUnits = myDoc.viewPreferences.horizontalMeasurementUnits;  
                    var savedVerticalMeasurementUnits = myDoc.viewPreferences.verticalMeasurementUnits;  
                    myDoc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.MILLIMETERS;  
                    myDoc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS;
                
                
                
                
                    for ( var g = 0; g < myGraphics.length; g++ ) {
                            var myGraphic = myGraphics[g];
                            var myGB = myGraphic.geometricBounds;
                            if ( myGraphic.parent.parent.constructor.name == "Character" 
                            && myGraphic.verticalScale != 100 && myGraphic.verticalScale < 120 
                            && myGraphic.horizontalScale != 100 && myGraphic.horizontalScale < 120 ) {
                                  myGraphic.verticalScale = myGraphic.horizontalScale = 100;
                                  myGraphic.fit(FitOptions.FRAME_TO_CONTENT);
                              }
                        }
                
                
                myDoc.viewPreferences.horizontalMeasurementUnits = savedHorizontalMeasurementUnits;  
                myDoc.viewPreferences.verticalMeasurementUnits = savedVerticalMeasurementUnits;
                
                
                }
                
                
                // ___ (^/) ___
                

                 

                This script will find all images anchored whose H/V scale are not 100% and < 120%

                All these graphics will be rescaled to 100% and the image box fitted to the graphic contained.

                 

                (^/)