Professional Web Applications Themes

converting a lot of ID files to pdfs - Adobe Indesign Windows

I have about 4 or 5 dozen ID files to individually convert to .pdfs. Is there a way to do this as one batch, instead of doing them one by one? I'm working on a Windows platform. Richard...

  1. #1

    Default converting a lot of ID files to pdfs

    I have about 4 or 5 dozen ID files to individually convert to .pdfs. Is
    there a way to do this as one batch, instead of doing them one by one? I'm
    working on a Windows platform.

    Richard


    Richard_R._Chalmers@adobeforums.com Guest

  2. #2

    Default Re: converting a lot of ID files to pdfs

    See this thread in the scripting forum for a script of Peter Kahrel which does do that:

    Peter Kahrel, "Batch Processing multiple ID doents to individual PDFs" #1, 3 Aug 2005 6:59 am </cgi-bin/webx?13.3bbb9903/0>

    Teus
    Teus_de_Jong@adobeforums.com Guest

  3. #3

    Default Re: converting a lot of ID files to pdfs

    Thanks. Now, how do I turn that into a script. I know how to load a script
    into ID but I don't know how to take what Peter wrote and make it something
    that can be loaded into ID as a script.

    Richard


    Richard_R._Chalmers@adobeforums.com Guest

  4. #4

    Default Re: converting a lot of ID files to pdfs

    Richard,

    Copy the script part to an editor. Fill in the right PDF preset on line 1 and the right folder on line 2. Next save it in the subfolder Presets\Scripts of the folder your ID program is in. Give it the extension .jsx (CS2) or .js (CS). The script will be in your script palette, ready to use.

    Teus
    Teus_de_Jong@adobeforums.com Guest

  5. #5

    Default Re: converting a lot of ID files to pdfs

    Didn't work.
    It got loaded into the script palette,but when I click on it nothing
    happens. I did change the extension to .js and the pdf preset and the
    folder.

    Richard


    Richard_R._Chalmers@adobeforums.com Guest

  6. #6

    Default Re: converting a lot of ID files to pdfs

    Would this:

    c:\_WEF\SpecSheets\_pdfs to Gab

    be a correct way to specify a folder?

    Richard


    Richard_R._Chalmers@adobeforums.com Guest

  7. #7

    Default Re: converting a lot of ID files to pdfs

    That should be

    '/c/_WEF/SpecSheets/_pdfs to Gab'

    Teus
    Teus_de_Jong@adobeforums.com Guest

  8. #8

    Default Re: converting a lot of ID files to pdfs

    Still doesn't work.

    Richard


    Richard_R._Chalmers@adobeforums.com Guest

  9. #9

    Default Re: converting a lot of ID files to pdfs

    Could you post your version of the script, so I can see what's wrong?

    Teus
    Teus_de_Jong@adobeforums.com Guest

  10. #10

    Default Re: converting a lot of ID files to pdfs

    myPreset = 'Print'
    dir = 'c:\_WEF\SpecSheets\_pdfs to Gab'
    alldocs = Folder( dir ).getFiles( '*.indd' );
    for( doc = 0 ; doc < alldocs.length ; doc++ )
    {
    app.open( alldocs[doc] )
    pdfFile = new File( alldocs[doc].path +'/' + stripExt( alldocs[doc].name ) +
    'pdf' )
    app.activeDoent.exportFile( ExportFormat.pdfType , pdfFile , false ,
    myPreset )
    app.activeDoent.close( )
    }

    function stripExt ( f )
    {
    return f.substring( 0 , f.length-4 )
    }


    Thanks for your help.
    Richard


    Richard_R._Chalmers@adobeforums.com Guest

  11. #11

    Default Re: converting a lot of ID files to pdfs

    This should work (if the directory C:\_WEF\SpreadSheets\_pdfs to Gab exists; please note that JavaScript is case sensitive):


    myPreset = 'Print';
    dir = '/c/_WEF/SpecSheets/_pdfs to Gab';
    alldocs = Folder(dir).getFiles('*.indd');
    for (doc = 0; doc < alldocs.length; doc++){

    app.open(alldocs[doc]);
    pdfFile = new File(alldocs[doc].path +'/' + stripExt(alldocs [doc].name) + 'pdf');
    app.activeDoent.exportFile(ExportFormat.pdfType , pdfFile, false, myPreset);
    app.activeDoent.close();
    }

    function stripExt (f){

    return f.substring(0 , f.length-4);
    }


    Teus
    Teus_de_Jong@adobeforums.com Guest

  12. #12

    Default Re: converting a lot of ID files to pdfs

    Nope. I wonder if I'm using it correctly. I click on it in the script box
    and nothing happens. What should happen?

    Richard


    Richard_R._Chalmers@adobeforums.com Guest

  13. #13

    Default Re: converting a lot of ID files to pdfs

    You should double click on it. Then the files will be one by one loaded, exported to pdf, and closed.

    Teus
    Teus_de_Jong@adobeforums.com Guest

  14. #14

    Default Re: converting a lot of ID files to pdfs

    Which files? The ones that are open? I tried opening more than one and it
    still did nothing. I'm using InDesign CS version 3.0.1 on Windows
    platform.

    Richard


    Richard_R._Chalmers@adobeforums.com Guest

  15. #15

    Default Re: converting a lot of ID files to pdfs

    No files have to be open. But just to see if the script is starting, double click on it (in the script palette) with the Shift key pressed. The Java debugger should open with the script loaded. To run the script from there, click on the button with the big red arrow.

    Teus
    Teus_de_Jong@adobeforums.com Guest

  16. #16

    Default Re: converting a lot of ID files to pdfs

    Yes, that does open the JavaScipt Debugger with the script loaded. However,
    when I click the button with the big red arrow, the JavaScript Debugger
    window simply closes.

    Richard


    Richard_R._Chalmers@adobeforums.com Guest

  17. #17

    Default Re: converting a lot of ID files to pdfs

    Now Shift double click to load the script. Step through it with the tird button from the right. After passing the line

    alldocs = Folder(dir).getFiles('*.indd');

    type 'alldocs.length' in the box below 'Console' and press on the arrow after this box. If alldocs.length is 0, there must be something wrong with the folder name in line 2 (check the name, realizinf that JavaScript is case sensitieve. The backslashes should in a 'normal' path should be slashes here; the drive should not be 'C:\', but '/c/').

    Teus
    Teus_de_Jong@adobeforums.com Guest

  18. #18

    Default Re: converting a lot of ID files to pdfs

    I did it and the result returned in the box below the Console line was
    Result: alldocs.length

    BTW your instructions are really clear. Thanks.

    Richard


    Richard_R._Chalmers@adobeforums.com Guest

  19. #19

    Default Re: converting a lot of ID files to pdfs



    I did it and the result returned in the box below the Console line was
    Result: alldocs.length




    I don't get this. The result should be a number (the number of docs, which is 0 if the directory is wrong) or 'undefined', but not the string alldocs.clear. Could you post your version again?

    Teus
    Teus_de_Jong@adobeforums.com Guest

  20. #20

    Default Re: converting a lot of ID files to pdfs

    myPreset = 'Print';
    dir = '/c/_WEF/SpecSheets/_pdfs to Gab';
    alldocs = Folder(dir).getFiles('*.indd');
    for (doc = 0; doc < alldocs.length; doc++){

    app.open(alldocs[doc]);
    pdfFile = new File(alldocs[doc].path +'/' + stripExt(alldocs [doc].name) +
    'pdf');
    app.activeDoent.exportFile(ExportFormat.pdfType , pdfFile, false,
    myPreset);
    app.activeDoent.close();
    }

    function stripExt (f){

    return f.substring(0 , f.length-4);
    }


    Richard


    Richard_R._Chalmers@adobeforums.com Guest

Page 1 of 2 12 LastLast

Similar Threads

  1. Why does black come out gray in PDFs and EPS files
    By gorkface webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 4
    Last Post: April 26th, 06:25 PM
  2. Converting Outlook Email to PDFs
    By Mike Robinson in forum Adobe Acrobat Windows
    Replies: 1
    Last Post: October 28th, 01:45 PM
  3. Converting multipage PDFs to TIFFs
    By Nigel_DeFreitas@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 7
    Last Post: August 20th, 08:30 AM
  4. PDFs will only open as embedded files
    By Myrna_Dobson@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 7
    Last Post: May 6th, 03:02 PM
  5. Converting PDFs to TIF
    By Vera_Hammill@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 6
    Last Post: May 5th, 05:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139