Script to report on placed images

Does anyone know of a script to trawl through folders of files - or a single file and I'll adapt - and report on the placed images, whether they are embedded or linked.
AppleScript preferable, but JavaScript very much welcome.
Thanks in advanced.
RegardsCraig.

Sorry in advance for the javascript.  How about something like:
app.linkstotal = 0
for (i=0;app.Documents.length;i++) {
document = app.Documents[i];
linkeditems = document.placedItems.length;
if (linkeditems > 0) {
   app.linkstotal = app.linkstotal + linkeditems;
   alertmessage = "Document " + document.name + "contains " + linkeditems + "linked files.";
   alert(alertmessage);
alertmessage = "Files contain " + app.linkstotal + "linked files.";
alert(alertmessage);
Embedded images aren't counted as placedItems.  This script only reads open documents, but you could modify it to open and check each file in a directory.  Also, it would probably be best to feed that alert message to an output file instead of popping one up for each file.
Does that help at all?

Similar Messages

  • SCRIPT TO IMPORT MULTIPLE PLACED IMAGES..AND OUTPUT MULTIPLE IMAGES TO SINGLE PDF.

    Anyone got a script to import multiple placed images into CS4? or is this possible in CS5?
    and can we output multiple layers into a single PDF in illustrator?  Or multiple layers into single JPEGS from illustrator with one command instead of individually saving out each page... would be a huge time saver for me.
    Currently I output each completed layer individually and then right click those outputted jpegs in their output folder and choose "combine supported files into acrobat..." to make a single acrobat file..
    I`d also like to be able to CTRL click multiple layers and go save as... only those layers get saved out...
    And so adding something in the Save for PDF output dialogue box to save layers to multiple pages would be a helpful time saver..

    In CS 4 and CS 5 you can drag and drop fro m the finder or the Bridge, and I guess any other similar type viewer, multiple number of image files to a document. You can configure the bridge in such a way as to allow you to see the Bridge and your document at the same time for this very purpose.
    If you just drag and drop the files are linked if you drag while holding the shift key then the files will be embedded.
    ID and PS CS 5 have a minibridge which works the sam way but is an actually panel and will stay in the front.
    I separate the images but they import one on top of another.

  • Report on placed image size and resolution?

    I was asked by a client today "does CS4 allow you to create a report of the filenames and the sizes they're  used at?"
    They're getting slides scanned at a higher resolution and the higher the resolution the greater the cost.
    I guess I need: what shows up in the link info panel (actual and effective ppi), the dimension in inches or centimetres, and (ideally) the width and height of the object boxes they're placed in (to make sure the cropping isn't too drastic).
    Anyone know of any scripts or some secret panel that I can't seem to find?

    See this post.
    Might be just what you need, or could be with a bit of tweaking.
    Noel

  • Illustrator script to create symbols from images in folder

    Time to give back to the community...
    Here is a script I recently devised to bulk create symbols from images in a folder. Tested with Illustrator CC 2014.
    // Import Folder's Files as Symbols - Illustrator CC script
    // Description: Creates symbols from images in the designated folder into current document
    // Author     : Oscar Rines (oscarrines (at) gmail.com)
    // Version    : 1.0.0 on 2014-09-21
    // Reused code from "Import Folder's Files as Layers - Illustrator CS3 script"
    // by Nathaniel V. KELSO ([email protected])
    #target illustrator
    function getFolder() {
      return Folder.selectDialog('Please select the folder to be imported:', Folder('~'));
    function symbolExists(seekInDoc, seekSymbol) {
        for (var j=0; j < seekInDoc.symbols.length; j++) {
            if (seekInDoc.symbols[j].name == seekSymbol) {
                return true;
        return false;
    function importFolderContents(selectedFolder) {
        var activeDoc = app.activeDocument;     //Active object reference
      // if a folder was selected continue with action, otherwise quit
      if (selectedFolder) {
            var newsymbol;              //Symbol object reference
            var placedart;              //PlacedItem object reference
            var fname;                  //File name
            var sname;                  //Symbol name
            var symbolcount = 0;        //Number of symbols added
            var templayer = activeDoc.layers.add(); //Create a new temporary layer
            templayer.name = "Temporary layer"
            var imageList = selectedFolder.getFiles(); //retrieve files in the folder
            // Create a palette-type window (a modeless or floating dialog),
            var win = new Window("palette", "SnpCreateProgressBar", {x:100, y:100, width:750, height:310});
            win.pnl = win.add("panel", [10, 10, 740, 255], "Progress"); //add a panel to contain the components
            win.pnl.currentTaskLabel = win.pnl.add("statictext", [10, 18, 620, 33], "Examining: -"); //label indicating current file being examined
            win.pnl.progBarLabel = win.pnl.add("statictext", [620, 18, 720, 33], "0/0"); //progress bar label
            win.pnl.progBarLabel.justify = 'right';
            win.pnl.progBar = win.pnl.add("progressbar", [10, 35, 720, 60], 0, imageList.length-1); //progress bar
            win.pnl.symbolCount = win.pnl.add("statictext", [10, 70, 710, 85], "Symbols added: 0"); //label indicating number of symbols created
            win.pnl.symbolLabel = win.pnl.add("statictext", [10, 85, 710, 100], "Last added symbol: -"); //label indicating name of the symbol created
            win.pnl.errorListLabel = win.pnl.add("statictext", [10, 110, 720, 125], "Error log:"); //progress bar label
            win.pnl.errorList = win.pnl.add ("edittext", [10, 125, 720, 225], "", {multiline: true, scrolling: true}); //errorlist
            //win.pnl.errorList.graphics.font = ScriptUI.newFont ("Arial", "REGULAR", 7);
            //win.pnl.errorList.graphics.foregroundColor = win.pnl.errorList.graphics.newPen(ScriptUIGraphics.PenType.SOLID_COLOR, [1, 0, 0, 1], 1);
            win.doneButton = win.add("button", [640, 265, 740, 295], "OK"); //button to dispose the panel
            win.doneButton.onClick = function () //define behavior for the "Done" button
                win.close();
            win.center();
            win.show();
            //Iterate images
            for (var i = 0; i < imageList.length; i++) {
                win.pnl.currentTaskLabel.text = 'Examining: ' + imageList[i].name; //update current file indicator
                win.pnl.progBarLabel.text = i+1 + '/' + imageList.length; //update file count
                win.pnl.progBar.value = i+1; //update progress bar
                if (imageList[i] instanceof File) {         
                    fname = imageList[i].name.toLowerCase(); //convert file name to lowercase to check for supported formats
                    if( (fname.indexOf('.eps') == -1) &&
                        (fname.indexOf('.png') == -1)) {
                        win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Not a supported type.\r'; //log error
                        continue; // skip unsupported formats
                    else {
                        sname = imageList[i].name.substring(0, imageList[i].name.lastIndexOf(".") ); //discard file extension
                        // Check for duplicate symbol name;
                        if (symbolExists(activeDoc, sname)) {
                            win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Duplicate symbol for name: ' + sname + '\r'; //log error
                        else {
                            placedart = activeDoc.placedItems.add(); //get a reference to a new placedItem object
                            placedart.file = imageList[i]; //link the object to the image on disk
                            placedart.name =  sname; //give the placed item a name
                            placedart.embed();   //make this a RasterItem
                            placedart = activeDoc.rasterItems.getByName(sname); //get a reference to the newly created raster item
                            newsymbol = activeDoc.symbols.add(placedart); //add the raster item to the symbols                 
                            newsymbol.name = sname; //name the symbol
                            symbolcount++; //update the count of symbols created
                            placedart.remove(); //remove the raster item from the canvas
                            win.pnl.symbolCount.text = 'Symbols added: ' + symbolcount; //update created number of symbols indicator
                            win.pnl.symbolLabel.text = 'Last added symbol: ' + sname; //update created symbol indicator
                else {
                    win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Not a regular file.\r'; //log error
                win.update(); //required so pop-up window content updates are shown
            win.pnl.currentTaskLabel.text = ''; //clear current file indicator
            // Final verdict
            if (symbolcount >0) {
                win.pnl.symbolLabel.text = 'Symbol library changed. Do not forget to save your work';
            else {
                win.pnl.symbolLabel.text = 'No new symbols added to the library';
            win.update(); //update window contents
            templayer.remove(); //remove the temporary layer
        else {
            alert("Action cancelled by user");
    if ( app.documents.length > 0 ) {
        importFolderContents( getFolder() );
    else{
        Window.alert("You must open at least one document.");

    Thank you, nice job & I am looking forward to trying it out!

  • How to find out the Pixel Dimensions and Document Size of placed images?

    Is it possible to find out the placed image details like Pixel Dimensions(Width,Height) Document Size(Width,Height) in illustrator through scripting. Kindly advice me with some examples.

    http://www.adobeforums.com/webx/.3bbaa316.59b84fd8
    I hope the snippet therein will get you started.
    But after all, when you place an image via pi=layer.placedItems.add() it should pop in with its default dimensions, so that you have pi.height and pi.width ready.
    Is this what you are aiming at?

  • How do I align a placed image in a frame using JS?

    I am new both to javascript and to scripting for InDesign, so please bear with me on this question.
    I am trying to align an image in a graphic frame so it aligns to the top right corner of the frame.
    I can do this using the InDesign interface by following these steps:
    1. Create a rectangular frame.
    2. Right-clicking the frame and selecting "Fitting > Frame Fitting Options."
    3. Selecting the top-right square in the "Alignment" area of the Frame Fitting Options dialogue.
    For me, this automatically aligns the image to the top right corner in the selected text frame, even if there is a placed item in the frame.
    I am trying to apply this to the actual image frame using the following code where "modelFrame" is the rectangle that is the parent of the placed image:
              modelFrame.frameFittingOptions.fittingAlignment.anchorPoint = AnchorPoint.TOP_RIGHT_ANCHOR;
    I am not getting an error, but I am also not getting the desired results (in fact, it doesn't change anythign at all). What am I doing wrong?

    Hi lanejd,
    I have got the same issue as you but had just found the solution. Please see below:
    modelFrame.frameFittingOptions.fittingAlignment.anchorPoint = AnchorPoint.TOP_RIGHT_ANCHOR;
    This will only set the properties for the Frame Fitting Options. You will need to call a method/function. Add the below line to your script and it will execute the Frame fitting Options.
    modelFrame.fit(FitOptions.applyFrameFittingOptions);
    Hope this help!

  • Create Pattern Swatch from Placed Image in Javascript

    I need to create a large number of pattern swatches from some .jpg file on disk. I've figured out how to script the insertion of the .jpgs into my AI document as placed images:
         // Embed the image into the document.
         file = new File("MyImage.jpg");
         var document = app.activeDocument;
         var newPlaced = document.layers["swatches"].groupItems.createFromFile(file);
         newPlaced.name = "MyImage_Placed";
    This works fine and the item shows up in the correct layer as an embedded image.
    Now I want to create a PatternSwatch (I think) from that Image.
    To create a new swatch the code starts out as:
         newSwatch = document.swatches.add();
         newSwatch.name = "MyImage_Swatch";
    but now I'm stuck! How do I associate the new PlacedItem with the swatch I just created? I can see the swatch in the palette so I'm partway there.

    When you say you would drag the image itself into the Swatch Palette and it would show the image itself? How would then use this swatch? Can you give an example of what you would apply a jpeg to as a swatch? The only palette that I can think of off the top of my head that you can drag a jpeg into and have the icon appear as the jpeg is the Symbols Palette. Is is possible that you were using the Symbols Palette in the past and not the Swatch Palette?

  • Oracle Reports - Unable to generate report with colored image in bitmap mod

    Hi,
    I am using Oracle reports 6i.
    I am generating a post script[.ps] file using bitmap mode.
    The layout contains an image. The image is stored in oracle database which is colored image.
    But when the report is generated same is being generated with gray color.
    Could any one advise on resolving this issue? The objective is to generate the report with colored image and not gray or black&white

    What kind of images do you have? Reports only supports a few formats, e.g. JFIF. So, if you have JPG images with EXIF meta information in the header, you have to remove those first.
    when the report is generated same is being generated with gray color.What happens if you sent the output directly to the printer?
    And what happens if you create a PDF file instead of Postscript?

  • Exporting report to Excel, image doesn't want to show

    I have a report that has the client's company logo located in a narrative inside a report. The image is placed in the correct location as per the other posts on the forums. When I run the report and download to Excel, the image shows up as an x in Excel. Tried to use both of these syntax:
    <img src="images/Logo_stacked.jpg" alt="" border="0">
    <image src = "res/s_oracle10/images/Logo_stacked.jpg">
    Neither showed up in Excel. There is probably something that I am forgetting or setting somewhere, but any help would be appreciated. Thanks!
    Michael

    Hi There
    This is known bug from Oracle. The issue is related to Java version, you would encounter this if you are using Java 1.6, please downgrade to Java 1.5 and it would work.
    Hope this helps
    Sunil S Ranka
    Blog:http://sranka.wordpress.com
    Tweet : @sunil_ranka
    “Superior BI is the antidote to Business Failure”
    PS : @Buildscharacter, You being protective about your Tweets couldn't reply you.

  • Problem with photoshop automatically resizing placed images

    Hi,
    I have PS6. I have images that are 144x100 px. When I use file>place ps resizes the image to 108x75. I can't figure out how to make ps quit resizing my pictures. Anybody know?
    Thanks

    When Pasting, Dragging, copying and placing an image Photoshop will copy all of the image being duplicated original pixels to preserve the image pixel quality the image quality.  If the receiving document has a different DPI resolution the image may look a different size in the  receiving documents because of the number of pixels added to the document that has a lower or higher dpi resolution.  If the image is being placed in if the image pixels exceeds the receiving documents canvas size. Photoshop may scale the smart object layer to fit within the canvas that depends on the users Photoshop's preference.  All of the images original pixels are still there in the embedded object.   In my Photoshop Collage Scripts  I always transform all placed images to 100% size  incase Photoshop scaled the placed image.  For you can not get the scale percent Photoshop used.  Once I know I have the image at 100% size I can use the layer bounds to get the actual number of pixels there are in the placed image.  Once I know that I can calculate the scale I need to use to resize the image to fit the area being populated in the collage template.   Once resized I center it into place and mask off any excess image pixels.

  • Placing Image - InDesign vs InDesignServer

    I have a script that correctly places images in tagged rectangles via script in InDesign, the script then exports to PDF. All is well.
    When I run the same script with the same image path folder structure in InDesignServer, the exported PDF does not show the 'placed' images. I'm getting no errors in my console.
    Early in the script I have;
    myInDesign.imagePreview = True
    I place the images with;
    myRectangle.Place myFile, False
    myRectangle.fit 1668247152
    myRectangle.fit 1667591779
    for each myItem in myRectangle.items
         myItem.itemLink.unlink
    next
    I've tried it with and without the .unlink code (an attempt to force embedding of the images)
    In all other aspects the script works the same on ID as IDS. I'm starting my ID CS6 server with InDesignServer -previews
    I suspect I'm missing something with the PDF export preferences, but have no idea why it's working on ID and not on IDS.
    Any help greatly appreciated.

    I'm not able to post all the code, but here's a stripped down version with all the important parts... The only line that differs from ID vs ID Server is the first line...
    'Set myInDesign = CreateObject("InDesignServer.Application")
    Set myInDesign = CreateObject("InDesign.Application")
    Set myDocument = myInDesign.Open(strTemplateFilename )
    Set myPage = myDocument.Pages.Item(1)
    set myPageItems = myPage.PageItems
    set myRectangles = myPage.Rectangles
    myInDesign.imagePreview = True
    myInDesign.findTextPreferences = Nothing
    myInDesign.changeTextPreferences = Nothing
    ' change some text
    myInDesign.findTextPreferences.findWhat = "[" & strattrname & "]"
    myInDesign.changeTextPreferences.changeTo = strattrvalue
    myDocument.changeText()
    ' change the image in the targeted rectangle
    for each myRectangle in myRectangles
      if myRectangle.Label = strattrname then
       myRectangle.Place strWorkingPath & strattrvalue, False
       myRectangle.fit 1668247152
       myRectangle.fit 1667591779
       for each myItem in myRectangle.items
        myItem.itemLink.unlink
       next
      end if
    next  
    ' save the document as a template (this will be sent to the printer)
    myDocument.Save strINDTOut, True
    ' perform a mailmerge of one record
    Set myDataProperties = myDocument.DataMergeProperties
    myDataProperties.SelectDataSource(strMergeSample)
    myDataProperties.DatamergePreferences.RecordsPerPage = 1684886386
    myDataProperties.DatamergePreferences.RecordNumber = 1
    ' export the one record merge document to PDF for sending preview
    myDataProperties.export strPDFOut
    It works fine in ID, leaves the images empty(blank) when performed in IDServer. Both are up-to-date current versions - although IDS is still in 90 trial period.
    Any help appreciated.

  • Placed Image problem solved

    Both my colleague and I had problems with Adobe Illustrator CS5:
    Problem:
    1) AI refuses to "Place" external images.
    2) Any existing AI documents with extant placed images now refuses to show them. The bounding boxes are there, but no images.
    Solution:
    Delete or remove the "FontExplorer X for Illustrator CS5.aip" plugin from the Adobe Illustrator > Plug-ins folder and all will be fine again.

    Geoff,
    Thank you for sharing.
    There has been another report of FontExplorer disturbing Illy recently.
    We shall try to remember.

  • Placing images at an exact scale in Indesign CS5?

    Hi all,
    I'm hoping someone can clue me in here... I've just updated from Indesign CS3 to CS5. I was hoping in the upgrade Indesign would give you an option for placing images in picture frames at an exact scale (like you can in Quark), for instance if you place an empty picture box on the master pages and enter 55% scale you would drop in images on each page of the layout at 55% scale.
    In Indesign CS3 the closest I could get to that was to place an "FPO" image in the picture boxes on the master pages at 55% scale, then when I'd replace each FPO on the layout pages with my images they would drop in at 55% scale. It worked pretty well.
    With CS5 I'm finding that when I replace an FPO image it will still drop in at the same scale the FPO is at, but ONLY if you load and place one image at a time... if you load, say, twenty images and drop them into the layout replacing the FPO images, they come out as prorortionally fitted to the picture frame... NOT as 55%.
    this is a real issue for me as I routinely work on layouts where I need to place 400 and up images at an exact scale...
    Anyone know a work around here, or any tips?
    Thanks in advance.

    As far as I know, you can't set scaling for a empty frame. You can use a placholder image and scale that, and if you turn off relink preserves dimensions relinking to a new image would preserve the scaling, but only if you do it one at a time through the links panel. Using the Place command and replacing theimages will not preserve the scaling, so through the interface there isn't much help.
    On the other hand, I think this could be scripted. If you need all the images to be the same scale it should just be a matter of looping through the document images and setting the scale. If none of the scripters are taking notice here, ask over in the scriping forum.

  • Accurately finding spot colours in placed images

    Hi all,
    I'm trying to collate a list of the colours physically present in an artwork, including those in placed images which is where I'm having trouble.
    When an image is placed into an artwork, any spot channels present in a PSD (we only work with PSD's here) are brought in as swatches into Illustrator.  However if a spot channel is then removed from the image and saved, Illustrator reloads the image but doesn't realise that the channel has been removed and the colour remains in the swatch list.
    The Custom Colour suite reports that the colour is still there and used externally and separation preview still shows it as existing in the artwork.  Up to now I've been using exiftool to list the extra channels and parsing the output, but I'd prefer not to have to rely on an external dependancy.  There's nothing in the placed image's dictionary either.
    We also use a suite of (very expensive) plug-ins from large, Belgian graphics software company.  One of their plug-ins lists colours similarly to separation preview but it's completely accurate in it's representation of which colours are physically present in the artwork.  I'm not attempting to re-create it's functionality, rather generate the same information.
    Any suggestions would be hugely appreciated!
    Thanks
    -W

    Ok, it seems like I couldn't see the wood for the trees with this one.  I finally found the solution with AIFOConversionSuite::EnumerateContents(), which with closer inspection of the documentation, provides exactly what I needed... including that 'god I'm such an idiot' feeling
    I first tried traversing the artwork manually, then I discovered AIPathStyle::AdjustObjectAIColors() which provides some colour information but seems to have no knowledge of placed images.
    I guess you live and learn!
    -W

  • How to call a Shell Script from Report 6i

    Hi All,
    Can anybody tell, how to call a Shell Script from Report 6i.
    Thanks in Advance,
    Bala

    try the SRW.USER_EXIT (user_exit_string CHAR);

Maybe you are looking for