Add an Image to the existing document

Hai

I'm new to Indesign JavaScript. I want to add an image to the existing indesign document. When I add an image to the page, it is placed above the text. But I need, when I add an image to x = 0, y = 0 if no text already there it should be placed after the image.is it possible?

Code:

myPage.place (myGraphicFile, [0,0]), where myPage = app.documents.item (0).pages.item (0); If any text in 0,0 TI should be placed after the image.

Thanks in advance

Hi Kumar

U just needs to assign textWrap to this image.

App.Selection [0].textWrapPreferences.textWrapType = TextWrapTypes.JUMP_OBJECT_TEXT_WRAP;
App.Selection [0].textWrapPreferences.textWrapOffset = ["1 p","0p","1 p", "0p"];

Tags: InDesign

Similar Questions

  • Can I insert image into the existing identity document and make the text flow around it?

    I now get text properly formatted in InDesign CS4.  Is it possible for me to add pictures to this already existing document and that the text automatically adjust to autour flow of these images comes to be inserted?

    Thank you

    Just use File > place command to add your photos. Edition > clear all before do you.

    After you have placed your images, select them using the Selection (black arrow) tool, choose window > text wrapping and text wrap. After that, the text flows around this image when you take on the top of the text.

  • How to add legend for all images in the indesign document using indesign javscript

    I want to add the legend for all images in the indesign document...

    It's my code... im being of error like:

    invalid parameter.

    capset(2) ();

    function capset()

    {

    var doc = app.activeDocument;

    var myPicture = doc.allGraphics;

    var f, i, myCaption;

    While (PIC = myPicture.pop ())

    {

    f = pic.geometricBounds;

    Add a frame to the parent of the image, which is a Page

    myCaption = pic.parent.textFrames.add ();

    define the position and size of the legend

    myCaption.geometricBounds = [[2], [1], [2] Go + 3 GB [3]];

    Add the contents of the placeholder

    myCaption.contents = "Caption";

    PIC.parent.groups.Add ([pic, myCaption]);

    }

    }

    Hello

    Runing a code with your doc that you note possible occurrences (groups, the elements anchored, locked, etc items)

    This presupposes to exclude grouped and docked:

    capset ();
    
    function capset()
    {
    var
      mDoc = app.activeDocument,
      // anchored or grouped items excluded
      myGraphics = mDoc.splineItems.everyItem().getElements(),
      picContainer, gb, myCaption;
    while(picContainer = myGraphics.pop() )
    {
      // exclude empty frames
      if (!picContainer.graphics.length) continue;
      gb= picContainer.geometricBounds;
      // add a frame to to picture's parent, which is a Page
      myCaption = picContainer.parent.textFrames.add ();
      // set position and size of the caption
      myCaption.geometricBounds = [gb[2], gb[1], gb[2]+3, gb[3]];
      // add placeholder contents
      myCaption.contents = "Caption";
      mDoc.groups.add ([picContainer, myCaption]);
      }
    }
    

    Jarek

  • HP Envy 5530: Scanner images of the original document splitting

    I'm scanning for the first time on the 5530 and the scanner has split an image into several parts, rather than an image analysis. It also seems to be able to identify other images on the source document and scan them as individual items. While this could be very useful sometimes, this isn't what I wanted to do.

    Hello

    From the HP Envy 5530 software click on scan a Document or Photo.

    Define the scan size as required.

    Click the Advanced Settings button and uncheck Auto framing, and then confirm the changes and restart the analysis.

    Please let me know any questions,

    Shlomi

  • How can I import tables to a different schema in the relational model existing... to add these tables in the existing model? PLSS help

    How can I import tables from a different schema in the relational model... to add these tables in the existing relational/logic model? PLSS help

    Notes; I already have a schema ready relational/logic model... and I need to add more tables to this relational/logic model

    can I import the same way like I did before?

    But even if I do the same how can I add it in the template? as the logic model has been designed...

    Help, please...

    Thank you

    To view the diagram of logic model in Bachman notation, you right-click on a blank area of the diagram and select the rating > Bachman Notation.

    David

  • I am trying to add an image to an existing PDF, however, I do not have an advanced editing toolbar.  Help, please!

    I am trying to add an image to an existing PDF, however, I do not have an advanced editing toolbar.  I watched every self help video and read several forums, but no address not having no not this toolbar.  Help, please!

    See: Adobe Acrobat X Pro * insert an image or an object

  • 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
    }
    
  • How to remove all the images in the open documents

    Hi, experts

    How this script works out all the images in the open documents?

    function re() {}

    var link, image, image;
    var openDocs = app.documents.
    var openDocsLen = openDocs.length;
    for (var d = 0; d < openDocsLen; d ++) {}
    currDoc = openDocs [d],
    Links = currDoc.links,.
    counter = 0;
    for (var i = links.length - 1; i > = 0; i--) {}
    If (links [i] == docs.links) {}
    try {}
    link = links [i];
    image = link.parent;
    Frame = image.parent;
    Frame.Remove ();
    counter ++;
    }
    {} catch (err)
    $.writeln (i + "-" + err);
    }
    }
    }
    }
    }

    respect of

    John

    Dear John,

    Try your code updated.

    Re();

    function re() {}

    var link, image, image;

    var openDocs = app.documents.

    var openDocsLen = openDocs.length;

    for (var d = 0; d)< opendocslen;="" d="">

    currDoc = openDocs [d],

    Links = currDoc.links,.

    counter = 0;

    for (var i = links.length - 1; I > = 0; i--) {}

    If (links [i] .hasOwnProperty ('relink')) {}

    try {}

    link = links [i];

    image = link.parent;

    Frame = image.parent;

    Frame.Remove ();

    counter ++;

    }

    {} catch (err)

    $.writeln (i + "-" + err);

    }

    }

    }

    }

    }

    Best regards,

    K.Velprakash.

  • How to add an image of the poster/splash for Captivate 6

    Hello

    I would like to add a poster/splash picture to my captivate movie.

    My output is HTML 5. I would like to connect the video in Robohelp and video open in a web browser.

    Before the movie starts the video image is white with a "play" button. Can I add an image?

    Thanks in advance for your help.

    Hi mvk66,

    Thanks for the post.

    Captivate 6, have an option to add an image at the beginning of the film.

    Please follow the steps below:

    1 Goto the Edit--> preferences.

    2. Select the project category--> start and end

    3 uncheck AutoPlay (if enabled)

    4 search for the image.

    5. After you have successfully added to the image, close the Preferences dialog box and publish them on HTML5.

    Hope it helps.

    Thank you

    Mini,

  • How to add png images in the document?

    Hi, I need to add images in the document. Currently I am placing them with the PlaceFileInFrame function. But this function creates links to the images. I could integrate this links later, but I would like to know how to add images (png, bmp,...) in order to document without making links. Also, I would like to know if it is possible to create links to images stored in the web (http, https)? Looks like the answer is 'no', but maybe I'm missing something. Thanks in advance!

    I guess that you are above InDesign CS4.

    After you have placed the image, you should incorporate it.

    You should do: ILinkResource::Embed

    Check ILinkResource::CanEmbed before you embed it.

    There are several ways to find the ILinkResource of pageItem UIDRef.

    Consider the following:

    Get the ILink for your UIDRef page element, and then find ILinkResource of ILink.

    Look at the ILinkManager, ILinkUtils.

    InDesign does not support file-based links. In other words, it doesn't support file:// model.

    However, InDesign offers extensibility to create an image of a document for the web link.

    To do this, you should have your custom link put in work.

    You can see CustomDataLink SDK samples to understand how to do this.

  • Add JS dropdown to the existing site?

    Hello

    The image below is a site that was designed by another company.  The owner wants me to start doing updates for her, and one thing he would like to is to add some kind of drop-down list in the main navigation elements (seen in green circle).

    Anyone have any ideas or suggestions on how I can do this in JS without messing up the design of the existing site?  One thing I don't like is that if you add the drop-down list, it kind of covers the large photos as if he dropped down this will cover this girl's face.  All the suggested ideas.

    Thanks, Guy deaf

    headers.jpg

    Certainly do in CSS.  It is already half started for you.  If you want a drop-down list there are a few things to keep in mind.  The top level of a menu drop-down should not go anywhere or go to an empty anchor tag "#".  Then, create your drop-down menu in the structure of the ul as:

    • toplevel
      • toplevel-sub-element
      • Sub item2

    This is a very simplistic example.  Then do you things in css like:

    UL ul {opacity: 0; visibility: hidden ;}}

    Li: hover > ul {opacity: 1; visibility: visible ;}}

    Once again, very simplistic.  Depending on the size of the text, I almost consider however a more sensitive menu design because this text is very small for click mobile.

  • [AI - CS4] How to add an art Council to existing document?

    Hi all

    can anyone suggest me the addition of a new work plan for existing document? I found no Palette of the artboard in CS4. But in CS5 it is given.

    Thank you

    D.A.

    The Panel to the artboard is new to AiCS5. In CS4, a new work plan can be added by doing one of the two:

    1. choose the work plan tool and click-and - drag in the area of canvas of the Illustrator document.

    2. choose the work plan tool, click on the button "New work plan" in the control panel. Then select the size you want in the list of presets of the artboard in the Control Panel, then in the area of the canvas that you want to add a new work plan.

    I hope this helps.

    Neeraj

  • Insert image into the existing "placeholder" [CS5] [JS]

    Hi all

    I have searched the Scripting guide but have found no clear answer to my problem (again...).

    I am currently using InDesign CS5 with JavaScript.

    I (attempt to) create a solution that will allow users to customize business cards by inserting an image in a document template.

    My proposed solution is:

    1. Include in the template, a rectangular frame
    2. When the user selects the image they would like to use in the card, insert the selected image in the rectangular frame

    My problem is to insert the image in a page in the template element. How is that possible? Literature primary refers to the creation of page elements, and I keep hitting error messages when you try to view existing page items!

    Thank you very much

    Ben

    Hi Ben,

    I think you expect to move the jpg or frame everything which, like you exepct, use the code below js.

    myDoc var = app.activeDocument;
    myFrame var = mydoc.rectangles [0];
    IMG = myframe.place (new File("~/Desktop/smile.jpg") var);

    If you want the frame moving rectangles do not change the line below or move the jpg pic change the simple app.select (img) .
    App.Select (MyFrame);
    App.Selection [0]. Move ([15.15]);

    Please return back this desire that you wait or not?

    THX

    csm_phil

  • OfficeJet 4650: Biased Image of the scanned document

    During the analysis of the image produced by the scan my documents is biased on the new page... a little as the document I wanted to analyze somehow go slightly twisted during the scanning process.   Y at - it a setting or fix I can do to help my scanned images is more aligned on the page?

    Hi @TalusHiker,

    Welcome to the HP Support forum.

    I understand that you use a printer all-in-one HP OfficeJet 4650 with a Windows Vista computer and analysis the scanned document is slightly asymmetrical. I would like to help with that.

    In order for me to propose a proper resolution, it can help to collect a little more information from you.

    You scan the automatic feeder (ADF) of Document, or the glass dish?

    The scan seem asymmetrical when you look at it on your computer, or when it is printed?

    Is the pages in a separate document or part of a book?

    I'll watch for your reply, so I can go into it for you. Just reply to your convenience.

    Thank you.

  • Windows Media Player-how add audio files to the existing selection

    Editing of existing playlist in Player 12 - great pain

    In previous versions of media player, I could drag a song to a windows explore Panel directly in a playlist. so adding media was a nod to a playlist. Now, you must open it in the game Panel, add media, and you MUST CREATE a NEW NAME FOR THE list of READING which is ABSURD! In other words you can not change the playlist, click SAVE, and the playlist that you work is registered. You should always create a NEW name. What I do is add a '1' to the old name, create the NEW name, and then I have to go back and remove the old list. Once again. It is ridiculously heavy. Can Microsoft fix this? Everyone is significant pain is?

    Original name? If you change an unregistered playlist, then it doesn't have a name yet. It is quite normal that you must enter a name when you click on save the list for the first time. The next time you save, you will not have to enter a name more (because then it's not playlist not registered).

Maybe you are looking for

  • virus notice

    may macbook air is OS 10.10.5 Yosemite, today I spent in review on safari, a pop - up page showed that I have a virus on my device and it took me sweep the device. and this page appeared: DOWNLOAD REQUIRED Please download the MacCleaner application t

  • create masks for marked particles

    Hello world I'm trying to creat masks for each marked by IMAQ label.vi particles. I did use IMAQ labeltoroi, get the return on investment for each particle, and do IMAQ roitomask 2. However, the images of these masks are related images. Do you know h

  • Missing file names

    I had a power surge on my pc (it is protected) the other day and when I turned on it, the names of files in all folders are missing.  If you click on or group select files, the names will be displayed, but are not retained if you click out of them. I

  • TCS in low quality streaming

    Hello I was wondering if there is an option to reduce the quality of a stream of data from the content server. I have the option three small / medium / large, a small nd uses 500 Kbps, I want to reduce it to 250 or 300. Is there a configuration I can

  • Storage of data on a Partition separate from my OS

    Is there an advantage to store its data in a form of separate operating system partition? I currently have 10 primary GB partition on my hard drive with my data, James