Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

AppleScript a SECURE PDF & Email It

Featured Replies

Hello,

I'm hoping someone can help me.

The goal: to AppleScript a SECURE PDF through Acrobat and have it automatically have the PDF attached in an email. I don't know AppleScript very well so I'm having trouble doing this myself.

I currently have an AppleScript that I got from either Apple's website or from this website (not sure which). It will automatically create a pdf, give me the option to name it, then it automatically creates a new email message in "Mail" and attaches the PDF. The script resides in my Library folder inside a folder named "PDF Services". That way when I print a document, there is a button in the print dialog box called "PDF". When I click it, my AppleScript (I named it "Email PDF") is right there for me to click. Then boom, it's done (the PDF is created and attached in a new email). It works beautifully, but it won't automatically SECURE the document. Someone has to go and manually do that.

Through Acrobat Distiller there is a way to set up a folder called "Watch" in your documents folder, then have an "In" folder and an "Out" folder inside of the "Watch" folder. You only have to do this one time. Then you go into Acrobat Distiller and set the security for the "Watch" folder (you only have to do this one time as well).

Once you've done that, when you go and "Print" a document from FileMaker (when the Print Dialog box appears) you see a list of choices (mine starts with "Copies & Pages"). If you click on that list, there is about 12 options. One of those options is "Output Options". Under "Output Options" I can check mark a box for "Save as File". Then I can choose "Format: Post Script". Choosing "Post Script" is what tells FileMaker to send the document through the "Watch" folder, then to the "In" folder, then spits it out into the "Out" folder. I'm sure Acrobat comes into play somewhere, but I never see it. I guess it goes through Acrobat Distiller. But, once it's gone through those folders, when it gets to the "Out" folder, the document is secure.

So my question is can someone script the Output Option (Format: Post Script) into my existing AppleScript (and have it work right)? smile.gif I already have the Watch folder, the In folder, and the Out folder so I don't need that.

Here is my current AppleScript...

on open these_items

try

set this_file to item 1 of these_items

tell application "Finder"

set the file_name to the name of this_file

set the parent_folder to (the container of this_file) as alias

end tell

tell application (path to frontmost application as string)

repeat

display dialog "Enter a name for file:" default answer file_name

set this_name to the text returned of the result

if this_name is not "" then exit repeat

end repeat

end tell

tell application "Finder"

set the name of this_file to this_name

set the target_file to (document file this_name of the parent_folder) as alias

end tell

tell application "Mail"

set the new_message to (make new ougoing message with properties {visible:true, content:" "})

tell the new_message

tell content

make new attachment with properties {file name: target_file} at before the first character

end tell

end tell

end tell

on error error_message number error_number

if the error_number is not -128 then

tell application (path to frontmost application as string) display dialog error_message buttons {"OK"} default button 1

end tell

else

tell application "Finder" to delete parent_folder

end if

end try

end open

Thanks to anyone who can help me!!!

Kristine

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.