Get the limits of the image and the image frame?

How can I get both the geometric bounds of the image AND the geometric boundaries of the frame of the image I have to loop through all the images in a document?

Here is the Apple Script script version:

tell application "Adobe InDesign CS3"
     set TheDocument to active document
     set TheGraphics to all graphics in TheDocument
     repeat with n from 1 to (count TheGraphics)
          set TheGraphic to item n of TheGraphics
          set TheLink to item link of TheGraphic
          set TheImage to parent of TheLink
          set TheFrame to parent of TheImage
          set ImageGB to geometric bounds of TheImage
          set FrameGB to geometric bounds of TheFrame
          set ImageVB to visible bounds of TheImage
          set FrameVB to visible bounds of TheFrame
          set TheText to "Name: " & name of TheLink & return & ¬
               "Geometric Bounds of Image = " & ImageGB & return & ¬
               "Geometric Bounds of Frame = " & FrameGB & return & ¬
               "Visible Bounds of Image = " & ImageVB & return & ¬
               "Visible Bounds of Frame = " & FrameVB & return & return
          my write_to_file(TheText, true)
     end repeat
end tell

on write_to_file(this_data, append_data)
     try
          set the log_file to (path to desktop as text) & "Geometric and Visible Bounds Report" as text
          set the open_target_file to open for access file log_file with write permission
          if append_data is false then set eof of the open_target_file to 0
          write this_data to the open_target_file starting at eof
          close access the open_target_file
          return true
     on error
          try
               close access file log_file
          end try
          return false
     end try
end write_to_file

Kasyan

Tags: InDesign

