Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all 15932 articles
Browse latest View live

Change Page Numbers in Indexes

$
0
0

Hello,

 

I have a catalog and I have added two pages in the middle of the catalog. Now, because of this two page addition, I need to update the page numbers listed on the indexes with the new page numbers. I only need to increase each of the page numbers by two, but that only starts on a certain point. So, example, on one of the indexes I have, the page numbers 1-70 can remain the same, since the two extra pages were added AFTER page 70. But every number after 70 needs to increase by 2.

 

I have a find and replace script. I create a table in excel and drop into the document. The script then takes whatever word or number that is listed in Column A and replaces it with what is in Column B. I originally used this script to find and replace product codes in the catalog, and it worked great because all of the product codes were completely unique.

 

Trying to use this same script to change the page numbers, but it totally backfired. The issue is that the same number will reoccur later in the table, so the script has the table constantly replacing all of the numbers with the first two. So, here's a small sample of my table:

 

Col A      Col B

423         425

422         424

421         423

420         422

 

But when I run the script, here's what it will turn into:

 

Col A                            Col B

423 becomes 425         425

422 becomes 424         424

421 becomes 425         423 becomes 425

420 becomes 424         422 becomes 424

 

Because it changes the table, all of the corresponding numbers in the document will then change to 425 or 424.

 

Is there a way to make it so that the script does not change the information in the table that it uses as a reference?

 

Here is the script below. I did not write it (some very nice person on these forums did) and don't know anything about scripting.

 

the_table = app.selection[0].tables[0];
app.findChangeTextOptions = null;
with (app.findChangeTextOptions)
{
caseSensitive = true;
wholeWord = true;
}
app.findTextPreferences = null;
app.changeTextPreferences = null;
for (row=0; row<the_table.rows.length; row++)
{
   if (the_table.rows[row].cells[0].contents == '')
     continue;
   app.findTextPreferences.findWhat = the_table.rows[row].cells[0].contents;
   app.changeTextPreferences.changeTo = the_table.rows[row].cells[1].contents;
   app.activeDocument.changeText();
}

 

 

 

Thank so much!


add hyperlink by script

$
0
0

Hi,

Is it possible to add hyperlinks by javascript, so that they can be assigned later in the document? Let me explain my thoughts:

 

hyperlink.jpg

This screen shot shows a list of different docs (001 to 005) and the URL for the first document. I would like to make a hyperlink to all of them more automatically. Because the file is saved as 54K0504001.indd, I think it can be done.

What I should need:

1. a pop up with a question:"how many hyperlinks to make"

