CS2 Collect for Output - Adobe Indesign

This is a discussion on CS2 Collect for Output - Adobe Indesign ; Hi scripters I am tring to create print package for my book. I have two or more chapaters in my book file, I want to create print package in each chapter name folder. Here I have started but I am ...

+ Reply to Thread
Results 1 to 5 of 5

CS2 Collect for Output

  1. Default CS2 Collect for Output

    Hi scripters

    I am tring to create print package for my book. I have two or more chapaters in my book file, I want to create print package in each chapter name folder. Here I have started but I am stuck,

    bb = app.books[0].bookContents;

    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract;

    var myFolder = Folder.selectDialog("Please select a folder");

    for (i = 0; i < bb.length; i++) { app.open(bb[i].fullName); app.activeDocument.packageForPrint (myFolder, true, true, true, true, true, true,true); app.activeDocument.close; }

    Kindly any one tell me how I can?

    thanks

    regards
    a r u l

  2. Default Re: CS2 Collect for Output

    Maybe what is a problem is the way you manage your package creation and closing the document.
    As you close the doc while incrementing from 0, the index of the next doc is always changing and the last index is not present anymore. So when the script try to reach this one it will fail.
    In this kind of cases, it's good to decrease from max to zero
    so you should have :
    for (i = bb.length-1; i >= 0; i--)
    etc.
    so when you close for example bb[26], bb[25] is still accessible.
    Hope it helps.
    Loic

  3. Default Re: CS2 Collect for Output

    Thanks Loic

    It works, but when I am collecting output files I want to create seprate folder for each chapters. Finallay I the folder structure will be like this

    Indesign book
    book1.indb
    ch01.indd
    ch02.indd

    Root Folder
    ch01 Folder
    ch01 package files
    ch02 Folder
    ch02 package files

    Thanks

    regards
    a r u l

  4. Default Re: CS2 Collect for Output

    Try this,
    I couldn't test it here
    var myFolder = Folder.selectDialog("Please select a folder");
    for (i = bb.length-1; i >=0 ; i--)
    {
    app.open(bb[i].fullName);
    var mychapterfolder = new Folder(myFolder.fullName + "/"+bb[i].name)
    mychapterfolder.create();
    app.activeDocument.packageForPrint (mychapterfolder, true, true, true, true, true, true,true);
    app.activeDocument.close;
    }
    Loic

  5. Default Re: CS2 Collect for Output

    Did you get something ?
    Loic

+ Reply to Thread