Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

M-B-P

macrumors regular
Original poster
May 15, 2010
169
0
Hi,
I need help with a script that will allow me to add a pre-selected PDF to the end of an existing PDF file using PDFpen 5. The file PDF file that I need to add is a one page file, like a coversheet.

I'm new to applescript, but I tried to following code as a starting point:

tell application "PDFpen 5"

--The pre-defined file that I want to add.
set addThisPdfPath to "/Users/John/Desktop/One/16729224NEO.pdf"
set addThisPdf to POSIX path of addThisPdfPath

set originalDoc to document 1
set pageNum to 1
duplicate page pageNum of addThisPdf to end of pages of originalDoc

end tell

When I run this I get the following error:
error "PDFpen 5 got an error: Can’t make \"/\" into type specifier." number -1700 from "/" to specifier

I think the problem is pulling the pre-defined file from my desktop folder, any help with will appreciated.
 
Sorry, forgot to add screenshot
 

Attachments

  • Screen shot 2011-07-09 at 5.53.37 PM.png
    Screen shot 2011-07-09 at 5.53.37 PM.png
    68.6 KB · Views: 105
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.