2. depending on the answer, creating the new hyperlinks in the panel with the full URL (if the answer is 2, I should get 2 hyperlinks, http://www.dekamer.be/FLWB/PDF/54/0504/54K0504001.pdf and http://www.dekamer.be/FLWB/PDF/54/0504/54K0504002.pdf

get swatches in dropdown list with color preview...

$
0
0

Hi experts,

 

I am creating one gui for swatches related automation task in CS4 using javascript. Is it possible to get swatches in dropdown list with its color preview? Same like colors in Swatches palette.

 

Your help will be much appreciated. Thanks in advance.

 

Thiyagu

script for running multiple find/change queries

$
0
0

Working on a large ID book document (*.indb), I have saved several dozens of Find/Change Queries (named "col01", "col02" etc.) that I run on "All documents". For a particular reason I have to run these queries several times a day.

 

So I was wondering whether there is, or whether anybody out there would write, a script that runs these queries one after the other. Given the size of the book, it might be necessary to provide for the script to pause after each query is run (before it goes on with the next), but I am just guessing.

 

Any help is much appreciated!

Disappearing links when importing snippet...

$
0
0

OK, so I have two snippets, both contain a Rectangle with an Image child.

 

In one of them, that is all I have.

In the other, the Rectangle is part of a group with another item.

 

After importing the snippet, I relink to fix the image paths.

 

On desktop, this works perfectly for both.

 

For IDS server;

1. The single, ungrouped, snippet gives me programmatic access to the link but then tells me the link doesn't exist after it has been relinked, so attempting to do link.update(); throws an error

2. The grouped snippet works perfectly as per desktop

 

So...

 

1. Does anybody have any workarounds?

2. Where can I report this bug?

 

G

object is undefined : why?

$
0
0

Hi all.

I'm working on a script to facilitate the creation and editing of books in InDesign. I'm not a programmer, and besides a few lines of code written by me, the script consists of code found and adapted to the purpose.

I have a problem related to two objects (left_box and right_box) : they appear to be undefined, therefore I can not operate on the elements that populate the listboxes that are contained in the objects themselves.

I have reviewed the code many times but I do not understand where I'm wrong.

Thanks in advance for any help.

 

This is the complete code :

 

#target indesign
#targetengine Main

// ============================== V A R I A B L E S =================================//
var theName, theFolder;
var right_arr = [];
var left_arr = [];
main_win();

// ============================== M A I N ===========================================//

// -------------------- Creation of main window -------------------------------------//

function main_win() {
var dialog_win = new Window ("palette", "Book creator / Book modificator");
    dialog_win.alignChildren = ["fill", "fill"];    var group_width =  450;    var group_length = 100;    var char_length = 45;    var pm_width = 200; // placemark    var pm_length = 300 // placemark    var group_group_1 = dialog_win.add("group");        group_group_1.alignChildren = ["fill", "fill"];        var step_group_1 = group_group_1.add("panel");            step_group_1.preferredSize = [Math.round(group_width / 2), group_length];            step_group_1.alignChildren = "fill";            var info_text_1 = step_group_1.add("statictext", undefined, "STEP 1\rSelect the option you are interested in, in order to activate its controls.\rWith no choice, only QUIT button is working.\r\r", {multiline: true});                info_text_1.alignment = "fill";                info_text_1.characters = Math.round(group_width / 20);            var radio_group = step_group_1.add("group");                radio_group.orientation = "column";                radio_group.alignChildren = "fill";                var radio1 = radio_group.add("radiobutton", undefined, " Create a new book");                var radio2 = radio_group.add("radiobutton", undefined, " Open a book to edit");        var step_group_2 = group_group_1.add("panel");            step_group_2.alignChildren = "left";            var info_text_2 = step_group_2.add("statictext", undefined, "STEP 2\r• Create a new book : first of all choose the destination folder, then type the desired name (max " + (char_length - 10) + " characters) without extension.\r• Open a book to edit : I think you don't need special instructions, right?.\r\r", {multiline: true});                info_text_2.alignment = "fill";                info_text_2.characters = Math.round(group_width / 8);            var button_group = step_group_2.add("group");                button_group.alignment = "center";                button_group.alignChildren = "fill";                var new_button = button_group.add("button", undefined, "Destination folder...");                var old_button = button_group.add("button", undefined, "Open a book...");                    new_button.enabled = false;                    old_button.enabled = false;            var dir_group = step_group_2.add("group");                dir_group.add('statictext {text: "Book folder :", justify: "right"}');                dir_group.alignChildren = "right";                var book_dir = dir_group.add("statictext", undefined, theFolder);                    book_dir.characters = char_length;            var name_group = step_group_2.add("group");                name_group.add('statictext {text: "Book name :", justify: "right"}');                dir_group.alignChildren = "right";                var book_name = name_group.add("edittext", undefined, theName);                    book_name.characters = char_length - 10;                    book_name.enabled = false;    var group_group_2 = dialog_win.add("group");        group_group_2.alignChildren = ["fill", "fill"];        var step_group_3 = group_group_2.add("panel");            step_group_3.preferredSize = [group_width, group_length * 4];            var group_a = step_group_3.add("group");                group_a.orientation = "row";                var info_text_3 = group_a.add("statictext", undefined, "STEP 3\r• The left side shows the contents of the book to which you can add or remove documents, and / or order them as you like.\r• The right side shows the documents that are available in the selected folder (if checkbox is selected, the search is also done in the subfolders). Any documents already in the book are not listed. This list is sorted alphabetically by default.\r\r", {multiline: true});                    info_text_3.alignment = ["left", "top"];                    info_text_3.characters = Math.round(group_width / 7);                var sub_group_a = group_a.add("group");                    sub_group_a.orientation = "column";                    sub_group_a.alignChildren = ["fill", "fill"];                    var list_button = sub_group_a.add("button", undefined, "Files to add...");                        list_button.enabled = false;                    var check_sub = sub_group_a.add("checkbox", undefined, "Search in sub-folders");                        check_sub.enabled = false;                        check_sub.value = false;            var group_b = step_group_3.add("group");                var button_group_LS = group_b.add("group");                    var move_group_LS = button_group_LS.add("group");                        move_group_LS.orientation = "column";                        move_group_LS.alignChildren = ["fill", "fill"];                        var move_up = move_group_LS.add("button", undefined, "Move up");                        var move_down = move_group_LS.add("button", undefined, "Move down");                        button_group_LS.children[0].enabled = false;                var list_group_LS = group_b.add("group");                    var left_box = add_left (list_group_LS, left_arr);                        left_box.preferredSize = [pm_width, pm_length];                        function add_left (left_case, left_arr) {                            var left_data = left_case.add("listbox", undefined, left_arr, {multiselect: true, showHeaders: true, columnTitles: [" > BOOK CONTENTS"]});                            return left_data;                        }                        list_group_LS.children[0].enabled = false;                var list_group_RS = group_b.add("group");                    var right_box = add_right (list_group_RS, right_arr);                        right_box.preferredSize = [pm_width, pm_length]                        function add_right (right_case, right_arr) {                            var right_data = right_case.add("listbox", undefined, right_arr, {multiselect: true, showHeaders: true, columnTitles: [" > AVAILABLE DOCUMENTS "]});                            return right_data;                        }                        list_group_RS.children[0].enabled = false;                var button_group_RS = group_b.add("group");                    var move_group_RS = button_group_RS.add("group");                        move_group_RS.orientation = "column";                        move_group_RS.alignChildren = ["fill", "fill"];                        var add_doc = move_group_RS.add("button", undefined, "Add to book");                        var remove_doc = move_group_RS.add("button", undefined, "Remove from book");                        button_group_RS.children[0].enabled = false;    var button_dialog = dialog_win.add("group");        button_dialog.alignment = "right";        var quit_button = button_dialog.add("button", undefined, "QUIT");        var doit_button = button_dialog.add("button", undefined, "DO IT");            doit_button.enabled = false;

// -------------------- Evaluate choices --------------------------------------------//

    // --- STEP 1 ---//    radio1.onClick = function() {        check_open();        new_button.enabled = true;        old_button.enabled = false;        new_button.active = true;    };    radio2.onClick = function() {        check_open();        new_button.enabled = false;        old_button.enabled = true;        old_button.active = true;    };    // --- STEP 2 ---//    new_button.onClick = function() {        book_name.text = "";        new_book = Folder.selectDialog ("Choose the destination folder for the new book...");        if (left_box.items.length > 0) {            left_arr = [];            upd_left(left_box);        }        if (new_book != null) {            book_dir.text = path_trim(new_book.fsName);        }        book_name.enabled = true;        book_name.active = true;        list_button.enabled = true;        check_sub.enabled = true;    };    book_name.onChanging = function() {        max_char = book_name.text;        if (max_char.length > book_name.characters) {            book_name.text = "";            book_name.textselection = max_char.slice(0, book_name.characters);        }    };    old_button.onClick = function() {        old_book = File.openDialog ("Select the book file to open...", let_me_see, true);        if (left_box.items.length > 0) {            left_arr = [];            upd_left(left_box);        }        if (old_book != null) {            book_dir.text = path_trim(old_book);            book_split(book_dir.text);            book_dir.text = the_folder;            book_name.text = the_name;        }        get_Docs(old_book);        clean(left_arr);        list_group_LS.remove(list_group_LS.children[0]);        left_box = add_left (list_group_LS, left_arr);        left_box.preferredSize = [pm_width, pm_length];        book_name.enabled = false;        list_button.enabled = true;        list_button.active = true;        check_sub.enabled = true;        dialog_win.layout.layout(true);    };    // --- STEP 3 ---//    list_button.onClick = function() {        var myFolder = Folder.selectDialog("Select a folder in which to search for documents...");        if (right_box.items.length > 0) {            right_arr = [];            upd_right(right_box);        }        check_folder(myFolder, check_sub.value);        right_arr.sort();                   // sorting the values of the array        right_arr = decodeURI(right_arr);   // replacing %20 with space        right_arr = right_arr.split(',');   // converting into array        var the_right_arr = right_arr.slice();            right_arr = [];            getFileName(the_right_arr);        list_group_RS.remove(list_group_RS.children[0]);        right_box = add_right (list_group_RS, right_arr);        right_box.preferredSize = [pm_width, pm_length];        list_group_LS.children[0].enabled = true;        list_group_RS.children[0].enabled = true;        button_group_LS.children[0].enabled = true;        button_group_RS.children[0].enabled = true;        doit_button.enabled = true;        dialog_win.layout.layout(true);    };    move_up.onClick = function () {        var n = left_box.selection.index;        if(n > 0) {            swap (left_box.items[n - 1], left_box.items[n]);            left_box.selection = n - 1;        }    }    move_down.onClick = function () {        var n = left_box.selection.index;        if (n < left_box.items.length - 1) {            swap (left_box.items[n], left_box.items[n + 1]);            left_box.selection = n + 1;        }    }    add_doc.onClick = function() {        // something ...    }    remove_doc.onClick = function() {        left_arr.splice(left_box.selection.index, 1);        upd_left(left_box);    }    // --- LAST STEP ---//    quit_button.onClick = function() {        dialog_win.close();    }    doit_button.onClick = function() {        if (book_name.text != "") {            check_book(new_book, book_name);        }        else {            alert("The book name is missing.");        }    };    check_open();    dialog_win.show ();
}

// ============================== F U N C T I O N S =================================//

// --- BEGINNIG ---//
    // -------------------- Check for open book files -----------------------------------//    function check_open() {        if (app.books.length != 0) {            var q = confirm("All book files must be closed before proceeding. If you press YES I will close them for you, otherwise press NO and close them manually.");            if (q == true) {                for (var x1 = 0; x1 < app.books.length; x1++) {                    var open = app.books[x1];                    open.close();                    radio1.checked = false;                    radio2.checked = false;            }            } else {                exit(0);            }        }    }

// --- STEP 2 NEW BOOK / OLD BOOK ---//
    // -------------------- Adapt directory text to max length of the static text ---//    function path_trim(path) {        var theFile = new File(path);        var pathTrim = ".../" + theFile.fsName.split("/").splice(0).join("/");        if ((pathTrim.length - 50) < 50) {            pathTrim = ".../" + theFile.fsName.split("/").splice(-3).join("/");        }        else if ((pathTrim.length - 50) > 50) {            pathTrim = ".../" + theFile.fsName.split("/").splice(-2).join("/");        }        return pathTrim;    }

// --- STEP 2 OLD - LEFT SIDE ---//
    // -------------------- Selection of what can be shown in dialog window ---------//    function let_me_see(bookPath){        if (bookPath.constructor.name == "Folder") {return true}        if (bookPath.name.slice(-5) == ".indb") {return true}            return false;    }    // -------------------- Extraction of the book name and its path ----------------//    function book_split(split_it) {        var the_path = new File(split_it);        var book_path = decodeURI(String(the_path));        //  the_name.text = book_path.pop(); // file name with extension            the_name = (book_path.split('/').pop().split('.'))[0];            the_folder = book_path.split("/").slice(0, -1).join("/");            while (the_folder.charAt(0)=='/') the_folder = the_folder.substring(1,the_folder.length);            return [the_name, the_folder];    }    // -------------------- Left list update ----------------------------------------//    function upd_left(left_data) {        left_data.removeAll();        var x2 = 0;        while (left_data.items.length < left_arr.length) {            left_data.add(left_arr[x2]);            x2++;        }    }    // -------------------- Extract document name from book -------------------------//    function get_Docs(doc) {        app.open(doc);        var book_ref = app.activeBook;        for (var x3 = 0; x3 < book_ref.bookContents.length; x3++){            left_arr += book_ref.bookContents[x3].name;        }        book_ref.close();        left_arr = left_arr.split('.indd'); // converting into array        return doc;    }

// --- STEP 3 RIGHT SIDE ---//
    // -------------------- Right list update ---------------------------------------//    function upd_right(right_data) {        right_data.removeAll();        var x5 = 0;        while (right_data.items.length < right_arr.length) {            right_data.add(right_arr[x5]);            x5++;        }    }    // -------------------- Files search through folders ----------------------------//    function check_folder(folder, sub_dir) {        var myFilesList = folder.getFiles();        for (var x6 = 0; x6 < myFilesList.length; x6++) {            var myList = myFilesList[x6];            if (myList instanceof File && myList.name.match(/\.indd$/i)) {                right_arr.push(myList);            }            else if (myList instanceof Folder) {                if (sub_dir == true) {                    check_folder(myList);                }            }        }        return folder;    }    // -------------------- Extract document name from folders list -----------------//    function getFileName(value) {        for (var x7 = 0; x7 < value.length; x7++){            var theFile = (value[x7].split('/').pop().split('.indd'))[0];                right_arr.push(theFile);        }        right_arr.sort();        return value;    }    // -------------------- Swap for move up and move down --------------------------//    function swap (x, y) {        var temp = x.text; x.text = y.text; y.text = temp;    }

// --- LAST STEP ---//
    // -------------------- Check existance -----------------------------------------//    function check_book(check_dir, check_name) {        var check_path = check_dir + "/" + check_name.text + ".indb";        if (File(check_path).exists == true) {            alert("A book with the same name already exists, please change the name.");        } else {        // something            alert("ALL DONE");        }    }

// ========== UTILIY ==========//
    // -------------------- Remove empty records ------------------------------------//    function clean(what) {        for(var i = what.length - 1; i >= 0; i--) {            if(what[i] == "") {               what.splice(i, 1);            }        }    }
// ========== THE END =========//

Catch the kerning value

$
0
0

Hi,

I,m trying to catch the kerning value above -100, but can't work this code. Kindly guide to me.

 

 

for(i=0; i<myPages.length; i++)

{

    var myTF = myPages[i].textFrames.everyItem().getElements();

        for(k=0; k<myTF.length; k++)

    {

        var myLines= myTF[k].lines.everyItem().getElements();

                for(l=0; l<myLines.length; l++)

        {

           var myWords = myLines[l].characters.everyItem().getElements();

           for(w=0; w<myWords.length; w++)

            {

     if(myWords[w].kerningValue <= -100)

                {

\\result in report

                    }

                }

            }

        }

    }

DataMerge to a pdf not in memory InDesign(cc2014) JavaScript

$
0
0

I am having an issue with the file merging in ram not to a pdf document.

 

When I am merging 20 thousand records having it merge in ram not only takes for ever it some times runs out of ram.

 

any ideas? This is my Current code.

 

              var jobNumber = prompt("what is your job number");

             // Setting the Folder to get the indesign and the Data File file from.

            var myTemplateFolder = Folder("~/Documents/hotfolder/template/");

            var myDataFolder = Folder ("~/Documents/hotfolder/data/");

            // Retrieving the Indesign FIle

            var myTemplates = myTemplateFolder.getFiles("*.indd");

            var myDataSet = myDataFolder.getFiles("*.csv");

            //Open the Template and Declare its value of myDocument

            var myDocument = app.open(File( myTemplates ));

            // Turning on the BackGround Layer For Proofing

            var myLayer = app.documents.item(0).layers.item("Background");

            myLayer.visible = false ;

            //Setting the data source to be merged    

            myDocument.dataMergeProperties.selectDataSource(File(myDataSet));

            // Merging the Records and creating the overset text document to make sure nothing is wrong with the file.     

            myDocument.dataMergeProperties.mergeRecords(File("~/Documents/hotfolder/output/"+ jobNumber+"-composedoverset.txt"));

            //close the unmerged document.     

            myDocument.close(SaveOptions.no);

            //Exporting the merged document as composed file

            app.activeDocument.exportFile(ExportFormat.pdfType, File("~/Documents/hotfolder/output/"+ jobNumber+"-composed.pdf"),false,"bandwPrinting");

            //Closing the merged document.

            

            app.activeDocument.close(SaveOptions.no);

         

            alert("Complete");


Document info from book panel

$
0
0

Hi all.

 

For my project I would need to read through javascript information of the documents contained in a book, in particular the status of the document. I did some research but could not find any useful reference.

Any help is welcome .

 

I attach a picture to clarify my request (text in Italian). Thanks in advance.

 

Image.png

event scripting issues

$
0
0

I am trying to get the following script working as a startup script.

 

the goal is that when the user chooses to save the document, they are presented with a dialog box asking for a quick summary of the edits that were made. Then this info is written to XMP fields.

 

The core functionality actually works, the dialog prompts and the data gets saved in the XMP.

 

The problem is that when the save action is initiated an error dialog pops up announcing "The requested action could not be completed because the object no longer exists." and then the script proceeds and functions properly, then it prompts for input and saves the data again.

 

I get an error, then the script runs twice.

 

I am confused.

 

 

 

#targetengine session

var myEventListener = app.addEventListener("beforeSave", myPromptForInput);

 

function myPromptForInput(myEvent){

var myTimeStamp = myEvent.timeStamp

var myDialog = app.dialogs.add({name:"Enter a simple description of edits made",canCancel:true});

with(myDialog){

//Add a dialog column.

with(dialogColumns.add()){

//Create a text edit field.

var myTextEditField = textEditboxes.add({editContents:"Description of document changes", minWidth:300});

//Display the dialog box.

var myResult = myDialog.show();

if(myResult == true){

//Get the values from the dialog box controls.

var myNotes = myTextEditField.editContents;

//Remove the dialog box from memory.

myDialog.destroy();

myAddXMPData(myNotes + " - " + myTimeStamp);

//alert(myEvent);

}

}

}

}

 

function myAddXMPData(myNotes){ 

//var myDocument = app.documents.item(0);

var myDocument = app.activeDocument;

with(myDocument.metadataPreferences){

author = "James Haney";

description = myNotes;

var myNewContainer = createContainerItem("http://ns.adobe.com/xap/1.0/", "LCCRevisionNotes");

setProperty("http://ns.adobe.com/xap/1.0/", "LCCRevisionNotes/*[1]", myNotes);

}

}

Face or shape detection?

$
0
0

I work with a magazine that prints mug shots of criminals. I get the mug shots of the people's faces, and I have tons of them to put on my layout. They are all different sizes, and right now I have to go through by hand and resize each one to fit it inside the image frame so that that face fills up the frame and is not cut off. Is there any type of script that could somehow detect the face or shape of the people and automatically size them to fit within the image box? If not, does anyone know an easier way for me to do this? It takes forever because I have hundreds to do.

 

Thanks!

dropdownlist used onchange of an another dropdownlist

$
0
0

Hi everyody,

 

I try to select my way by using two dropdownlist.

Each item on the first list change the second dropdownlist

 

example

 

List A                              List B               List C               List D  etc..

ItemA1  -> call ListB     ItemB1               ItemC1

ItemA2  -> call ListC     ItemB2               ItemC2

itemA3  -> call ListD     ItemB3               ItemC3

itemA4  -> call ListE     ItemB4               ItemC4              

 

I scripted like this :

 

var myList0= ["ItemA1", "ItemA2", "ItemA3", "ItemA4"];

var myListA = ["ItemB1", "ItemB2", "ItemB3", "ItemB4"];

var myListB = etc ....

 

var columns = myOption2.add("group");

var dimC = [0, 0, 100, 50];

var col1 = columns .add('dropdownlist', dimC , myList0);

col1.onChange = function()

{

     if (col1.selection == 0)

          {

               var col2 = columns .add('dropdownlist', dimC, myListA);

               return col2;

          }

     else if (col1.selection == 1)

          {

               var col2 = columns .add('dropdownlist', dimC, myListB);

          }

     etc ....

}

 

finally, it happens that my second dropdownlist overlap the first, and i want it separately.

 

Please, if anyone have an idea ?

 

best regards

 

Américo

Finding Unassigned Glyphs

$
0
0

If we import or enter a text code (e.g. a Katakana character )  for which a font has no Glyph, then Indesign will display an x'd rectangle.

 

Is it possible to find/scan for these with a script?

 

Thanks !

[JS] CS3 and later. Sort the Swatches alphabetically

$
0
0

Is there a way to sort the swatches, like I did for the paragraphStyles, characterStyles, and so on...?

There is no swatches[x].move(Location_option) in CS3 nor CS4 like paragraphStyles have.

Would CS5 have it?

Thanks, Alex.

JavaScript: changes from CS5.5 to CS6

$
0
0

Removed

Classes

FolioBindingDirectionOptions (enum)

FolioOrientationOptions (enum)

SmoothScrollingOptions (enum)

SpaceUnitType (enum)

VisibilityInPdf (enum)

Properties

Button.visibilityInPdf

DocumentPreference.masterTextFrame

DocumentPreset.masterTextFrame

EPubExportPreference.marginUnit

EPubExportPreference.spaceUnit

EPubExportPreference.format

EPubExportPreference.useTocStyle

EPubExportPreference.cssExportOption

EPubExportPreference.externalCSSPath

HTMLExportPreference.leftMargin

HTMLExportPreference.rightMargin

HTMLExportPreference.topMargin

HTMLExportPreference.bottomMargin

HTMLExportPreference.marginUnit

HTMLExportPreference.spaceUnit

HTMLExportPreference.externalCSSPath

HTMLExportPreference.linkToJavascript

HTMLExportPreference.javascriptURL

ObjectExportOption.customImageAlignment

ObjectExportOption.spaceUnit

PagesPanel.verticalView

StyleSheetExportOption.STYLE_NAME_ONLY

StyleSheetExportOption.EXTERNAL_CSS

Methods

Application.rasterizeDocumentPage()

Application.exportMiniFolio()

Application.exportFolioToPackage()

Application.exportFolioToDirectory()

Application.exportFolioToDirectoryPackage()

Application.getAllOverlays()

Application.createCustomMiniFolio()

Application.areFilePathsEquivalent()

Added

Classes

AutoSizingReferenceEnum (enum)

AutoSizingTypeEnum (enum)

CellStyleMapping

CellStyleMappings

CharStyleMapping

CharStyleMappings

CheckBox

CheckBoxes

ClearFormBehavior

ClearFormBehaviors

ComboBox

ComboBoxes

ContentPlacerObject

CustomLayoutTypeEnum (enum)

DimensionsConstraints (enum)

EpubVersion (enum)

FontLockingPreference

GuideTypeOptions (enum)

HtmlItem

HtmlItems

LayoutRuleOptions (enum)

LinkedPageItemOption

ListBox

ListBoxes

MapType (enum)

PNGColorSpaceEnum (enum)

PNGExportPreference

PNGExportRangeEnum (enum)

PNGQualityEnum (enum)

PageViewOptions (enum)

PaginationOption (enum)

ParaStyleMapping

ParaStyleMappings

PreviewPagesOptions (enum)

PrintFormBehavior

PrintFormBehaviors

RadioButton

RadioButtons

SignatureField

SignatureFields

SnapshotBlendingModes (enum)

StaticAlignmentOptions (enum)

SubmitFormBehavior

SubmitFormBehaviors

TableStyleMapping

TableStyleMappings

TextBox

TextBoxes

Properties

AlignDistributeBounds.KEY_OBJECT

Application.linkedPageItemOptions

Application.pngExportPreferences

Application.contentPlacer

Application.fontLockingPreferences

Application.paraStyleMappings

Application.charStyleMappings

Application.tableStyleMappings

Application.cellStyleMappings

Application.selectionKeyObject

Button.linkedPageItemOptions

Button.submitFormBehaviors

Button.clearFormBehaviors

Button.printFormBehaviors

Button.printableInPdf

Button.hiddenUntilTriggered

Button.horizontalLayoutConstraints

Button.verticalLayoutConstraints

Cell.checkBoxes

Cell.comboBoxes

Cell.listBoxes

Cell.radioButtons

Cell.textBoxes

Cell.signatureFields

ChangeGrepPreference.paragraphKashidaWidth

ChangeObjectPreference.autoSizingType

ChangeObjectPreference.autoSizingReferencePoint

ChangeObjectPreference.useMinimumHeightForAutoSizing

ChangeObjectPreference.minimumHeightForAutoSizing

ChangeObjectPreference.useMinimumWidthForAutoSizing

ChangeObjectPreference.minimumWidthForAutoSizing

ChangeObjectPreference.useNoLineBreaksForAutoSizing

ChangeTextPreference.paragraphKashidaWidth

Character.checkBoxes

Character.comboBoxes

Character.listBoxes

Character.radioButtons

Character.textBoxes

Character.signatureFields

Character.paragraphKashidaWidth

CoordinateSpaces.PAGE_COORDINATES

DiacriticPositionOptions.OPENTYPE_POSITION_FROM_BASELINE

Document.linkedPageItemOptions

Document.paraStyleMappings

Document.charStyleMappings

Document.tableStyleMappings

Document.cellStyleMappings

Document.checkBoxes

Document.comboBoxes

Document.listBoxes

Document.radioButtons

Document.textBoxes

Document.signatureFields

Document.selectionKeyObject

DocumentIntentOptions.DPS_INTENT

DocumentPreference.createPrimaryTextFrame

DocumentPreset.createPrimaryTextFrame

EPS.linkedPageItemOptions

EPS.horizontalLayoutConstraints

EPS.verticalLayoutConstraints

EPSText.linkedPageItemOptions

EPSText.horizontalLayoutConstraints

EPSText.verticalLayoutConstraints

EPubExportPreference.externalStyleSheets

EPubExportPreference.javascripts

EPubExportPreference.version

FindChangeTransliterateCharacterTypes.WESTERN_ARABIC_DIGITS

FindChangeTransliterateCharacterTypes.ARABIC_INDIC_DIGITS

FindChangeTransliterateCharacterTypes.FARSI_DIGITS

FindGrepPreference.paragraphKashidaWidth

FindObjectPreference.autoSizingType

FindObjectPreference.autoSizingReferencePoint

FindObjectPreference.useMinimumHeightForAutoSizing

FindObjectPreference.minimumHeightForAutoSizing

FindObjectPreference.useMinimumWidthForAutoSizing

FindObjectPreference.minimumWidthForAutoSizing

FindObjectPreference.useNoLineBreaksForAutoSizing

FindTextPreference.paragraphKashidaWidth

FormField.linkedPageItemOptions

FormField.horizontalLayoutConstraints

FormField.verticalLayoutConstraints

GeneralPreference.mainMonitorPpi

GeneralPreference.greekVectorGraphicsOnDrag

GeneralPreference.showConveyor

GeneralPreference.createLinksOnContentPlace

GeneralPreference.mapStylesOnContentPlace

GeneralPreference.useCustomMonitorResolution

GeneralPreference.customMonitorPpi

GeneralPreference.previewPages

Graphic.linkedPageItemOptions

Graphic.horizontalLayoutConstraints

Graphic.verticalLayoutConstraints

GraphicLine.linkedPageItemOptions

GraphicLine.htmlItems

GraphicLine.checkBoxes

GraphicLine.comboBoxes

GraphicLine.listBoxes

GraphicLine.radioButtons

GraphicLine.textBoxes

GraphicLine.signatureFields

GraphicLine.horizontalLayoutConstraints

GraphicLine.verticalLayoutConstraints

Group.linkedPageItemOptions

Group.checkBoxes

Group.comboBoxes

Group.listBoxes

Group.radioButtons

Group.textBoxes

Group.signatureFields

Group.horizontalLayoutConstraints

Group.verticalLayoutConstraints

Guide.guideType

Guide.guideZone

HTMLExportPreference.externalStyleSheets

HTMLExportPreference.javascripts

IMEPreference.useNativeDigits

Image.linkedPageItemOptions

Image.horizontalLayoutConstraints

Image.verticalLayoutConstraints

ImportedPage.linkedPageItemOptions

ImportedPage.horizontalLayoutConstraints

ImportedPage.verticalLayoutConstraints

InsertionPoint.checkBoxes

InsertionPoint.comboBoxes

InsertionPoint.listBoxes

InsertionPoint.radioButtons

InsertionPoint.textBoxes

InsertionPoint.signatureFields

InsertionPoint.paragraphKashidaWidth

InteractivePDFExportPreference.usePDFStructureForTabOrder

LanguageAndRegion.INDIC

Layer.checkBoxes

Layer.comboBoxes

Layer.listBoxes

Layer.radioButtons

Layer.textBoxes

Layer.signatureFields

LayoutWindow.selectionKeyObject

Line.checkBoxes

Line.comboBoxes

Line.listBoxes

Line.radioButtons

Line.textBoxes

Line.signatureFields

Line.paragraphKashidaWidth

LinkedStoryOption.applyStyleMappings

MasterSpread.checkBoxes

MasterSpread.comboBoxes

MasterSpread.listBoxes

MasterSpread.radioButtons

MasterSpread.textBoxes

MasterSpread.signatureFields

MasterSpread.primaryTextFrame

MediaItem.linkedPageItemOptions

MediaItem.horizontalLayoutConstraints

MediaItem.verticalLayoutConstraints

Movie.linkedPageItemOptions

Movie.horizontalLayoutConstraints

Movie.verticalLayoutConstraints

MultiStateObject.linkedPageItemOptions

MultiStateObject.horizontalLayoutConstraints

MultiStateObject.verticalLayoutConstraints

ObjectExportOption.customLayout

ObjectExportOption.customLayoutType

ObjectStyle.enableTextFrameAutoSizingOptions

Oval.linkedPageItemOptions

Oval.htmlItems

Oval.checkBoxes

Oval.comboBoxes

Oval.listBoxes

Oval.radioButtons

Oval.textBoxes

Oval.signatureFields

Oval.horizontalLayoutConstraints

Oval.verticalLayoutConstraints

PDF.linkedPageItemOptions

PDF.horizontalLayoutConstraints

PDF.verticalLayoutConstraints

PDFColorSpace.GRAY

PICT.linkedPageItemOptions

PICT.horizontalLayoutConstraints

PICT.verticalLayoutConstraints

Page.appliedAlternateLayout

Page.checkBoxes

Page.comboBoxes

Page.listBoxes

Page.radioButtons

Page.textBoxes

Page.signatureFields

Page.layoutRule

Page.snapshotBlendingMode

Page.optionalPage

PageItem.linkedPageItemOptions

PageItem.horizontalLayoutConstraints

PageItem.verticalLayoutConstraints

Paragraph.checkBoxes

Paragraph.comboBoxes

Paragraph.listBoxes

Paragraph.radioButtons

Paragraph.textBoxes

Paragraph.signatureFields

Paragraph.paragraphKashidaWidth

ParagraphJustificationOptions.NASKH_TATWEEL_JUSTIFICATION

ParagraphJustificationOptions.NASKH_KASHIDA_JUSTIFICATION

ParagraphJustificationOptions.NASKH_TATWEEL_JUSTIFICATION_FRAC

ParagraphJustificationOptions.NASKH_KASHIDA_JUSTIFICATION_FRAC

ParagraphStyle.paragraphKashidaWidth

PlaceGun.checkBoxes

PlaceGun.comboBoxes

PlaceGun.listBoxes

PlaceGun.radioButtons

PlaceGun.textBoxes

PlaceGun.signatureFields

Polygon.linkedPageItemOptions

Polygon.htmlItems

Polygon.checkBoxes

Polygon.comboBoxes

Polygon.listBoxes

Polygon.radioButtons

Polygon.textBoxes

Polygon.signatureFields

Polygon.horizontalLayoutConstraints

Polygon.verticalLayoutConstraints

Rectangle.linkedPageItemOptions

Rectangle.htmlItems

Rectangle.checkBoxes

Rectangle.comboBoxes

Rectangle.listBoxes

Rectangle.radioButtons

Rectangle.textBoxes

Rectangle.signatureFields

Rectangle.horizontalLayoutConstraints

Rectangle.verticalLayoutConstraints

Section.alternateLayoutLength

Section.alternateLayout

Section.pagination

Section.paginationMaster

SelectionOptions.SET_KEY

Snippet.checkBoxes

Snippet.comboBoxes

Snippet.listBoxes

Snippet.radioButtons

Snippet.textBoxes

Snippet.signatureFields

Sound.linkedPageItemOptions

Sound.horizontalLayoutConstraints

Sound.verticalLayoutConstraints

SplineItem.linkedPageItemOptions

SplineItem.htmlItems

SplineItem.checkBoxes

SplineItem.comboBoxes

SplineItem.listBoxes

SplineItem.radioButtons

SplineItem.textBoxes

SplineItem.signatureFields

SplineItem.horizontalLayoutConstraints

SplineItem.verticalLayoutConstraints

Spread.checkBoxes

Spread.comboBoxes

Spread.listBoxes

Spread.radioButtons

Spread.textBoxes

Spread.signatureFields

StateTypes.UP_ON

StateTypes.ROLLOVER_ON

StateTypes.DOWN_ON

StateTypes.UP_OFF

StateTypes.ROLLOVER_OFF

StateTypes.DOWN_OFF

StaticText.staticAlignment

Story.paraStyleMappings

Story.charStyleMappings

Story.tableStyleMappings

Story.cellStyleMappings

Story.checkBoxes

Story.comboBoxes

Story.listBoxes

Story.radioButtons

Story.textBoxes

Story.signatureFields

Story.paragraphKashidaWidth

StoryWindow.selectionKeyObject

StyleExportTagMap.splitDocument

Table.checkBoxes

Table.comboBoxes

Table.listBoxes

Table.radioButtons

Table.textBoxes

Table.signatureFields

TagTextExportCharacterSet.CENTRALEUROPEAN_ISO

TagTextExportCharacterSet.CYRILLIC_ISO

TagTextExportCharacterSet.GREEK_ISO

TagTextExportCharacterSet.WINDOWS_ARABIC

TagTextExportCharacterSet.WINDOWS_HEBREW

Text.checkBoxes

Text.comboBoxes

Text.listBoxes

Text.radioButtons

Text.textBoxes

Text.signatureFields

Text.paragraphKashidaWidth

TextColumn.checkBoxes

TextColumn.comboBoxes

TextColumn.listBoxes

TextColumn.radioButtons

TextColumn.textBoxes

TextColumn.signatureFields

TextColumn.paragraphKashidaWidth

TextDefault.paragraphKashidaWidth

TextFrame.objectExportOptions

TextFrame.linkedPageItemOptions

TextFrame.checkBoxes

TextFrame.comboBoxes

TextFrame.listBoxes

TextFrame.radioButtons

TextFrame.textBoxes

TextFrame.signatureFields

TextFrame.horizontalLayoutConstraints

TextFrame.verticalLayoutConstraints

TextFrameContents.PLACEHOLDER_TEXT_ARABIC

TextFrameContents.PLACEHOLDER_TEXT_HEBREW

TextFrameContents.PLACEHOLDER_TEXT_CYRILLIC

TextFrameContents.PLACEHOLDER_TEXT_GREEK

TextFramePreference.useFlexibleColumnWidth

TextFramePreference.textColumnMaxWidth

TextFramePreference.autoSizingType

TextFramePreference.autoSizingReferencePoint

TextFramePreference.useMinimumHeightForAutoSizing

TextFramePreference.minimumHeightForAutoSizing

TextFramePreference.useMinimumWidthForAutoSizing

TextFramePreference.minimumWidthForAutoSizing

TextFramePreference.useNoLineBreaksForAutoSizing

TextImportCharacterSet.MACINTOSH_GREEK_SHARED_CAPS

TextImportCharacterSet.MACINTOSH_ARABIC

TextImportCharacterSet.MACINTOSH_HEBREW

TextImportCharacterSet.WINDOWS_ARABIC

TextImportCharacterSet.WINDOWS_HEBREW

TextImportCharacterSet.ARABIC_ASMO

TextImportCharacterSet.ARABIC_ASMO_TRANSPARENT

TextPreference.quoteCharactersRotatedInVertical

TextStyleRange.checkBoxes

TextStyleRange.comboBoxes

TextStyleRange.listBoxes

TextStyleRange.radioButtons

TextStyleRange.textBoxes

TextStyleRange.signatureFields

TextStyleRange.paragraphKashidaWidth

WMF.linkedPageItemOptions

WMF.horizontalLayoutConstraints

WMF.verticalLayoutConstraints

Window.selectionKeyObject

Word.checkBoxes

Word.comboBoxes

Word.listBoxes

Word.radioButtons

Word.textBoxes

Word.signatureFields

Word.paragraphKashidaWidth

XmlStory.paraStyleMappings

XmlStory.charStyleMappings

XmlStory.tableStyleMappings

XmlStory.cellStyleMappings

XmlStory.checkBoxes

XmlStory.comboBoxes

XmlStory.listBoxes

XmlStory.radioButtons

XmlStory.textBoxes

XmlStory.signatureFields

XmlStory.paragraphKashidaWidth

Methods

Button.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

Document.createAlternateLayout(spreadItems,name,width,height,createTextStyles,linkTextStor ies,layoutRule)

Document.deleteAlternateLayout(name)

EPS.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

EPSText.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

FormField.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions ])

