Script to place the image folder to 100%, one image per page?

I'm looking for a script that can drop a folder of images in an ID doc to 100%, one page per image, with the name of the file image below. I tried various Board-contact scripts, but these scale images to fit the page. I need the images to be placed at 100%, so a customer can view them to their exact size.

Any help would be much appreciated. Thank you!

Try this,

var doc = app.activeDocument;
var w =doc.documentPreferences.pageWidth;
var h = doc.documentPreferences.pageHeight;
doc.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;
var _folder = Folder.selectDialog("Select a folder");
var _files = _folder.getFiles();

for(var i =0;i<_files.length;i++)
{
        if(_files[i] instanceof File)
        {
                var image = doc.pages.item(-1).place(_files[i]);
                var gb = image[0].parent.geometricBounds;
                var imageheight = gb[2] - gb[0];
                var imagewidth = gb[3] - gb[1];
                image[0].parent.geometricBounds = [(h-imageheight)/2,(w-imagewidth)/2,(h-imageheight)/2+imageheight,(w-imagewidth)/2+imagewidth];
                image[0].parent.fit(FitOptions.CONTENT_TO_FRAME)
                doc.pages.add(LocationOptions.AT_END);
            }
    }
doc.pages.item(-1).remove();

Kind regards

Cognet

Tags: InDesign

