4 Replies Latest reply on Nov 24, 2008 4:06 PM by bret linford

    Applescript: trouble exporting pdf

    bret linford
      Hi, everyone.

      When I try to run this code:

      tell application "Adobe InDesign CS3"
      tell active document
      export format PDF type to "Macintosh HD:Users:blinford:Desktop:test.pdf" using PDF export preset "Press Quality" without showing options
      end tell
      end tell

      I get "Adobe InDesign CS3 goet an error: invalid value for parameter 'using' of event 'export'. Expected PDF export preset, but received nothing."

      Can't figure this one out. Any ideas? Thanks, in advance!
      --
      Bret
        • 1. Re: Applescript: trouble exporting pdf
          sstanleyau Level 4
          Use a reference to the preset :<br /><br />tell application "Adobe InDesign CS3"<br />set thePref to PDF export preset "Press Quality"<br />tell active document<br />export format PDF type to "Users:blinford:Desktop:test.pdf" using thePref<br />without showing options<br />end tell <br />end tell <br /><br />As your script stood, ID was looking for a preset belong to the active<br />document, which doesn't have PDF export presets.<br /><br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au><br />AppleScript Pro Florida, April 2009 <a href=http://scriptingmatters.com/aspro>
          • 2. Re: Applescript: trouble exporting pdf
            bret linford Level 1
            Thanks, very much, Shane.

            Worked perfectly.

            I'd like to put this pdf on an external server. I tried:

            export format PDF type to "Volumes:Hot_Folders:SWOP_Proof:test.pdf" using thePref without showing options

            But, I get an error that 'cannot find the folder "Volumes:Hot_Folders:SWOP_Proof:test.pdf"

            Thanks!
            • 3. Re: Applescript: trouble exporting pdf
              sstanleyau Level 4
              "Volumes:Hot_Folders:SWOP_Proof:test.pdf" is not a valid HFS+ path, unless<br />you have a volume called "Volumes" mounted. You probably want just<br />"Hot_Folders:SWOP_Proof:test.pdf".<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au><br />AppleScript Pro Florida, April 2009 <a href=http://scriptingmatters.com/aspro>
              • 4. Re: Applescript: trouble exporting pdf
                bret linford Level 1
                Perfect, again. Thanks very much, Shane!