1 Reply Latest reply on Apr 16, 2010 12:48 AM by sudar1983_14

    [JS:CS4] - How to Load the PrinterPreset in InDesign

    Adobe-InDesign CS4

      Dear All,


      I'm having the Printer Presets ".prst" in some where in the local machine, How to Load this preset in to Application though javascript.


      I can create the preset through :   preset.add() method. but I can't load from the user given or mentioned path itself.



      Please any one give me the solutions, then I will appreciate....


      Thanks & Regards

      T.R.Harihara Sudhan

        • 1. Re: [JS:CS4] - How to Load the PrinterPreset in InDesign

          Please find the following code, which will remove all the print presets before adding our preset to the application.


              //Removing all printerPresets from the application
              for(var pP=0; pP < app.printerPresets.length; pP++)
                  var myprintPreset = app.printerPresets.item(pP);
                  if (String(app.printerPresets.item(pP).name) != '[Default]')
              //Adding our preset to the application
              var printPreset;
              app.importFile(1918071916, printPreset);
              myprintPreset.printFile = File(aDoc.filePath+'/'+String(aDoc.name).substr(0, (String(aDoc.name).length-5))+'.ps');
              aDoc.print(false, myprintPreset);