PDFpen logo PDFpen logo

Help: AppleScript

PDFpen includes extensive AppleScript support so that it's possible to automate the PDF manipulation process.

Example scripts are included with the application. Click on the AppleScript icon applescript in the menubar to see the included scripts.

The first time you click the AppleScript icon, select Populate Scripts Menu to grant permission to copy the example scripts into the Application Scripts folder. Click on the AppleScript icon again to see and try the scripts.

PDFpen scripts are stored in: [HOME]/Library/Application Scripts/com.smileonmymac.PDFpen .

Combine PDFs
See Combine PDFs for more.

Cover Fax Header
Cover up the unwanted header of a fax. Choose the amount of space below the top of the page that needs to be covered in increments of 72nds of an inch. Note that the header is not erased, merely covered with an opaque white rectangle.

Export Form Data…
Export to view the data generated from a filled out form. Data is exported in .csv format, which can be changed by editing the AppleScript.

Imprint all Pages as First
Copy an imprint made on the first page of a document to all pages. Imprints are objects made with any markup to drawing tool. See Imprints for more.

Imprint all Pages with Image
Place an image on all pages of a document. Click this option and a window opens to let you locate and select the image on your computer.

Imprint all Pages with Text
Place a selection of text in the center of each page of a document, E.g. Draft.

Merge Every Other
Combine odd and even page numbered PDFs. See Combine PDFs for more.

Number Pages using Bates Numbering
Add page numbers using bates numbering. See Numbering Pages for more.

Number Pages
Add page numbers to your document. See Numbering Pages for more.

Remove All Imprints
Remove all imprint additions that you have made to a PDF. See Imprints for more.

Reverse Pages
Reverse the order of pages, so the last page is viewed first, and the first page is viewed last.

Split PDF
Divide a PDF, making each page a separate document.

Open Scripts Folder
To add new script, quickly access the folder where scripts are stored.

You may view the application AppleScript dictionary by dragging the PDFpen application onto the Script Editor icon.

You may view the source of any script by holding the Option key and choosing the script from the AppleScript menu.

If you create a script you'd like to share with other PDFpen customers, please let us know. You're welcome to send such scripts to support.

Automator Workflows (OS X 10.8 and later)

You can also place Automator workflows in the scripts folder. When selected, the frontmost PDF is the input for the Automator workflow. If you'd like the output to open in PDFpen, add a final Open Finder Items action set to Open with: Default Application, if PDFpen is your default PDF application, or set to Open with: PDFpen explicitly otherwise.

If you create a workflow you'd like to share with other PDFpen customers, let us know. Please send such workflows to support.


© 2003-2016 SmileOnMyMac, LLC dba Smile. All rights reserved.
PDFpen and PDFpenPro are registered trademarks of Smile. The Smile logo is a trademark of Smile.