Graphic.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

GraphicLine.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptio ns])

Group.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

Guide.transformValuesOf(in)

Guide.resolve(location,in[,consideringRulerUnits])

Image.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

ImportedPage.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOpti ons])

Link.goToSource()

MasterSpread.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,placePoint] [,destinationLayer][,showingOptions])

MediaItem.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions ])

Movie.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

MultiStateObject.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showing Options])

Oval.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

PDF.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

PICT.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

Page.snapshotCurrentLayout()

Page.deleteLayoutSnapshot()

Page.deleteAllLayoutSnapshots()

Page.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,placePoint][,destin ationLayer][,showingOptions])

PageItem.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions] )

Polygon.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

Rectangle.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions ])

Sound.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

SplineItem.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOption s])

Spread.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,placePoint][,dest inationLayer][,showingOptions])

TextFrame.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions ])

WMF.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])

Changed methods

Application.dumpFromMemoryMark(Array of from)

Application.dumpBetweenMemoryMarks(Array of from,Array of to)

Button.extractLabel(key)

Document.align(alignDistributeItems,alignOption[,alignDistributeBounds][,reference])

Document.distribute(alignDistributeItems,distributeOption[,alignDistributeBounds][,useDist ributeMeasurement][,absoluteDistributeMeasurement][,reference])