Similar Questions

  • How to run a script for all the images in a folder?

    How to run a script for all the images in a folder?

    You can assign your script to an action, then use processor by batch or image with the option apply to all subfolders.

  • I have a picture in the current folder that I can use to place the image on a page, but it is absent, if I try to hyperlink to it.  How to solve that?

    I use thimbnails which has a link to the expanded images.  I just loaded several file assets intothe images that I can then open and place the image on a page.  However, when I try to hyperlink to this image, the image is not listed in the assets.  Any ideas as to why and how to fix this?

    You should find the forum for any product it is and post your questions there.

    Here is a link to a page that provides links to all of the Adobe forums...

    The Forum links page: https://forums.adobe.com/welcome

  • Script to place an image in different sizes of paper!

    Script to place an image in documentdifferent sizes. Hello all, greetings to all. There is a possibility hereget a nice script that reposition an imageinserted in the document to make it encacheperfectly in sizedocument independent edges? With this feature, I'll be able to create severaltypes of frameworks, effects with mascaras etc... and sopower gives a nice streamlined in my work.

    Exemplo:

    1458482592 - YouTube video

    Please try this version.

    #target photoshop;
    app.bringToFront();
    
    main();
    function main(){
    if(!documents.length) return;
    try{
    var doc = app.activeDocument;
    app.displayDialogs = DialogModes.NO;
    var strtRulerUnits = app.preferences.rulerUnits;
    var strtTypeUnits = app.preferences.typeUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    app.preferences.typeUnits = TypeUnits.PIXELS;
    var aLay = doc.activeLayer;
    doc.activeLayer = aLay;
    if(aLay.isBackgroundLayer) return;
    if (aLay.kind == LayerKind.SMARTOBJECT){
    aLay.resize(100 ,100,AnchorPosition.MIDDLECENTER);
    }
    var docWidth = activeDocument.width.value;
    var docHeight = activeDocument.height.value;
    var LB = activeDocument.activeLayer.bounds;
    var LHeight = LB[3].value - LB[1].value;
    var LWidth = LB[2].value - LB[0].value;
    var percentageHeight = ((docHeight/LHeight)*100);
    var percentageWidth = ((docWidth/LWidth)*100);
    activeDocument.activeLayer.resize(percentageWidth,percentageHeight,AnchorPosition.MIDDLECENTER);
    align( 'AdRg');
    align( 'AdBt');
    }catch(e){
    }
    finally{
    app.preferences.rulerUnits = strtRulerUnits;
    app.preferences.typeUnits = strtTypeUnits;
    }
    };
    function align(method) {
    activeDocument.selection.selectAll();
       var desc = new ActionDescriptor();
               var ref = new ActionReference();
               ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
           desc.putReference( charIDToTypeID( "null" ), ref );
           desc.putEnumerated( charIDToTypeID( "Usng" ), charIDToTypeID( "ADSt" ), charIDToTypeID( method ) );
        try{
       executeAction( charIDToTypeID( "Algn" ), desc, DialogModes.NO );
       }catch(e){}
       activeDocument.selection.deselect();
    }; 
    
  • Manually PLACE the images and other files in illustrator

    I see a tutorial of computer graphics by Nigel French, in this tutorial, when the option to place Mr. Nigel used to import images or other illustrator Illustrator files don't auto not put images at the centre but asks where to place the images or how large an area to be covered by this image or file.

    I'm looking at this topic, but not found anything relating to this topic, I don't know if it comes to plugin or illustrator function/feature.

    I hope that you will answer me,

    Here are pictures of serious

    Place 2.JPGplace 3.JPG

    You mean that the 'Gun place' with the symbol "1/1" inside? ".

    This was added in Illustrator CS6 (16.2.1 creative cloud version). If you have a lower version, it isn't here.

  • Trying to place the Image in sheared framework

    Hi all

    I'm trying to place an image in a sheared environment (see screenshot).

    However, when you place the image, the image is sheared to match the image.

    Is it possible to place the photo, so it is level/square, but fills the sheared framework.

    Thank you!

    After you have placed the image, you can correct the sheer by selecting the content and adjusting to 0

  • Place the image into the picture box and culture

    How to place an image in a simple picture box so I can crop and create a link? I don't ' want a slide show.

    Hello

    In the menu file-> Place. Go to your image and click in your page of muse. This places the image in the Muse. By default, all images are placed in the context of the Image. Double click on the image to select the image, you will get the options of transformation, expand and collapse according to your requirement to adjust the image in the Image. Check out the video below to see what

    http://TV.Adobe.com/watch/learn-Adobe-Muse-CC/working-with-images-in-Muse/

    Hope this helps

  • HELP file, place the Image but will not go

    I converted a Word doc to html

    to be able to file, place images in blocks of text in CS4.

    When I file, place the image (was be a jpeg file), it placed, I turned and it reduces, but then it would not move.

    How to become mobile if I apply skin?

    If you place the image in the text block, so it is called inserted graphics and it doesn´t suppose to move around with the mouse more, it flows with the text.

    It s like a giant letter in your text.

    If you want to place your images in floating frames, Don t put them inside text blocks, drop them outside your page first, and then move them to the right places with the mouse or use X / coordinated in Control Panel.

    If you have need of your images still flows with the text, use the object anchor instead of inserted graphs...

  • What is the best way to place the image (with legend) in a book?

    I am preparing a model for an encyclopedia project, the encyclopedia will be in addition to 10000 pages, so what is the best way to place the images (Photos, graphic illustration,... etc) with a legend?

    The problem that when I change the text; the image does not move with it, and when I place it in the text, it is difficult to control text flow.

    Please help

    I think so, but it can be a little weird, if the position of the anchor is on the second page of a two page spread. Really, I jumped in to suggest the image and the legend of consolidation before anchoring.

  • [cs4] [js] place the images in a folder

    Hello, I'm sure it's pretty simple, but I can't wrap my head around it... How can 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 images all placed in the document.

    Thank you!

    place all the files in the folder selected on the 1st page of this document

    If (app.documents.length! = 0) {}
    myDoc var = app.activeDocument;
    myFolder var is Folder.selectDialog ("select a file");.
    If (myFolder! = null) {}
    myFiles var = myFolder.getFiles ();
    for (i = 0; i< myfiles.length;="" i++)="">
    try {}
    myDoc.pages [0] .place (myFiles [i]);
    }
    {} catch (MonErreur)
    }
    }
    }
    else {}
    Alert ("' Please open a document and try again.");
    }

  • How to make a script to resize the image to fit the exact framework?

    Good afternoon

    My friend works on a task to do several images to adapt to the size of the image 500 x 700 px.

    We are working on this script, if she sometimes makes the height above 700 px.

    Can anyone help to change?

    ___

    doc = app.activeDocument;

    doc.changeMode (ChangeMode.RGB);

    var fWidth = 500;

    var fHeight = 700;

    If (doc.width > fWidth, 'px') {}

    doc.resizeImage (UnitValue(fWidth,"px"), null, null, null, ResampleMethod.BICUBIC);

    }

    else {}

    doc.resizeImage (null, UnitValue(fHeight,"px"), null, null, ResampleMethod.BICUBIC);

    }

    ___

    The thing is the need of the image to have a ratio of 5:7 to fit 500px 700px area.  An image can have a width and height of any number of pixels. All a camera will have a width and a height greater than the 700px. If your script above would create a very distorted portraits bouquet close

    Download the package of my action craft he has a script that I wrote for use in actions that make it very easy to do what you want.

    Scripts can be used in actions and actions can be used in scripts.  Photoshop scripts can also be programmed as a Photoshop plug-in.  When a plug-in is saved in action the plug-in saves the setting you used in its dialog box in the action stage. When the Action is played.  The plug-in does not display the dialog instead, it will use the setting saved in step of the action.  No user interaction is required action may be batched.

    Most Photoshop users cannot write scripts, but it have no problem using scripts to write than others.  As Adobe Photomerge, Image Processor, image Fit etc...

    I wrote a plugin script using Adobe adapt design Image that will make the selection of image format while maintaining the orientation of the document.  So if you have a 4:3 camera and a collection of pictures of her you landscape of 4:3 and 3:4 Portraits.  If you use my plugin aspectratioselection script in action and a followed centered 3:2 aspect ration of a culture of image and batch as the action on your images you would be left with landscapes of 3:2 and 2:3 Portraits.  The three step action, that's all you need registration.

    menu stage 1 file > automation > AspectRatioSelection...  In his dialogue game 5 7 central rectangle replace feather selection 0

    menu step 2 Image > Crop

    menu step 3 file > Automate > Fit Image in its width and height 700 px value dialog box

    You wind upward with 700x500px landscapes and portraits of 500x700px.

    I have created at least six of the lately. I use to do slideshows for my various devices.   I put the images I want to use in a folder of image source on my desk and play action creates six slide shows is a slide in a slide show on my desktop folder. In six of the subfolders. The Action is all two steps. The first step is running a script that deletes the folder slide shows.  The second step is a step in Image Processor Pro plugin.  This process, the image source in the slide shows folder file, save six series of jpeg images, it's six subfolders. Galaxy tab display 16:10 sideshow 2560 x 1600 and also as a 3:2 slideshow 2400 x 1600.  Surface Pro 3 sideshow 3.2 2160 x 1440, iPo4 4: slide show of 3:2 960 x 640, HDTV 1920 x 1080 and 4kTV 3840 x 2160. I take a coffee break... While the action runs.

    Package of shares of crafts UPDATE August 10, 2014 added conditional measures Action Palette tips.
    Contains

    Example of
    Download

  • Help place the images - why they appear to 150% and a bad image?

    Hello

    Relative newbie here.

    I have my display performace in InDesign too high. If I "place" an image or just simply slip it on the page, and little matter which image file format I use (tif, png, jpg, whatever), when placed, the images appear about 50% bigger than the source and low - ish quality. I have then to try to manually resize them so they look good on screen and when printed.

    • Why when I place images not appear 100%?
    • Is it possible to resize images other than striking handles resize and hoping for the best?

    Thank you very much.

    OK, if the balance indicates 100% with the direct Selection tool, that's what you have. Note that using the regular selection tool (the black arrow) will ALWAYS show 100% in the areas of scaling unless you have set your preferences to 'adjust scaling percentage', this is why you use the direct Selection tool to check. You can also select the image with the tool and look at the Info Palette. the real and effective ppi listed will be the same at 100%. What resolution is currently in the range of information?

    I asked vs click, click and drag because in CS4 when you drag an image is still growing the image to fit. That's not true in CS3.

    Screenshots are generally 72 ppi to size, they are captured. 72 DPI is low for most of the printed work, but no one expects very much in terms of quality for screenshots. You really place, right, is not dragging from Photoshop in ID, which is the equivalent of collage? Paste a picture gives you only the preview screen in CS3. I'm not sure you will see a difference with a screenshot, however, since the preview will be also 72 dpi.

    If the image is really too large on the page you can evolve in ID now the Ctrl + Shift keys while dragging a handle. You must press the keys before you click the mouse in Windows because there is a bug. You can also use the scale tool, or enter a new value of the scale in the areas of scaling. You can use actual dimensions in these areas if you include units, incidentally.

    In Photoshop, you can adapt the image using Image > Image size... If you uncheck the 'resample image' the resolutiuon will change inversely proportional to size, in order to reduce the size will increase the resolution, but there will be no difference in quality during the scaling in ID.

  • How to place the image (or widget) inline in a block of text.

    How is it possible to place an image (or some kind of widget, like presentation of slides) in a text, online in some position.

    I just have something similar to these compositions of widget library that come with an image in the upper left corner and the text is placed around it.

    I wonder if there is a function like any text editor ever.

    Thank you.

    Kind regards

    Ciro.

    You can have some elements as inline in a text. Simple copy or cut the item (or even several grouped items) with the black arrow, place the text cursor in the row you want the item and Paste it. It will be by default acting as a character in the line, but if you select it again with the black arrow, you can set the options in the Panel wrap to break the text up, above and below the item, or even to leave text floating to the left or the right of the element.

    You can try to paste more complex items or same set of widgets online, but I wouldn't shoot...

  • Place the image in the active document 'not as smart object"

    How can I place an image in the current document, but not as a smart object?

    var filePath = new File(decodeURI('~/Downloads/Safari_logo.png')),
        currentValue = getPlaceRasterSmartObjectValue();
    
    if (currentValue == true) {
        placeRasterSmartObject(false);
    }
    
    placeEmbedded(filePath); /* Place Image */
    
    placeRasterSmartObject(currentValue); /* Return the default value */
    
    function placeRasterSmartObject(__bool) {
        var desc1 = new ActionDescriptor();
        var ref1 = new ActionReference();
        ref1.putProperty(charIDToTypeID('Prpr'), charIDToTypeID('GnrP'));
        ref1.putEnumerated(charIDToTypeID('capp'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt'));
        desc1.putReference(charIDToTypeID('null'), ref1);
        var desc2 = new ActionDescriptor();
        desc2.putBoolean(stringIDToTypeID("placeRasterSmartObject"), __bool);
        desc1.putObject(charIDToTypeID('T   '), charIDToTypeID('GnrP'), desc2);
        executeAction(charIDToTypeID('setd'), desc1, DialogModes.NO);
    }
    
    function placeEmbedded(filePath) {
        var actDesc = new ActionDescriptor();
        actDesc.putPath(charIDToTypeID('null'), filePath);
        actDesc.putEnumerated(charIDToTypeID('FTcs'), charIDToTypeID('QCSt'), charIDToTypeID('Qcsa'));
        executeAction(charIDToTypeID('Plc '), actDesc, DialogModes.NO);
    }
    
    /* Update: Check current value */
    function getPlaceRasterSmartObjectValue() {
        var ref = new ActionReference();
        ref.putProperty(charIDToTypeID("Prpr"), charIDToTypeID("GnrP"));
        ref.putEnumerated(charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
        var psKey = executeActionGet(ref).getObjectValue(charIDToTypeID("GnrP")).getBoolean(stringIDToTypeID("placeRasterSmartObject"));
        return psKey
    }
    
  • Place the image of 2 x 2 inch (Resolution72) in a picture of 2 x 2 inch (resolution 300)

    When I place image of 2 x 2 inch (Resolution72) in a 2 x 2 inch (resolution 300), the image then low resolution image appears smaller why?


    low resolution image size effects? I'm confused


    image 2 x 2 inch (Resolution72)


    2x2 inch Resolution 72 .jpg


    image 2 x 2 inch (Resolution 300)

    2x2 inch Resolution 300.jpg

    When you place or paste and image in an another Photoshop want to preserve the quality of the original image.  This means that it will preserve the actual pixels for the image, that no scaling will be.  If you place a low image resolution in high resolution, it will be a small in the size of high resolution image.  If you place a high image resolution in a low resolution image, it will be very large in the low resolution image. All of this has to do with the actual pixels you have for the image.

    If you want to decrease the image quality during the operation of the site, you can use the transformation of the place of the image to scale of receiving documents.  The integrated smart object will be the pixels of the original image.

Maybe you are looking for

  • Can I get the IP address used by other devices for synchronization?

    One of my machines was stolen. I wanted to know if I could find it using the synchronized information. I hope that there is a way to determine the IP address, and then contact the owner of this IP block to see if they can help me more. Is this is pos

  • My acquisition of data NOR usb-6008, does not appear in labview after installing drivers

    My DAQ does not appear in my labview program after installing the drivers. I can't add it to my program or anything like that. I installed 3 different drivers and updates, and it's still not appearing in labview. Is there something I'm missing or nee

  • How to use a cursor to turn on or turn off the lights

    Hi guys. I'm quite familiar with Labview now, but can't seen to get my head around this problem. I have a slider that is numbered from 1 to 10. under the cursor, I inserted 10 LED lights. My sister in order to use the slider to turn off the lights an

  • hide the control

    Hello I have just a simple question. I never seem to find the answer to it. in my front panel, when I select a control, then right click to hide the control. How do I want to unhide it? Thank you in advance!

  • the returned parser 0xC00CE556 error

    my laptop is HP Vista and the hardware is compatible with vista. Original title: the parser returned error 0xC00CE556 keeps me using a HDwriter videcam although the hardware (camera Panasonic) seems to have downloaded ok... any help would be great...