1 Reply Latest reply on Sep 8, 2011 7:31 AM by jmituzas

    Specifying page range

    jmituzas Level 1

      Ok trying to merge some templates and scripts I have to one export an .indd file would like different options per page(s).

       

      Here's what I currently have, that I would like to change to specify pages 1-13:

       

      var myPageName, myFilePath, myFile;

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

      var myBaseName = myDocument.name;

      for(var myCounter = 0; myCounter < myDocument.pages.length; myCounter++){

      myPageName = myDocument.pages.item(myCounter).name;

      app.pdfExportPreferences.pageRange = myPageName;

       

      and also have export as:

       

      myFilePath = dirPath + docType + "/" + fileName;

      myFile = new File(myFilePath);

      myDocument.exportFile(ExportFormat.pdfType, myFile, false);

       

      Here's is another script, that I would like to change to specify pages 14-17:

       

      var myPageName, myFilePath, myFile;

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

      var myBaseName = myDocument.name;

      for(var myCounter = 0; myCounter < myDocument.pages.length; myCounter++){

      myPageName = myDocument.pages.item(myCounter).name;

      app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.exportRange;

      app.jpegExportPreferences.exportResolution = 96;

         app.jpegExportPreferences.pageString = myPageName; 

       

      and also have export as:

       

      myDocument.exportFile(ExportFormat.jpg, File(myFilePath), false);

       

      So how can I specify some pages to export as .pdf and some others to export as .jpg with a dpi. of 96?

       

      Thanks in advance,

      Joe