2 Replies Latest reply on Mar 1, 2010 7:53 AM by dmtetard

    Automate pdf export

    dmtetard Level 1

      We're looking for a script that does this:

      - In indesign, export a file to pdf/x1.

      - Import this pdf into photoshop as CMYK (because this preserves overprints)

      (- eventually perform an action to this, like adding a watermark, something we can record ourselves)

      - Save this file as a new "smallest file size" pdf and open it in acrobat

      - Attach the file to an email attachment and close the pdf


      Where can i find someone to make this script? We want to pay for this.

      We are still working in adobe cs3. We work on macs but prefer javascript so it can be used on windows machines too.



        • 1. Re: Automate pdf export
          Kasyan Servetsky Level 5

          I can do this. However, I'm not sure about email attachment part. What e-mail program do you use?



          • 2. Re: Automate pdf export
            dmtetard Level 1

            Apple mail. But i don't think you need to script mail though, there's a function in acrobat "attach to email".

            Afbeelding 34.png


            Maybe this can be helpful: as a workarround for my own poor scripting capabilities I now use the following script, combined with Quickeys to attach it to email.

            It's edited from an existing script, and it took me a couple of hours.

            I could not manage to get the file being rasterized in photoshop, so the 'Smallest File Size' pdf is currently exported directly from indesign.


            var myDoc = app.activeDocument;
            var myFolderName = myDoc.filePath;
            //Apply a name to the PDF file based on the INDD file, but without the .indd extension
            var myDocumentName =  myDoc.name.slice (0, -5);
            var myFilePathDruk = myFolderName + "/" + myDocumentName + "_DRUK.pdf";
            var myFilePathVB = myFolderName + "/" + myDocumentName + "_VB.pdf";
            var myFileDruk = new File(myFilePathDruk);
            var myFileVB = new File(myFilePathVB);
            //Do not open the PDF Export dialog box. Set "false" to "true" if you want the dialog box.
            with(app.pdfExportPreferences){viewPDF = false;}
            myDoc.exportFile(ExportFormat.pdfType, myFileDruk, false, "MagazineAds_1v3_IND4");
            with(app.pdfExportPreferences){viewPDF = true;}
            myDoc.exportFile(ExportFormat.pdfType, myFileVB, false, "Smallest File Size");