title: Export active page to PDF (AppleScript + InDesign)
body: <p>I have an AppleScript that exports the active document in InDesign to a PDF on my desktop.</p>
  
  <pre><code>--this script exports all opened InDesign document as PDFs
  
  set my_destination to (path to desktop) as string
  
  tell application id "com.adobe.InDesign"
  activate
  --next line collects all current PDF export presets
  set my_pdf_export to get the name of every PDF export preset
  --next line makes you choose which preset to use for ALL opened InDesign documents
  set my_pdf_choice to (choose from list my_pdf_export) as string
  --loop starts here
  repeat with this_doc in (active document)
      --next line gets the name of the active InDesign document
      set doc_name to get name of this_doc
      --next 3 lines perform the actual PDF export
      tell this_doc
          export format PDF type to my_destination &amp; (characters 1 thru -6 of doc_name) &amp; ".pdf" using my_pdf_choice without showing options
      end tell
  end repeat
  end tell
  </code></pre>
  
  <p>The script prompts for a PDF preset selection before exporting.</p>
  
  <p>I'd like the script to export only the active page of the active document.</p>
  
  <p>I've tried a couple things like replacing "active document" with active page", however I am not too knowledgable about AppleScript.</p>
  
  <p>Any ideas?</p>