1 Reply Latest reply on May 5, 2013 10:09 AM by Jump_Over

    Script to secure a PDF- "Variable not defined"-- Help! :(


      Hi! I'm hoping someone can help me with this problem..


      I am releasing a digital magazine online as a PDF and was looking for a way to secure it so it can't easily be distributed around. I found a script to run and have been trying to work with it but I keep getting this error message:


      "error "The variable acrobat is not defined." number -2753 from "acrobat" "


      I'm not sure if it is not working because I use the cloud based version of Indesign and Acrobat or if I am just running the script wrong? I also downloaded SDK's for each program. (I am new to this so I have been trying a bunch of things trying to get it to work)


      I use Adobe Indesign CS6 and Adobe Acrobat Pro XI


      This is the script I am trying to run in AppleScript Editor:



      tell application "Adobe InDesign CS6"

        -- prefs belong to app so use in tell app block

                tell PDF export preferences

                          set acrobat compatibility to acrobat

                          set use security to true

                          set disallow changing to true

                          set disallow copying to true

                          set disallow document assembly to true

                          set disallow extraction for accessibility to true

                          set disallow form fill in to true

                          set disallow notes to true

                          set disallow hi res printing to false

                          set color bitmap sampling DPI to 100

                          set grayscale bitmap sampling DPI to 100

                          set monochrome bitmap sampling DPI to 100

        --set image quality

                          set color bitmap quality to minimum

                          set grayscale bitmap quality to minimum

        --set fonts

                          set subset fonts below to 0

        --set security

                          set use security to true

                          set change security password to "editedit"

                          set disallow extraction for accessibility to false

                          set disallow copying to true

                end tell

        -- now deal with the doc

                tell active document

                          set docName to PDFTEST

                          set baseName to text item 1 of docName

                          set ASTID to AppleScript's text item delimiters

                          set AppleScript's text item delimiters to "."

                          set AppleScript's text item delimiters to ASTID

        -- use flexible path to user desktop… path strings are HFS (colon delimited)

                          export format PDF type to "/Users/sp19301/Desktop/" & PDFTEST & ".pdf" without showing options

                end tell

      end tell





      If you have any suggestions on securing a PDF or what I am doing wrong with this script, I would appreciate it so much!!



      Thanks everyone