Similar Questions

  • How mode change and get the coordinates of the text frame?

    Hello.

    There are two questions.

    1. how to change fashion using JavaScript?  writing-> selection

    ->

    2. how to get the text frame coordinates?

    Thank you.

    1 app.toolBoxTools.currentTool = UITools.SELECTION_TOOL;

    2. f.geometricBounds (where f is your block of text).

  • How to get the image tag

    IAM create small Animation in 10 pictures. 1 frame lable called 'Start', frame label name is 'end '. Button click on how to get the current frame label name.

    var frameObj:Object = {};

    frameObj [1] = "start";

    frameObj [this ._totalframes] = "end";

    etc.

  • Cannot read e-mail messages Hotmail, I get the frame of page but not the text of the E-mail

    Dear anyone.

    Since May 4, I was unable to read Hotmail emails in Firefox, I had to download Google Chrome just to read emails (yuck!) Before May 4, everything was fine. Now, I get the page frame, i.e. the part that said Hotmail to the top my list of Email subfolders to the bottom of the left side and the text of Microsoft on the bottom. The central area, which must contain the text of the may E real (and graphics of course if there is) is empty. I tried clear the cache and history, clear cookies, just like that, no joy.

    What has been the change suddenly from Hotmail, which has caused this? It is NOT a change in Firefox that I have not changed my version and it worked perfectly until today, may 4.

    Your puzzledly

    ulrichburke

    Sorry to disappoint you, but I'm a man. But thank you for your comment.

    Could you please mark this issue as RESOLVED for other users can come here to get the solution?

    Thank you.

  • HP try to send me to this day that she wouldn't, take, says I need to get the Version of the Net Frame work V 2.050727, said to communicate with my editor about Apporiate version of the Net frame work.

    You need to get the update, it must get The Net Frame work V 2.050727, where can I get coming up to date, for the calculation.

    Hello

    1. do you use the 64-bit or 32-bit operating system?

    2. update you are trying to install HP?

    I suggest you to perform Windows updates.

     
    If there is an update for .NET Framework, I suggest to install the update and try to install the update from HP.
     
     
    To run Windows update manually, follow the steps:
     
    a. go to the Windows Update site. Open Internet Explorer and go to tools, Windows Update.  You must use Internet Explorer; using other browsers will result in an error message.
    b. click 'Use Administrator Options' in the menu on the left. Once the Administrator Options screen, choose to search the Windows Update Catalog under "update multiple. operaing system."
    c. install the Active X control if requested. On the screen type catalog Microsoft Update in the operating system you want updates in the area of research (for example, Vista or XP).
    d. click 'Add' next to each update you want to install. Updates will be added to your shopping cart.
    e. click on "View cart" in the upper right corner of the screen when you are finished selecting your updates. Make sure everything you want is here, and then click 'download '. In the "Download Options" popup that appears, choose where you want to download the files. A progress bar indicates the status of the downloads.
    f. navigate to the location where you downloaded the files. Double-click the files to install. You will probably be asked to restart your computer after installation is complete.
    g. to download updates for use on another computer, which is not connected to the Internet, for example, save files on removable media such as a USB drive or a disk and load the media on the computer. Double-click the files and install as you would if you downloaded them.

    If there is no update for .NET Framework, try to download and install the update manually from the link below.
     
     
    Microsoft .NET Framework Version 2.0 Redistributable Package (x 86):

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=19

    I hope this helps.
  • I have the macbook pro (OS 10.6.8) and the iphone 6 s. The latest version of iTunes is 11.4. When it is connected to the MAC, I get the message that itunes must be upgraded. How to synchronize or import/export files(images/music)?  Fact is need to update

    I have the macbook pro (OS 10.6.8) and the iphone 6 s. The latest version of iTunes is 11.4. When it is connected to the MAC, I get the message that itunes must be upgraded. How to synchronize or import/export files(images/music)?  Fact is need to update itunes?

    Hi sonalnj,

    I understand that you cannot synchronize your iPhone as iTunes is requested it must be updated. I can help you with that.

    According to the technical specifications for a 6 s iPhone, you need a Mac running OS X v10.8.5 or later version with iTunes 12.3 or later. Because you are on OS X 10.6.8 your version of iTunes is up to date with this OS.

    iPhone 6 s Tech Specs
    http://www.Apple.com/iPhone-6s/specs/

    Now to fix that, you need to update your Mac OS X 10.8.5 Mountain Lion or OS X 10.11 El Capitan. If you want to go to the Mountain Lion, you can do it with the first link below. The cost will be $19.99 and a code will be delivered to you if you can download it via the Mac App Store. Once you have upgraded, be sure to make all software updates to go with him to get the latest version of iTunes.

    OS X Lion mountain
    http://www.Apple.com/shop/product/D6377Z/A/OS-x-mountain-lion

    Now the other option is to move to OS X 10.11 El Capitan, and is a free update that you can do right in the Mac App Store, if you meet the system requirements. Take a look at the following article for more details on how to do it.

    Update of OS X El Capitan
    https://support.Apple.com/en-us/HT201475

    Nice day!

  • Chart WPF: How to get the limits of PlotArea and axes

    I can't find explicit methods to get limits of PlotArea and axes.

    Please let me know workarounds if they are available. Actually a post explains how to get the PlotArea limits using RangeCursor. Are there alternative means for shafts?

    The photo below shows what I did in WinForms with the methods GetBounds and HitTest. I would like to draw the ornaments on the chart in WPF.

    I have attached a code example of this look ornaments around the plot area and the scales.

    Note that this relies on implementation details of the current version of WPF controls for the ornaments of the scale, as it was more effective than gradually points to test in the graph using the GetScaleAt method. We have intentionally left much of the underlying primitive types with a minimum documentation, like us they have changed in the past and may change in the future. Although these exact members can be removed in a future release, we do not expect to provide an equivalent function and stabilize the primitive API over time.

  • Get the image of Excel as a form and save it as a .jpg

    Hello

    I am fairly new to ActiveX and will have a hard time to do a seemingly simple thing: get an image named from an Excel file and save it as a .jpg file.  I've seen similar things for Excel chart objects, but as I understand it the images are "shapes" in Excel and I was unable to find the right method to extract a form. Please, if someone could look at the folder below and tell me if I am on the right track, if there is a better way to do it, or if there is a way to do it at all, it would be useful.  Note that I don't like not how effective a strategy - if I need to register in a middle of another type file, that's fine. The only goal is to be able to extract this image and save it with a click of mouse and without manual intervention.

    Folder contains: 1 example Excel file containing the image named "picture 1"; 1 vi showing the method I found for the export of Excel graphs as .jpg; and 1 vi with the progress that I've done so far tried to get the picture of the Excel file and save it as a .jpg file.

    Thanks in advance!

    Megan

    Hi megan,

    See what link.

    It will be useful.

    Mike

  • Unable to get the preview of images that are cut and pasted from desktop folder to external hard drive.

    Original title: I imported the photos of my card SD by cutting and pasting etil worked very well but when I did the same thing to the table and stuck in the external hard drive, I can't not open images as it is said no preview.

    Only this particular file does not open and you please help u to get the photos can save that a link is missing and I don't know what.

    Hi Gregory Trinidade,

    You can try to create a folder in the C: drive and copy the images on the desktop folder C: drive.  After copy in C: drive then try again copy on external hard drive and see if it works well or not.

    Make sure that you have access to the C: drive. Also instead of cut photos copy in another location.

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Get the height and width of an image

    I have therefore some images in my program that I'm loading. These images are much longer than the size of the screen. So I put in a ScrollView. My question is how can I get the height and width of an image. The image.width and image.height doesn't return the correct values.

    //add the image
    private function addImage():Container {
        var sp1:Container = new Container();
        sp1.sizeUnit = SizeUnit.PIXELS;
        sp1.debugColor = 0xFFFFFF;
        sp1.margins = Vector.([1,0,0,0]);
        sp1.align =ContainerAlign.NEAR;
        //sp1.setSize(650, 800);
    
        var myPattern:RegExp = / /g;
        var fileName:String = "./com/swiz/img1.png";
        var icon:Image = new Image();
        icon.setImage(File.applicationDirectory.resolvePath(fileName).url);
        //icon.setPosition(0,0);
        //icon.setSize(320,800);
        sp1.addChild(icon);
        sp1.setSize(650, icon.height);
    
        return sp1;
    }
    

    and my code scrollview is

    //add to the scrollView
    var scroller:ScrollPane = new ScrollPane();
    scroller.width = 650;
    scroller.height = 505;
    scroller.y = 0;
    scroller.addScrollContent(addImage());
    addChild(scroller);
    

    Thanks in advance!

    Hey shethab,

    in order to retrieve the height and width of your image, you must use use the an event listener on your image and check for the Event.COMPLETE event. What is happening because the image you upload is not built, it takes time to load into your application using the setImage() method. and when you check the width height after the setImage method, the image was not loaded and has no height and width to this second. If you use the event listener, you can retrieve the height and width as it was finally loaded.

    Try the following code:

    import flash.events.Event;
    
    //add the image
    private function addImage():Container {
        var sp1:Container = new Container();
        sp1.sizeUnit = SizeUnit.PIXELS;
        sp1.debugColor = 0xFFFFFF;
        sp1.margins = Vector.([1,0,0,0]);
        sp1.align =ContainerAlign.NEAR;
        //sp1.setSize(650, 800);
    
        var myPattern:RegExp = / /g;
        var fileName:String = "./com/swiz/img1.png";
        var icon:Image = new Image();
        icon.setImage(File.applicationDirectory.resolvePath(fileName).url);
        icon.addEventListener(Event.COMPLETE, onImageLoaded);
        //icon.setPosition(0,0);
        //icon.setSize(320,800);
        sp1.addChild(icon);
        sp1.setSize(650, icon.height);
    
        return sp1;
    }
    
    private function onImageLoaded(e:Event):void
    {
        trace("image height: " + e.target.height + " image width: " + e.target.width);
    }
    

    hope that somethings brightened. Good luck!

  • When I select this option I get the dialog box 'Create image s system' but it cannot find any 'backup devices on this computer"and lists the error 0 x 81000036

    Error image system original title: windows 7 0 x 81000036

    I'm doing a backup system image.  When I select this option I get the dialog box 'Create image s system' but it cannot find any 'backup devices on this computer"and lists the error 0 x 81000036.

    I have an ESATA connection on my Dell laptop I was trying to make the image on.  I use the unit every day to save files and which works very well.  He just leaves me CCADE with the system image backup...

    any ideas?

    Hello

    ·         You have created a system image backup before that?

    ·         You did it changes on your computer?

    ·         Is your esata formatted NTFS drive?

    Try to save the image of the boot system: http://support.microsoft.com/kb/929135

    Note: make sure that you start the computer in normal mode after a repair.

    See also the linkfor more information about the backup: http://windows.microsoft.com/en-US/windows7/Back-up-your-programs-system-settings-and-files

  • How to get the greatest value of the width and/or height of two open images?

    Re: Photoshop CS6, worm 13.0.1 (x 32) on Win 7 SP1 (64-bit) 16 GB of RAM

    My Photoshop workflow processes repeatedly changing the games of two images of an irregularly shaped object, centered on a white background. After completing the changes, each canvas needs to be cropped, then the two resizing to square canvas of the same size.

    The question I have is the last step: How can I determine the largest single dimension to use as the px width, height px square open two images?

    The following script seems to work, but I don't know if I correctly selects active documents. Is app.activeDocument = app.documents [0] always the document being edited? And app.activeDocument = app.documents [1] no active document!

    I am a programmer of VBA/VB.Net with no experience in Javascript. I'd greatly appreciate some expert opinions on what follows, my first attempt at a Photoshop script.

    #target photoshop
    < menu > automate < / menu >
    Save the current configuration
    var savedRuler = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    whole white background
    var backgroundC = new SolidColor();
    backgroundC.rgb.red = 255;
    backgroundC.rgb.green = 255;
    backgroundC.rgb.blue = 255;
    backgroundColor = backgroundC;
    get the maximum size of the first image
    app.activeDocument = app.documents [0] / / the value first image
    var h = app.activeDocument.height;
    var l = app.activeDocument.width;
    var maxDim = w;
    if(h>w) maxDim = h;
    measure the second image and then get the two images max dimension
    app.activeDocument = app.documents [1] / / for the second image
    H2 var = app.activeDocument.height;
    W2 var = app.activeDocument.width;
    if(W2>maxDim) maxDim = w2;
    if(H2>maxDim) maxDim = h2;
    resize image second
    app.activeDocument.resizeCanvas (maxDim, maxDim, AnchorPosition.MIDDLECENTER);
    resize the image first
    app.activeDocument = app.documents [0] / / the value first image
    app.activeDocument.resizeCanvas (maxDim, maxDim, AnchorPosition.MIDDLECENTER);
    clean
    app.preferences.rulerUnits = savedRuler;

    Try this

    #target photoshop
    //save the current setting
    var savedRuler= app.preferences.rulerUnits;
    var orig_display_dialogs = app.displayDialogs;
    app.preferences.rulerUnits = Units.PIXELS;
    app.displayDialogs = DialogModes.NO; // Set Dialogs off
    
    var defaultFolder = "~";
    var inputFolder = Folder.selectDialog("Choose a folder of images to process.", defaultFolder);
    var outputFolder = Folder.selectDialog("Choose a folder to export resized images to.", defaultFolder);
    
    var fileList = inputFolder.getFiles(/\.(nef|cr2|crw|dcs|raf|arw|orf|dng|jpg|jpe|jpeg|tif|tiff|psd|eps|png|bmp)$/i);
    if (fileList.length%2===0) { // even number of files
      // Loop through files
      for (var i = 0; i < fileList.length; i++) {
    
         app.open(fileList[i]); // Open First
         app.activeDocument.trim(TrimType.TOPLEFT);
         app.activeDocument.resizeImage(null,null,1200,ResampleMethod.NONE);
         var h = app.activeDocument.height;
         var w = app.activeDocument.width;
    
         i++;
         app.open(fileList[i]); // open second
         app.activeDocument.trim(TrimType.TOPLEFT);
         app.activeDocument.resizeImage(null,null,1200,ResampleMethod.NONE);
         var h1 = app.activeDocument.height;
         var w1 = app.activeDocument.width;
    
         var maxDim = Math.max (Math.max (w, w1), Math.max (h, h1)) +10;
    
         app.activeDocument.resizeCanvas (maxDim, maxDim, AnchorPosition.MIDDLECENTER); //resize
         // save second and close
         if (app.activeDocument.name.lastIndexOf(".")!=0 ) { var Name = app.activeDocument.name.substring(0, app.activeDocument.name.lastIndexOf(".")); }
         else {var Name =  app.activeDocument.name;}
         var saveFile = outputFolder + "/" + Name ;
         SaveAsJPEG(saveFile, 10);
         activeDocument.close(SaveOptions.DONOTSAVECHANGES);     // Close the just save 
    
         app.activeDocument.resizeCanvas (maxDim, maxDim, AnchorPosition.MIDDLECENTER); //resize
         // save and close First
         if (app.activeDocument.name.lastIndexOf(".")!=0 ) { var Name = app.activeDocument.name.substring(0, app.activeDocument.name.lastIndexOf(".")); }
         else {var Name =  app.activeDocument.name;}
         var saveFile = outputFolder + "/" + Name ;
         SaveAsJPEG(saveFile, 10);
         activeDocument.close(SaveOptions.DONOTSAVECHANGES);     // Close the just save
         }
      }
    else { alert("Odd Number of Files");}
    
    //clean up
    app.displayDialogs = orig_display_dialogs; // Reset display dialogs
    app.preferences.rulerUnits = savedRuler;
    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    function SaveAsJPEG(saveFile, jpegQuality){
      var doc = activeDocument;
      if (doc.bitsPerChannel != BitsPerChannelType.EIGHT) doc.bitsPerChannel = BitsPerChannelType.EIGHT;
      jpgSaveOptions = new JPEGSaveOptions();
      jpgSaveOptions.embedColorProfile = true;
      jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
      jpgSaveOptions.matte = MatteType.NONE;
      jpgSaveOptions.quality = jpegQuality;
      activeDocument.saveAs(File(saveFile+".jpg"), jpgSaveOptions, true,Extension.LOWERCASE);
    }
    
  • What kind of image is in a document. INDD so when the file is opened you get the message 'document contains 6 links to sources that are missing' and when you click OK to recreate a link to missing files, the document opens with the images?

    What kind of image is in a document. INDD so when the file is opened you get the message 'document contains 6 links to sources that are missing' and when you click OK to recreate a link to missing files, the document opens with the images? Missing images are not on my computer, but when the document opens the images are there. I can copy and paste the INDD images in Illustrator. Y files/images/I am able to copy and paste the images that have been incorporated into the INDD file in AI of the INDD file? If this is not what type of image am I copy and paste? Can I take the images that I stuck in there and place them in a new INDD document and have the images to reproduce without problems?

    The images could be anything - check the links Panel.

    What you see (and copy) is just the screen preview, not the actual image data.

  • After downloading CS5 and clicking on install, I get the message that the disk image is damaged and I should egect the Image

    I downloaded CS5 on the site was given to me by Adobe. When I click the button install, a message pops up "The Disk Image is damaged and cannot be installed, eject the disc" what should I do?

    IF El Capitan Mac read below

    CS6 and previous programs have not been tested and will not be updated to run on Mac El Capitan

    -which means you are trying to use CS6 and earlier at YOUR risk of having problems

    -You can get CS6 and previous programs to install and run, or you can not (some do, some don't)

    -IF not, Details of the message from the error messages and a person may be able to help

    Maybe it's a fake because of Mac El Capitan and OLD programs error

    This information is a MUST to install old programs on Mac El Capitan

    -You can't get the same error message, but here are some links that CAN help with old programs

    -Java https://helpx.adobe.com/dreamweaver/kb/dreamweaver-java-se-6-runtime.html can help

    Install CS5 on Mac 10.11 https://forums.adobe.com/thread/2003455 can help (also for others than CS5)

    -also a TEMPORARY security change https://forums.adobe.com/thread/2039319

    -http://mac-how-to.wonderhowto.com/how-to/open-third-party-apps-from-unidentified-developer s-mac-os-x-0158095 /

    -the guardian https://support.apple.com/en-au/HT202491

  • I just switched to a Nikon D80 with a Nikon D90 and I use Photoshop 4 and bridge. I can't open the NEF (raw) images off bridge. How can I get the camera raw dialog screen which came to my D-80?

    I just switched to a Nikon D80 with a Nikon D90 and I use Photoshop 4 and bridge. I can't open the NEF (raw) images off bridge. How can I get the camera raw dialog screen which came to my D-80?

    Devices supported by Adobe Camera Raw

    First of all, the D90 was supported in Camera Raw 5.1.

    Open Photoshop and click on Photoshop (Mac) or help (Win) > Plug-ins > Camera Raw to see what version you use.

    Photoshop CS4 comes with Camera Raw 5.0.

    Try to update Camera Raw in Photoshop to 5.7 via help > updates.

    If this does not work, try to manually edit Camera Raw

    Adobe - Photoshop: for Windows: Camera Raw 5.7 update

    Adobe - Photoshop: for Macintosh: Camera Raw 5.7 update

  • I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows?

    I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows so that I can do the calculations?

    If you start the https://forums.adobe.com/welcome Forums Index

    You will be able to select a forum for the specific Adobe products you use

    Click on the symbol "arrow down" on the right (where it is said to see all our products and Services) to open the drop-down list and scroll

Maybe you are looking for

  • iCloud showing my name with my son ID

    Hello I just got my wires to connect to his iPad using his email ID of iTunes. When it connects it happens with MY name at the top & his email to iTunes under. Why this is happening and how I can change it's his name on his iPad? Thank you for all su

  • Atrix - zoom of the camera?

    Is there a way to zoom in and zoom out with the camera on the Atrix?

  • Wassword BIOS for CQ57-313SZ

    I need the password BIOS Adminsitration or power on password for my Compaq Presario CQ57 313SZ After three times, the system is disabled (69859603)... All the figures here are worng. Who can help me? Thank you very much!! I hope!!

  • Adobe Lightroom and Windows XP Home Edition, SP 2 compatibility?

    Upgrade to Lightroom 3.2 LR 3 and worked fine for a few days.  Now we are getting an error in Visual C ++ Runtime.   Accurate messages "this application has requested enforcement in an unusual way."  contacted Adobe and they did the following steps. 

  • tried to use back up and restore but it did not

    has ran the classic disk defrag and subsequently, I couldn't open any of my programs, tempted to save at different times and could not do. At get wondering deleted by train the disk defragment