• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: about PDFpenPro
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: about PDFpenPro


  • Subject: Re: about PDFpenPro
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 19 Mar 2017 18:03:01 -0500

Hey Yvan,

It turns out to be simple to create a one page blank document.  (Thanks to Jeff at Smile Software.)

So I have a reasonably organic working solution now.

--
Take Care,
Chris

------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2017/03/17 17:22
# dMod: 2017/03/19 15:54
# Appl: PDFpenPro
# Task: Create a new one page PDF document and save it to the Desktop (best).
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @PDFpenPro, @System_Events, @Create, @New, @Document, @Save, @Desktop
------------------------------------------------------------------------------

set savePath to (path to desktop as text) & "test.pdf"

------------------------------------------------------------------------------
# Uncomment if you want to prevent the script from overwriting ~/Desktop/test.pdf
------------------------------------------------------------------------------
# try
# alias savePath
# error "test.pdf already exists at that location!"
# on error e number n
# if n ≠ -43 then error e number n
# end try
------------------------------------------------------------------------------

touchFile(savePath) of me

tell application "PDFpenPro"
    activate
    
    set newDoc to make new document
    
    tell newDoc
        set newPage to make new page at beginning of pages
        save it in file savePath
    end tell
    
end tell

------------------------------------------------------------------------------
--» HANDLERS
------------------------------------------------------------------------------
on touchFile(filePath)
    try
        close access fileRef
    end try
    set fileRef to open for access filePath with write permission
    set eof of fileRef to 0
    close access fileRef
end touchFile
------------------------------------------------------------------------------


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: about PDFpenPro (From: Christopher Stone <email@hidden>)
 >Re: about PDFpenPro (From: Yvan KOENIG <email@hidden>)
 >Re: about PDFpenPro (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: strange difference in compilation of two Foundation classes in ASObjC
  • Next by Date: Re: strange difference in compilation of two Foundation classes in ASObjC
  • Previous by thread: Re: about PDFpenPro
  • Next by thread: AppleScript Application Self-Check for updates
  • Index(es):
    • Date
    • Thread