2 Replies Latest reply on Feb 16, 2016 6:40 AM by runew73276507

    Script which export two seperat PDF files from document with two pages AND changes filename on PDF number two

    runew73276507 Level 1

      OBS: InDesign CS3 script:


      I have a document with two pages but one filename!


      I need a script who


      1. Export the two pages as two seperate PDF file - so NOT a one PDF file with two pages but two PDF files

      2. The first PDF file shall have the same name as the document - for instance ESW110020216TC013.indd -> ESW110020216TC013.pdf

      3. The second PDF file shall have added one to the last number - so ESW110020216TC014.indd -> ESW110020216TC014.pdf


      Is it possible to fit into this script:


      var doc = app.activeDocument;  
      var _PDFfile = new File('\\\\testserver\\' + app.activeDocument.name.replace (/\.indd$/, '.pdf'));  
      var _PDFExportPreset = app.pdfExportPresets.item('MyPdfSetting');   
      if (_PDFExportPreset == null){  
         alert('PDF Export Presets not found');  
          app.pdfExportPreferences.pageRange = PageRange.ALL_PAGES;                      
          doc.exportFile(ExportFormat.pdfType, _PDFfile, false,_PDFExportPreset);