EPS.extractLabel(key)

EPSText.extractLabel(key)

FormField.extractLabel(key)

Graphic.extractLabel(key)

GraphicLine.extractLabel(key)

Group.extractLabel(key)

Image.extractLabel(key)

ImportedPage.extractLabel(key)

MediaItem.extractLabel(key)

Movie.extractLabel(key)

MultiStateObject.extractLabel(key)

Oval.extractLabel(key)

PDF.extractLabel(key)

PICT.extractLabel(key)

PageItem.extractLabel(key)

Polygon.extractLabel(key)

Rectangle.extractLabel(key)

Sound.extractLabel(key)

SplineItem.extractLabel(key)

TextFrame.extractLabel(key)

WMF.extractLabel(key)


How can we get Auto Leading value

$
0
0

Hi All,

 

How can we get Paragraph, Line or Character's Auto Leading actual value using indesign javascript.

 

Thanks & Regards,

Senthilvel S

Get AUTO_PAGE_NUMBER value

$
0
0

Hi All,

 

How to get "AUTO_PAGE_NUMBER" value using indesign javascript.

 

Thanks & Regards,

Senthilvel S

[AS] How to test the presence of at least one table?

$
0
0

Hello everyone,

 

 

I would like to test for the presence of at least one table in a document before starting a process (on edge strokes). 

 

