Import options in InDesign CS2 using javascript???

Hi i need to place an .eps or .ai files in InDesign CS2 document.
While choosing "Import Options" while placing "Place PDF" dialog will be opened in which "Crop To" option will be there which has "Art" option..
I need to use this using Javascript...

You probably want to post this question in one of the Adobe
InDesign forums:
http://www.adobeforums.com/cgi-bin/webx/.3bbf275c/

Similar Messages

  • How to place a word document in a TextFrame with InDesign CS2 scripting (JavaScript)?

    I´m newbie with InDesign CS2 Scripting (JavaScript). I need some help to understand the way to place a Word document in an indesign template, using JavaScript(.jsx).
    Thank you for the help,
    Peter

    //PlaceTextFileInFrame.jsx
    //An InDesign CS3 JavaScript
    //Places a text file in a text frame.
    var myDocument = app.documents.add();
    //Set the measurement units to points.
    myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
    myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
    //Create a text frame.
    var myTextFrame = myDocument.pages.item(0).textFrames.add({geometricBounds:myGetBounds(myDocument, myDocument.pages.item(0))});
    //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.
    myTextFrame.place(File("/c/test.txt"));
    function myGetBounds(myDocument, myPage){
    var myPageWidth = myDocument.documentPreferences.pageWidth;
    var myPageHeight = myDocument.documentPreferences.pageHeight
    if(myPage.side == PageSideOptions.leftHand){
    var myX2 = myPage.marginPreferences.left;
    var myX1 = myPage.marginPreferences.right;
    else{
    var myX1 = myPage.marginPreferences.left;
    var myX2 = myPage.marginPreferences.right;
    var myY1 = myPage.marginPreferences.top;
    var myX2 = myPageWidth - myX2;
    var myY2 = myPageHeight - myPage.marginPreferences.bottom;
    return [myY1, myX1, myY2, myX2];

  • Getting errors while updating links in Indesign document using javascript

    Hi,
    We are updating the links in InDesign document using javascript. After running the script, we are getting the below errors in Adobe InDesign CC debug.
    When closing the document for first time we are getting the below mentioned errors,
    ASSERT 'fRefCount == 0' in c:\development\citius\source\components\database3\revisioneddatabase\SaLRICache.tpp at line 230 failed.
    Erased item list not empty at block delete time
    blockUID = 10486786 not freed
    Internal error: 904 items were leaked!
    After that we are opening the same document for second time, then we are getting the below mentioned errors,
    ASSERT 'ts_DBPubFile->PlacementUIDIsAvailable(uid)' in c:\development\citius\source\components\database3\revisioneddatabase\SaLRIUtils.tpp at line 195 failed.
    DB failed to create UID!
    ASSERT 'this->FindInIDRangeList(fLastCreatedBlockUID) >= 0' in c:\development\citius\source\components\database3\revisioneddatabase\SaLRICache.tpp at line 476 failed.
    ASSERT 'fLastCreatedBlockUID != kInvalidUID && fLastCreatedItemID != 0' in c:\development\citius\source\components\database3\revisioneddatabase\SaLRICache.tpp at line 467 failed.
    ASSERT '(SaLRIUtils<SnapshotID , SnapshotInfo>::ts_DB)->IsValidUID(itemUID)' in ..\..\..\source\components\database3\revisioneddatabase\SnapshotCache.cpp at line 55 failed.
    Please help us to solve this error in InDesign debug.
    Thanks,
    Vimala L

    You're probably better off raising this in the SDK forum.

  • How can I get back the "edit original" option in InDesign CS2?

    I am using InDesign CS2 version 4.0 on a new windows 7 pc.
    On my previous pc (windows xp) I could open an ID document, right click on an image, select "edit original" and it would open up in Photoshop for editing. Very handy.
    Now that option is just not there on the drop down. The pencil in the links menu and the option under the edit menu are both greyed out.I can't find any way of accessing the option which is really important for my workflow.
    Any help gratefully received.
    Thanks
    Sarah

    Opening the document on a different computer is a meaningless test for something like this.
    The link could well be present there and not on your computer.
    As for XP mode, the less I say about it the better.
    Bob

  • How to disable the print option in A. Reader (using JavaScript)

    I need be able to disable the print option from JavaScript code. I know that the print option can be disabled in the
    "File > Form preferences > PDF Security" option in the main menu but i need to do this from a script into the document (
    preferably using the JavaScript language).
    Thanks in advance!
    Dan

    HI!
    I have the same problem =)
    I have fixed this issue using the "app.fs.isFullScreen = true;" statement.
    Doing this you don't see toolbar anymore.
    You can use "hideToolbarButton" instruction and, maybe, you can obtain a more interesting result.
    Below there is a very interesting document:
    http://partners.adobe.com/public/developer/en/acrobat/sdk/5186AcroJS.pdf
    I'm sorry for my poor english :-)
    Bye,
    Roberto (from Italy)
    Ps= Do you know how I can obtain a list of required fields in a form?
    thank's!

  • Needed help in: how to import image in InDesign Server using Java Code

    New to InDesign Server.
    I am not been able to import image to document.
    I tried to import image using the sample snippets "PlaceTextFileInFrame.java".
    modified the line:
    String placefilepath = "C:\\placeFile.txt";
    to
    String placefilepath = "C:\\Image.jpg";
    myTextFrame.place(placefilepath);
    Is this the correct way to import image or there is another solution.
    1.The image gets imported but i am getting blur image(Zoomed image).
    2.The image gets imported to its original image width & height.
    3.I need to know how to set the image width & size.

    My Requirement is-- I ve to connect to msn search page in order retrieve the result set from msn search. The same code which I do pasted below is working for GOOGLE n YAHOO with minor changes.But not for MSN.., Can any one help me.
    I've pasted the code for msn..,
    import java.io.*;
    import java.net.*;
    public class File {
    public static void main(String[] args) throws IOException {
    Socket s = new Socket("search.live.com", 80);
    String query = "java";
    PrintStream p = new PrintStream(s.getOutputStream());
    p.print("GET /results.aspx?q=" + query);
    p.print("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0\r\n");
    p.print("Connection: close\r\n\r\n");
    InputStreamReader in = new InputStreamReader(s.getInputStream());
    BufferedReader buffer = new BufferedReader(in);
    String line;
    while ((line = buffer.readLine()) != null) {
    System.out.println(line);
    Edited by: Lijo_Java on Jul 13, 2008 9:03 PM

  • How to move the anchor object in indesign cs2 using js?

    i can able to move the normal textframe and other objects but cant do this for anchor objects.
    syntex:  anchorobject.move([x value,y value],undefined,true)
    how to move the anchor objects?
    thanks
    subha

    Could it be that the anchord object in question won't move because you have it set to keep within margins which is preventing the move you're requesting? I've certainly run into that.
    I've also run into the situation where the object model thinks the anchored object is in one place when it is actually in another because of that same keep within margins option. In this case, a move will apparently not work because the move is invisible, it being completely outside of the margins -- although that only applies to relative moves, I think.
    Dave

  • How to find the CMYK, RGB values for an RasterItem in illustrator CS2 using Javascript??

    Hi,
    I want to find the color space of an raster item. I can able to get its color space using
    app.activeDocument.rasterItems[0].imageColorSpace
    if i found it o be CMYK color space, i need to find its value to know which color is present in the document.
    Thanks in advance,
    Poovili

    People have asked that before & I don't actually know. It seems pretty likely it's in the SDK somewhere though. I'd try searching the API folder for phrases that might relate to this and then investigate.

  • Un Anchoring objects in Indesign CS2 Using Apple script

    Hi all,
    I need to Un achor the object. I have the script which will un anchor the Text Frames but in case of
    Rectangle i'm not able to unachor. My script will find out the Anchrored Text Frames and place its
    contents to its position and then delete the frames. I can find out the Anchored Rectangles but i
    cannot get its contents. Can anyone help me out to do this?
    Thanks,
    Jacintha

    Hi,
    I can select the page item ,If i ask for page items and its parent. but not getting its contents.
    -- aframe is text frames in document
    set Conts to paragraphs of page item i of aframe
    set contents of first insertion point of parent of page item i to Conts
    I need to get the contents of anchoring objects and place it in its position and then delete the anchoring object. Tried working on above code but not able to get its contents. Any solution?

  • Line numbers appearing with imported Word Doc - InDesign CS2

    For some reason I keep getting line numbers when I try to place a document from Word. I checked to see if Word had line numbering on..nope. I tried saving the file as a .txt and .rtf file and that doesn't help either. Any suggestions as to what I am doing wrong?
    Thanks all,
    ejo

    As it happens with standard text as well, it has nothing to do with the Word file.
    You probably re-defined your Basic Paragraph style to include paragraph numbers.

  • Scripting applications preferences in Indesign CS2

    Hey folks, I'm attempting to set the cmsSettings preferences (current color management system) in Adobe InDesign CS2 using javascript but my code is not working. The script goes something like this:
    #target InDesign
    app.ColorSetting.cmsSettings="MyColorSettings";
    This errors - ID says that it doesn't recognize the object called ColorSetting. Any assistance is appreciated.
    Will

    Check your documentation. The class name is ColorSettings; the property (name of the 'variable' inside a class) can have any name, such as "app.bob", "app.jack", or "app.colorSettings". It's sort of convention that these are written with lowercase, to let humans distinguish them easily from class names (which are, obviously, written using initial uppercase).

  • Rosetta and InDesign CS2

    Greetings,
    I have not updated my Adobe products in several years, something I used to do regularly.
    That said, InDesign CS2 using 10.6, on my son's two year-old white MacBook, results in sporadic rendering of type on the page until the page is clicked with the type tool.
    Does !0.6.1 fix this problem?
    I have not updated CS2 for because I print and bind my own low-volume manual series and the new versions don't do what the old did, for me. Now I am quite happy with Preview and Gimp as a photosop replacement but have not yet found anything quite as nice as CS2, with the Alap imposition plug-in.
    Thanks,
    Garrett Connelly

    Thanks,
    I was just hoping some Mac whiz would read this and a bell would ring to tune things up a bit. I've kept my old computer with OS 10.4.11 so I can run the older Photoshop versions and get the older style PDF files - something is nicer about them.
    As far as I'm concerned, Alap is good enough reason to switch to Quark, whenever my Mac no longer can do it. CS2 runs far faster on OS 10.5.8 than 10.4.11. Also, for me, the increase in printer speed means I will have a hard choice going to 10.6 because everything works so good on 10.5.8.
    People in every country on earth use my little manuals and I can't let them down.

  • How to call javascript using applescript in InDesign cs2 Mac

    Hi,
    I need to integrate javascript with my apple script??? how to use it???please help me...i need it immediately..........

    Hi Andrew,
    Here is an example for you – a snippet from my script:
    global myBridgeLabel
    -- function that runs on clicking the button in adobe script studio project
    on clicked theObject
    if name of theObject is "b1" then
    set processName to "Started working"
    set myBridgeLabel to "Red"
    set myLabel to 1
    else if name of theObject is "b2" then
    set processName to "Started doing this"
    set myBridgeLabel to "Green"
    set myLabel to 2
    else if name of theObject is "b3" then
    set processName to "Started doing that"
    set myBridgeLabel to "Yellow"
    set myLabel to 3
    else if name of theObject is "b4" then
    set processName to "Finished doing this"
    set myBridgeLabel to "Blue"
    set myLabel to 4
    else if name of theObject is "b5" then
    set processName to "Finished doing that"
    set myBridgeLabel to "Purple"
    set myLabel to 5
    end if
    tell application "Adobe InDesign CS2"
    set mydocument to active document
    set myDocumentPath to full name of mydocument
    set workerName to "Kasyan"
    tell metadata preferences of mydocument
    set theDate to current date
    set myWeekday to weekday of theDate as string
    set myDenNedeli to my convertWeekday(myWeekday)
    set myRecord to (processName & " – " & workerName & " – ") & myDenNedeli & " " & text 1 thru -4 of time string of theDate & " \r"
    set myHistory to get property namespace "http://ns.adobe.com/photoshop/1.0/" path "History"
    set property namespace "http://ns.adobe.com/photoshop/1.0/" path "History" value myHistory & myRecord
    end tell
    set myJavaScript to "var myLabel =\"" & myBridgeLabel & "\"; app.activate(); var bt = new BridgeTalk; bt.target = \"bridge\"; myScript = 'app.displayDialogs = \"none\"; var t = new Thumbnail (File (\"" & myDocumentPath & "\")); var mdata = t.metadata; mdata.namespace = \"http://ns.adobe.com/xap/1.0/\"; mdata.Label = \"' + myLabel + '\";'; bt.body = myScript; bt.send();"
    do script myJavaScript language javascript
    In this javascript I use pares of single and double quotes.
    The main java script – myJavaScript – (inside double quotes) contains another java script – myScript – (inside single quotes) which runs in Bridge via BridgeTalk.
    I also put variables from AppleScript into JavaScript by using two pares of double quotes – the outside pare I escape with slashes:
    set myBridgeLabel to "Red" -- a variable I defined in AppleScript
    set myJavaScript to "var myLabel =\"" & myBridgeLabel & "\"; app.activate();
    -- the contents of myBridgeLabel variable now becomes part of the JavaScript
    Kasyan

  • Call JavaScript from AppleScript using InDesign CS2

    Can this be done?
    The following script:
    tell application "Adobe InDesign CS2"
    tell active document
    do script "var thisNumber = 5;" language javascript
    end tell
    end tell
    results in the error:
    tell application "Adobe InDesign CS2"
    do script "var thisNumber = 5;" language javascript
    "Adobe InDesign CS2 got an error: \"var thisNumber = 5;\" doesnt understand the do script message."
    Why doesn't this work and what can I do to fix it?
    William

    On 4/12/08 5:41 AM, "Olav Kvern" <[email protected]> wrote:<br /><br />> These sorts of things are hard to see in AppleScript, because the dictionary<br />> browser(s) don't group methods with their parent objects. Sal Soghoian at<br />> Apple has long said that this needs fixing.<br /><br />And in fact it has been fixed -- it just needs app developers to write their<br />dictionaries appropriately. For a good example, have a look at the<br />dictionary of Script Debugger 4.5 -- you'll see classes listed with<br />elements, properties, and "Responds to". And none of that truncation ID's<br />dictionary is full of.<br /><br />-- <br />Shane Stanley <[email protected]><br />AppleScript Pro Florida, April 2009 <a href=http://scriptingmatters.com/aspro>

  • Importing .mov files to InDesign CS2

    I am trying to import a H.268 or Mpeg .mov files into InDesign CS2 and every time I select the file, I get the following message pop up:
    "Error: Cannot place this file. No filter found for requested operation"
    When I check the 'Interactive Options' the options such as 'Movie Option' or 'Sound Option' are graded out, so that I cannot select them.
    When I google the Error message, people posted articles saying that you had to set the PDF options, but I cannot find this. I have look at the general preferences section, but there is nothing for movies.  I also looked at the 'Configure Plugins' section, and 'Media.Framework' plugin is locked, but I am not sure what to do.
    Please help as I need to get this finished in the next 24 hours and cannot make this work!

    Please see above for what I have selected from the media panel.
    In terms of the 'PDF Interactive export dialog' I am not sure what you mean, could you please talk me through this?
    This is the instructions that I have been following http://helpx.adobe.com/indesign/using/dynamic-pdf-documents.html#create_interactive_docume nts_for_pdf
    However, where it says
    "Buttons And Media
    Select Include All to allow movies, sounds, and buttons to be interactive in the exported PDF file. Select Appearance Only to include the normal state of buttons and the video posters as static elements."
    I cannot seem to find this menu, the only one I can find is Buttons & Forms and when I open this all of the options are graded out.  Please see the screen grab below...

Maybe you are looking for