[cs4] [js] place images in a folder

Hello, I'm sure this is pretty simple, but I can't manage to wrap my head around it... How do I place all images in a folder in an indesign document? I want to be able to simply run the script, select the folder, and have the all images placed in the document.
Thanks!

Hope this helps:
if (app.documents.length > 0){
        var mydoc = app.activeDocument;
        var myRoot = Folder.selectDialog("Choose the folder where the images are located", undefined, false);
        main();
else{alert("No Documents Open")
function main(){
    if(myRoot != null){
var myBase = Folder(myRoot);
var files = myBase.getFiles("*")
for(var i = 0; i < files.length; i++){
try{
var myfile =     File(files[i] )
app.activeWindow.activePage.place(myfile)
catch(myerror){
    alert(myerror);
~mike

Similar Messages

  • CS4 unable to place image ERROR: The file is not readable

    Hi All,
    I have been experiencing big issues with Illustrator CS4 and placing images into a document.
    Basically I will be working on say a packaging project and after about the 4th image being placed I will get the error message The file is not readable I select OK (the only option available)
    RESULT: no file placed no where to go?
    I then have to save the document, close Illustrator, re-open, open the document and then the image will usually place (not always first time though and sometimes I will have to reboot the whole system!) but then the 5th, 6th, 7th image after that I have to follow the same procedure!... The image files are fine, 300ppi, 20-30MB max, PSD, TIFF, JPG dose not matter all follow the same issue... but eventually after a lot of rebooting and loading the so called un-readable files will go into the document.
    Also the image will place sometimes but the same error message will appear on attempting to embed the image!
    All very annoying and massively time consuming!!!
    To top it off since the above, random AI files when loading up will crash Illustrator out... again after a reboot the same file will open fine with no problems???
    My system:
    OS: Windows 7 Ultimate (64bit)
    Processor: Intel Core i7 CPU 920 @ 2.67GHz (quad core)
    RAM: 6GB
    GRAPHICS: NVIDIA Quadro FX 570 (3GB) (Dual monitor)
    DVD/CDR
    PRIMARY: ATA 500MB
    SECONDARY: ATA 1Tb
    Im desperate to get this sorted... other wise its back to my old system... slow but reliable!!
    Many Thanks!!

    Well, I just encountered the same issue using Illustrator CS5...getting the "The File Is Not Readable" error message...first time that's happened in the 14 years of using the program. It seems the file size was too large for Illustrator (or one of my computers) to handle. So I opened the file using one of my other computers and deleted the unused layers to reduce the file size. Originally, there were 6 layers with 3 different versions of the artwork and what I ended up having to do is create 3 separate files rather than having it all in 1.
    Hope this helps!

  • Place images to a specific spot in a template

    I am trying to create an action that will drop images into a specific spot in another document and save it with a certain file name. After the first image is dropped in and saved, I want my next image to do the same and so on. I have all my images cropped to the correct ratio and being pulled from a folder on my desktop. I have my template open in Photoshop where I want my images from that folder to be dropped into. Is this possible?
    Any help is greatly appreciated!!
    Melissa

    Melissa
    What you want to do can be done but it is complex and actions have some limitations and can not use logic without using a script or two. File saving  can be tricky for an action will always save the same file name or use the current document name saved either overwriting the file or saving it to some other particular folder. Action that populate a template can be created but it will always populate the same number of images because an action can not use logic to find out how many spots there are to populate. There are different ways to drop an image into the active document you can paste into an area or just past in the image in as a new layer.  You can also Place images in as smart objects. Each method has some advantages and disadvantages. Layers can also be aligned with selections and layers can be transformed in size.  Your best off creating rule for creating a template and have a plan as to how your going to populate these templates that follow your rules. To protect the template from alteration you may want to dupe the template close the original and work on the duped version. When you dupe the template you can give the dupe a name if you do not name it the new document will have the same name with copy appended.
    Scripting is more powerful then Action but they are programs that are written in a scripting language. Photoshop supports three languages. VBS, Applescript and Javascript. Only Javascript is supported on both the MAC and PC platforms.  Even using Javascript you may need to code the script to work on both platforms for I'm sure there are some differences in the OS and file system the may need special handling to work on both platform.  From you description of you work-flow it is hard to tell exactly what you are doing.   If you trying simple create a photo Collage.  You may want to have a look at my free Package for Photoshop called "Photo Collage Toolkit" . I have been told this package works on a MAC but I created it and tested it on widows and got it To work with CS2, CS3, CS4 and CS5.
    Photo Collage Toolkit UPDATED Sept 24, 2011 added a script to replace a Populated Layered Collage Smart Object Image with an other image with resizing.
    Photoshop scripting is powerful and I believe this package demonstrates this.
    The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.
    There are eight scripts in this package they provide the following functions:
    TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
    CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
    LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
    InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
    ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
    PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
    BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
    BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
    Note: Rags Gardner www.rags-int-inc.com Photoshop Collage Template Builder script Copyright (c) 2006 builds layered Photo Collage Template psd files. Rags's has given me permission to include a modified version of his script in my package. The modification converts Rags's layered image template document into a flattened template compatible with Photoshop "Photo Collage Toolkit" package. There is also an option that will instead create a layered image stack like Rags's templates are these are also produced if you attempt to create a template with more then 53 images.
    Photoshop only supports up to 53 Alpha channels therefore with its design the Photo Collage Toolkit can only support collages with 1 to 53 images. I do not feel this is a big limitation for if you put 53 3:2 aspect ratio images on a large 16" x 20" paper they would need to be less then 1.9" x 2.86" in size if you wanted a frame around each and less then .95" x 1.43" on a 8" x 10" year book page size.
    While the maximum number of images in a collage is 53 you can actually create larger collages by populating a large number of images into several collages and then populate yet an other collage template with these populated collages. Each will be placed into the collage of collages as a single smart object layer. You may want to save the populates PSD file as Jpeg files first to cut down on the overhead of having large PSD file smart object layers in the collage of collages.
    Documentation and Examples

  • Images in wrong folder

    Just started trawling though my many digital files. Upon opening one imported Folder, I find images from another folder present in there. A quick look in finder confirms that the actual images are where they should be, but LR has them in 2 places at once. What gives?

    Since Folders are supposed to reflect actual folders in the finder, try this. Go to one of the folders of images in LR and select an image. Do Cmd-R which will show you the folder in the Finder. Now go to the other folder and do the same. Do you infact go to the same folder or another?
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.8 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • Unable to place images in Illustrator

    (Illustrator CS2)
    Hi, Im still learning the program but this is an error that hasn't occurred before under the same circumstances. I am working on Macs at uni (as I dont have Illustrator at home) and with images from my USB drive. I want to get the images into my ai document and trace them to make a logo, but Illustrator is preventing me from doing this in any way I try.
    * I try to 'place' (file>place...) a jpg from the USB into the ai document and one of three things happens:
    1. It appears as though nothing has happened so I 'select all' and this highlights an empty box where my image should be. This always happens on the first try after I open the document.
    2. I delete the box and try again. This time not even the invisible box is placed. The computer processes and then acts as if I commanded it to do nothing.
    3. Irregularly, if I try again it seems like it's about to happen (with a preview showing and asking me to approve) and then I get the message "the operation cannot complete because of an unknown error".
    * I tried opening the jpg in Photoshop and copying and pasting from there and got the same "unknown error" message, followed by the empty invisible box.
    * The images place in photoshop with no problem.
    * The images cant be dragged and dropped into Illustrator.
    * I tried opening the image with Illustrator and get the message "insufficient memory was available to complete the operation". The image is only small - less than 1MB.
    * I tried changing the file to a tiff and a pdf. I tried uploading the jpg to internet and saving and placing from there but this is unsuccessful. I tried other images saved both from my computer and the uni computer and they dont work.
    * SOMETHING WORKS: I tried with random images from the internet and some (usually around 4kb) saved to Documents and placed are done so successfully. But this is no use to me.
    I have done this in the past and there have been no problems placing or pasting images whatsoever. I dont think uninstalling is really an option as they are the uni's computers and that would probably be an ordeal.. I really need this to be fixed quickly as I have no other access to Illustrator and it's part of a job. It happens with all the computers in the lab. I cant even start making the logo until this is overcome. I would really appreciate some help! your ideas on what the problem could be and what needs to be done to fix it.
    Thanks for your time,
    Simon.

    One causes of this error I've encountered has to do with the volume size of the disk the user's home folder is stored on.
    I'm guessing that Simon Manion is logged onto the Mac at his university using a networked home folder that is stored on a volume larger than Illustrator scratch disk management routines can handle. (2TB is the limit I think.)
    The workaround that I've been using is to create a 500MB disk image with Disk Utility, mounting the image, and using it as the only scratch disk. You may need to make your disk image larger. (Remember to restart Illustrator for the new scratch settings to take effect.)
    Even though the actual local volumes are under 2TB, they don't seem to work as scratch disks if the user's home folder lives on a large server. For some reason, setting the scratch disk to a virtual volume gets thing working correctly.
    This has solved the place image problem for me in Illustrator CS, CS2, and CS3.

  • What's the best way to place images in table cells?

    I'm working on a basic tooling catalog/list using a table for all of the information.  One of the columns is for an image of the tool.  Is there a way to place each image in a cell and have it resized to fit the cell dimensions (including my text inset settings)?  I'm using CS4 and the images are all tiff files, although I also have psd files of each.  Any suggestions would be appreciated.

    Table cells don't adjust automatically except in the vertical direction when set to "at least" some dimension, and I suspect you don't really want that anyway. Keep in mind that column width is constant through the whole table, so fitting the cell to the largest image is going to give you a giant coumn width that isn't used for smaller product shots in the same table.
    What about making an image frame the size you want, and setting the fitting options to fit proportionally? Copy that frame and paste into the cell, then place the image in the frame.

  • Automatically place images within multiple InDesign documents

    I work for a publishing company of agricultural trade magazines and work on few titles each month. We are trying to streamline our production procedures and previous company I worked for had a script they used to place images within text pages by searching for the file name, however there were some limitations with this script (it would only work within 1 InDesign document and only within 1 InDesign story at a time). The company I am with now breaks out each editorial story into separate InDesign files and we place image boxes when the display ads are going to go. For our purposes now, I am looking for a script that, once all of the image boxes were tagged with the image file names, could search between multiple InDesign documents in a folder and automatically place all the images for us. Is anything like this available or able to be created? If so, would it have the capacity to search between multiple InDesign documents and search the entire document for the image file names? Any help would be greatly appreciated!

    Hi Kasyan,
    They were tagged using a program called Pathways created by a computer programmer the company used at the time. The issues that I was working on were annual Buyers' Guides so they were mainly just listings and inline graphics. The kinds of issues I work on now are monthly issue with various stories and no inline graphics, but display advertisements. And each story is created and laid out in a separate InDesign document. So I would need a script that can search an entire group of documents for file names and/or image boxes instead of just in one story in one document for inline graphics. (sorry if this is confusing).
    I currently do not have a script to work from and am looking for something new that can be used to save use the time of placing every ad manually.
    Thanks for your help and feedback!
    Matt

  • Illustrator CS5 don't place file for recent folder but instead goes to default

    Hi,
    I recently updated my mountain lion os...and since than, my Illustrator cs5 act strangely.
    I cannot PLACE an image from my subfolder anymore, but instead it goes back to default.
    For example:
    Before : I was able to click PLACE and it will open to folder titled PROJECT: showing all images.
    Now: when I click PLACE, it open to DESKTOP folder instead, then I have to go to the subfolder and select "PROJECT"  to place images.
    Does anyone have a solution?
    Thanks in advance.

    Hi,
    I recently updated my mountain lion os...and since than, my Illustrator cs5 act strangely.
    I cannot PLACE an image from my subfolder anymore, but instead it goes back to default.
    For example:
    Before : I was able to click PLACE and it will open to folder titled PROJECT: showing all images.
    Now: when I click PLACE, it open to DESKTOP folder instead, then I have to go to the subfolder and select "PROJECT"  to place images.
    Does anyone have a solution?
    Thanks in advance.

  • Find text place image

    Hello
    I have a script that find text and replaced it with a image, but it makes a new document and i want it in the same document that i have open.
    Can somebody help me with this problem. See script below. I work with Indesign CS 5 mac.
    Kinde regards,
    Patrick
    #target indesign
    var myDialogResult = CreateDialog();
    if (myDialogResult == undefined) exit();
    CheckIfChosenFoldersExist();
    var myIndFiles = [];
    var mySubFolders = [];
    CheckFolder(myDialogResult.indFolder);
    if (myIndFiles.length == 0) err("No InDesign files have been found in the selected folder and its subfolders.");
    var myStartFolder = myDialogResult.imagesFolder.parent;
    mySubFolders = getSubFolders(myStartFolder);
    WriteToFile("\r--------------------- Script started -- " + GetDate() + "---------------------\n");
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;
    for (f = 0; f < myIndFiles.length; f++) {
              ProcessIndFile(myIndFiles[f]);
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    app.findGrepPreferences = app.changeGrepPreferences = null;
    WriteToFile("--------------------- Script finished -- " + GetDate() + "---------------------\r\r");
    alert("All done!");
    // ------------------------------------------------- FUNCTIONS -------------------------------------------------
    function PlaceImages() {
              app.findGrepPreferences = app.changeGrepPreferences = null;
              app.findGrepPreferences.findWhat = '@.+?@';
              var myFoundItems = app.activeDocument.findGrep();
              for (i = 0; i < myFoundItems.length; i++) {
                        var myName = myFoundItems[i].contents.replace (/@/g, "");
                        var myFile = new File(myDialogResult.imagesFolder + "/" + myName);
                        var myFrame = myFoundItems[i].parentTextFrames[0];
                        if (myFile.exists) {
                                  PlaceIntoFrame(myFrame, myFile);
                                  continue;
                        if (!SearchInSubfolders(myName, myFrame)) {
                                  WriteToFile("\tNOT FOUND  -- " + myFile.fsName + "\n");
    function SearchInSubfolders(myName, myFrame) {
              for (j = 0; j < mySubFolders.length; j++) {
                        var myFolder = mySubFolders[j];
                        var myFile = new File(myFolder + "/" + myName);
                        if (myFile.exists) {
                                  PlaceIntoFrame(myFrame, myFile);
                                  return true;
              return false;
    function PlaceIntoFrame(myFrame, myFile) {
              try {
                        if (myFrame.characters.length < 100) {
                                  myFrame.getElements()[0].place(myFile);
                                  switch(myDialogResult.myRadSelected)          {
                                            case 2:
                                                      myFrame.fit(FitOptions.CENTER_CONTENT);
                                            break;
                                            case 3:
                                                      myFrame.fit(FitOptions.FRAME_TO_CONTENT);
                                            break;
                                            case 4:
                                                      myFrame.fit(FitOptions.PROPORTIONALLY);
                                            break;
                                            default:
                                            // do nothing
                        WriteToFile("\tPlaced -- " + myFile.fsName+ "\n");
              catch(e) {
                        WriteToFile("\tSome error occured while placing -- " + myFile.fsName + "\n");
    function CheckFolder(folder) {
              var fileList = folder.getFiles()
              for (var i = 0; i < fileList.length; i++) {
                        var file = fileList[i];
                        if (file instanceof File && file.name.match(/\.indd$/i)) {
                                  myIndFiles.push(file);
                        else if (file instanceof Folder) {
                                  CheckFolder(file);
    function getSubFolders(theFolder) {
              var myFileList = theFolder.getFiles();
              for (var i = 0; i < myFileList.length; i++) {
                        var myFile = myFileList[i];
                        if (myFile instanceof Folder){
                                  mySubFolders.push(myFile.absoluteURI);
                                  getSubFolders(myFile);
              return mySubFolders;
    function err(e, icon){
              alert(e, "Place Images Script", icon);
              exit();
    function ProcessIndFile(myFile) {
              try {
                        var myDoc = app.open(myFile);
                        WriteToFile(myDoc.name + "\n");
                        var myNewFile = new File(myFile.fsName.replace(/\.indd$/i, "_Backup.indd"));
                        myFile.copy(myNewFile);
              catch(e) {
                        WriteToFile("Cannot open file -- " + myFile.fsName + "\nError: " + e.message + " (Error# " + e.number  + ")\n");
              PlaceImages();
              myDoc = myDoc.save();
              myDoc.close();
    function CreateDialog() {
              var myIndFolder, myImagesFolder;
              if (app.extractLabel("Kas_PlaceImages_IndFolderPath") != "") {
                        var myIndFolderPath = app.extractLabel("Kas_PlaceImages_IndFolderPath");
              else {
                        var myIndFolderPath = "No folder has been selected";
              if (app.extractLabel("Kas_PlaceImages_ImageFolderPath") != "") {
                        var myImageFolderPath = app.extractLabel("Kas_PlaceImages_ImageFolderPath");
              else {
                        var myImageFolderPath = "No folder has been selected";
              var myDialog = new Window('dialog', 'Place Images');
              myDialog.orientation = 'row';
              myDialog.alignChildren = 'top';
              var myPanel = myDialog.add('panel', undefined, 'Choose folders for:');
              var myIndFolderStTxt = myPanel.add('statictext', undefined, myIndFolderPath);
              var myButtonInd = myPanel.add('button', undefined, 'InDesign files', {name:'indd'});
              var myImagesFolderStTxt = myPanel.add('statictext', undefined, myImageFolderPath);
              var myButtonImages = myPanel.add('button', undefined, 'Image files', {name:'images'});
              var myGroup = myDialog.add('group');
              myGroup.orientation = 'column';
              var myRadioPanel = myGroup.add('panel', undefined, 'After placing:');
              myRadioPanel.alignChildren = 'left';
              var myRadioBtn1 = myRadioPanel.add('radiobutton', undefined, 'do nothing');
              var myRadioBtn2 = myRadioPanel.add('radiobutton', undefined, 'center content');
              var myRadioBtn3 = myRadioPanel.add('radiobutton', undefined, 'fit frame to content');
              var myRadioBtn4 = myRadioPanel.add('radiobutton', undefined, 'fit content proportionally');
              if (app.extractLabel("Kas_PlaceImages_RadioSelected") != "") {
                        eval("myRadioBtn" + app.extractLabel("Kas_PlaceImages_RadioSelected") + ".value= true");
              else {
                        myRadioBtn1.value = true;
              var myOkCancelGroup = myGroup.add('group');
              myOkCancelGroup.orientation = 'row';
              var myOkBtn = myOkCancelGroup.add('button', undefined, 'Place', {name:'ok'});
              var myCancelBtn = myOkCancelGroup.add('button', undefined, 'Quit', {name:'cancel'});
              myButtonInd.onClick = function() {
                        myIndFolder = Folder.selectDialog ('Chose a folder for InDesign documents');
                        if (myIndFolder != null) {
                                  myIndFolderStTxt.text = myIndFolder.fsName;
              myButtonImages.onClick = function() {
                        myImagesFolder = Folder.selectDialog ('Chose a folder for Images');
                        if (myImagesFolder != null) {
                                  myImagesFolderStTxt.text = myImagesFolder.fsName;
              var myShowDialog = myDialog.show();
              if (myIndFolder == undefined) {
                        if (myIndFolderStTxt.text == "No folder has been selected") {
                                  myIndFolder = null;
                        else {
                                  myIndFolder = new Folder(myIndFolderStTxt.text);
              if (myImagesFolder == undefined) {
                        if (myImagesFolderStTxt.text == "No folder has been selected") {
                                  myImagesFolder = null;
                        else {
                                  myImagesFolder = new Folder(myImagesFolderStTxt.text);
              var myRadSelected;
              if (myRadioBtn1.value) {
                        myRadSelected = 1;
              else if(myRadioBtn2.value) {
                        myRadSelected = 2;
              else if(myRadioBtn3.value) {
                        myRadSelected = 3;
              else if(myRadioBtn4.value) {
                        myRadSelected = 4;
              app.insertLabel("Kas_PlaceImages_RadioSelected", myRadSelected + "");
              app.insertLabel("Kas_PlaceImages_IndFolderPath", myIndFolderStTxt.text);
              app.insertLabel("Kas_PlaceImages_ImageFolderPath", myImagesFolderStTxt.text);
              if (myShowDialog== 1) {
                        var myResult = {};
                        myResult.indFolder = myIndFolder;
                        myResult.imagesFolder = myImagesFolder;
                        myResult.myRadSelected = myRadSelected;
              return myResult;
    function WriteToFile(myText) {
              myFile = new File("~/Desktop/Place Images Report.txt");
              if ( myFile.exists ) {
                        myFile.open("e");
                        myFile.seek(0, 2);
              else {
                        myFile.open("w");
              myFile.write(myText);
              myFile.close();
    function GetDate() {
              var myDate = new Date();
              if ((myDate.getYear() - 100) < 10) {
                        var myYear = "0" + new String((myDate.getYear() - 100));
              } else {
                        var myYear = new String ((myDate.getYear() - 100));
              var myDateString = (myDate.getMonth() + 1) + "/" + myDate.getDate() + "/" + myYear + " " + myDate.getHours() + ":" + myDate.getMinutes() + ":" + myDate.getSeconds();
              return myDateString;
    function CheckIfChosenFoldersExist() {
               if (myDialogResult.indFolder == null) {
                        err("No folder has been chosen for InDesign files.", true);
              else if (myDialogResult.indFolder.constructor.name == "Folder") {
                        if (!myDialogResult.indFolder.exists) {
                                  err("Folder \"" + myDialogResult.indFolder.fsName + "\" chosen for InDesign files does not exist.", true);
              if (myDialogResult.imagesFolder == null) {
                        err("No folder has been chosen for pictures.", true);
              else if (myDialogResult.imagesFolder.constructor.name == "Folder") {
                        if (!myDialogResult.imagesFolder.exists) {
                                  err("Folder \"" + myDialogResult.imagesFolder.fsName + "\" chosen for images does not exist.", true);

    Try this, I use it every day
    /*******************ImagePlacer***************************
        this script will addimages to the document by
        substituting them with the name of the image file
        between @s (file format included[@mypic.bmp@]),
        selecting them from a specified file (see below)
        and applying object styles to them, as well as
        applying the right tab i necesary.
        It then looks for overflows in the document. If an
        overset is found, it will resize to margin size the
        text frame and if overset continues, it will add a
        new page and frame, which then will be linked
        to the previous frame, allowing the story flow.
        Questo file deve essere copiato nella cartella Script di InDesign
    //Creates a new document using the specified document preset.
    //Replace "myDocumentPreset" in the following line with the name
    //of the document preset you want to use.
    var myDocument = app.documents.add(true,app.documentPresets.item("MyPreset"));
    //If the active document has not been saved (ever), save it.
    if(app.activeDocument.saved == false){
    //If you do not provide a file name, InDesign displays the Save dialog box.
    app.activeDocument.save(new File("/Users/paolbot/Desktop/Document.indd"));
    function main()
    var myDocument = app.documents.item(0);
    var myPage = myDocument.pages.item(0);
    var myTextFrame = myPage.textFrames.add({geometricBounds:myGetBounds(myDocument,myPage)});
    myTextFrame.textFramePreferences.textColumnCount = 7;
    myTextFrame.place(File("/Users/paolbot/Desktop/text.txt"));
    //Place a text file in the text frame.
    //Parameters for TextFrame.place():
    //File as File object,
    //[ShowingOptions as Boolean = False]
    //You'll have to fill in your own file path.
    //Define GREP search
    var grepFind ="@@@.+@@@";
    //Name of the folder where pdf are
    var myFiguresFolder = "pictures";
    // Stile Paragrafo applicato
    var myPStyle = myDocument.paragraphStyles.item("Normal");
    var NextPStyleCS = myDocument.paragraphStyles.item("Par_Style");
    var NextPStyleEN = myDocument.paragraphStyles.item("Par_Style_en");
    var NextPStyleDE = myDocument.paragraphStyles.item("Par_Style_de");
    // Text style applied
    var myCStyle = myDocument.characterStyles.item("text");
    //Object style applyed
    var myOStyle = "";
    var oStyle_1 = myDocument.objectStyles.item("Pictures");
    var oStyle_2 = myDocument.objectStyles.item("Pictures");
    var oStyle_3 = myDocument.objectStyles.item("Pictures");
    //MEASUREMENTS
    var maxWidth = 467; //Maximum width of an image
    var maxHeight = 666; //Maximum Height of an image
    var colWidth = 468; //Width of the main columb (340pt) + maximum Tab (128pt)
    var maxTab = 0;
    var xTab;
    var xtTab;
    var minTWidth = 340; //any image with a width below this will have the maximum Tab (maxTab) applied.
    var PWidth; //Width of the Picture
    var PHeight;//Picture Height
    var myTotal;

  • Difference between CS3 and CS4 when placing images, percentage not kept

    There is some kind of difference between CS3 and CS4 when placing images. The images I've dealt with right now were vector images but it might apply to all kinds of images.
    When replacing an existing image, the CS4 behaviour is to let the image fill up the frame. In CS3 the percentage was set to 100% as default (the % you see when selecting the image, not the container).
    Also when replacing an impage in CS4, the "inner" image frame is kept, while in C3, the percentage was kept.
    Is there some kind of placement preferences / settings to let CS4 act the same wat as CS3 did, when placing an image?
    -- Andreas

    Yes, the behavior was changed in CS4 (and many users, like me, prefer the new system).
    If you click and drag a loaded image place cursor the entire image will be be scaled to fit the proportionally drawn frame -- a huge timesaver if you mostly place uncropped art. If you want 100% of the image at 100% scale, just click and release -- same as before, or as before you can pre-draw a frame and place into it and your image will come in cropped at 100% (unless you've changed the fitting options for the frame before placing).
    Peter

  • How can I import *just* the new images in a folder?

    Is there anyway to import only the images within a folder that aren't already in the library? This seems to be the default behavior in Lightroom and makes really good sense. If I add an image to a folder without doing so in Aperture, I'd really like to just import that new version into the library.
    Thanks,
    -Dave

    Yes, I knew that I could do this, but I was hoping for an automated method as I suspect that I will screw things up if I rely on doing everything manually.
    -Dave

  • Exporting Images to a folder on the hard drive

    I used to be able to export images to a selected folder on my hard-drive without having to identify the folder for every image.
    Now when I export I need to select the folder on my hard-drive for each image even thought I'm going to process 50+ images for that folder.
    What is wrong & how can i fix it?
    Can anyone help?
    I'm using Lightroom 5.

    Thanks for the quick reply.
    I just tried it again and it seems to be working....
    If it happens again, will use export with previous.
    I was exporting the normal way through the library but my sub-folder was on my hard-drive.
    ChrystiaC
    www.chrystiachudczak.com

  • How to save camera image in different folder (other than Camera Roll) in Ios?

    I am developing an App where I am taking pictures from the Camera but all the pictures get stored in the Gallery. I would like to store all the pictures taken in this app to be stored in a different folder so that when users view the pictures in the app, it should show only the pictures taken using the app. Currently, all the pictures of the Gallery are being displayed which I do not want.
    I want to create a folder, store camera pictures taken using the app in this folder then display all the images of the folder in the app.
    Any suggestions would be appreciated.
    Thanks in advance.

    Hi,
    try freshplanet/ANE-ImagePicker · GitHub.

  • Help!Importing images to existing folder in Aperture

    Hi everyone,
    I am currently try to use Aperture to organise my image files. I have a very large image library appoximatly 100GB, they are already been organised in different folder, and been backed up on the server. But because the library is taking up a huge amount of space on the machine, I moved my library onto a external HDD. However, after I have deleted all the images(not the folders), I will need to add more images into the folders on the machine, then add them into Aperture library. The problem I am having, is whenever I try to add the new images, Aperture will automaticlly create a folder for me with the same folder name again, rather than adding them into the exiting project. Is there a way to import new images to exiting project which I imported before without having Aperture creating new folders for me?
    The difficult part is because it is not going to be 3 or 4 images in one folder, but over 100000 images in different folders, how I can transfer the image without have to make any changes to the project in Aperture?
    Many thanks in advance!
    Ken

    Hi Celineken-
    If I understand you correctly, you have new images in a folder on a disk somewhere, and projects in your Aperture library with the same name as one or more folders on the disk. When you import the new images, Aperture is creating a new project with the name of the folder on the disk and importing the images there, instead of the already-existing project with the same in your library, is that right?
    If so, happily there is a simple solution for you: Open the Import Pane and navigate to the folder with the new images. Select the images you want to import, then click the Destination popup in the upper right of the screen, under the heading "Aperture Library". Change the Destination from New Project to the project of your choice. You can also save a step and just click the project from the Projects list on the left side of the Import Pane. Now, when you click the Import button, the photos will be imported into the project you specified.

  • How do i load images from a folder?

    Hello everyone,
    Please can someone help me as i am stuck.
    I am trying to research loading images from a folder called /images/unknown (unknown is a customer number and is stored in a variable called customerNo).
    I feel that i will need to load the images into an array then display them to the screen with a viewer.
    Can anybody help me.
    Thanks in advance

    Welcome to the Sun forums.
    irknappers wrote:
    ...Please can someone help me as i am stuck.You might want to be more exact in future, about what you are stuck on.
    import javax.imageio.ImageIO;
    import java.io.FileFilter;
    import java.io.File;
    import javax.swing.JFileChooser;
    class LoadImages {
        public static void main(String[] args) {
            String[] suffixes = ImageIO.getReaderFileSuffixes();
            FileFilter fileFilter = new FileFilterType(suffixes);
            File directory = null;
            if (args.length==1) {
                directory = new File( args[0] );
            } else {
                JFileChooser fileChooser = new JFileChooser();
                fileChooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY );
                int result = fileChooser.showOpenDialog( null );
                if ( result == JFileChooser.APPROVE_OPTION ) {
                    directory = fileChooser.getSelectedFile();
                } else {
                    System.err.println("Must select a directory to proceed, exiting.");
            File[] images = directory.listFiles( fileFilter );
            for (File file : images) {
                System.out.println(file);
            System.out.println( "The rest is left an exercise for the reader.  ;-)" );
    class FileFilterType implements FileFilter {
        String[] types;
        FileFilterType(String[] types) {
            this.types = types;
        public boolean accept(File file) {
            for (String type : types) {
                if ( file.getName().toLowerCase().endsWith( type.toLowerCase() ) ) {
                    return true;
            return false;
    }

Maybe you are looking for