I found this, but I do not know if this is really effective:

                              setCountOfTables1tocountoftablesofeverystory

                              setCountOfTables2toeverytableofeverystory

 

The first gives me a list of the number of table in each story; the second gives me the objects reference of every table.

 

Is there another way?

 

TIA.

 

Oli.

Find Special Characters in Image Name

$
0
0

Hi All,

 

Request:

1. Need to find special characters or Junk Characters in Links name (i.e., Figure$.eps, abcd?cde.jpeg etc)

2. Links name allows only [a-z] or [A-Z] or [0-9]

3. Links name not allows special characters like (i.e., ?, !, @, $ etc...)

4. White Space also not allowed

 

Very Urgent Request...

 

Trying Code is:

 

var myLinks = app.documents[0].links.everyItem().getElements();
alert(myLinks.length)

for(i=0; i<myLinks.length; i++)
{    var mySplit = myLinks[i].name.split(".");    var myFinal = mySplit[0];       for(k=0; k<myFinal.length; k++)    {        if(String(myFinal[k]).match(/[a-z]/g) !=null || String(myFinal[k]).match(/[A-Z]/g) !=null || String(myFinal[k]).match(/[0-9]/) !=null )        {            alert(myFinal);            break;            }               }    }

 

Thanks in Advance

Siraj

JS CS4: restore window/application

$
0
0

This line hides InDesign:

 

app.windows[0].minimize();

 

But how do you get the app back? I've tried app.windows[0].restore(), .maximize(), bringToFront(), .bounds = [...]. And I've tried it with layoutWindows[0], layoutWindows[0].everyItem().etc(), but nothing seems to work.

 

Thanks,

 

Peter

Viewing all 15932 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>