• 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
Error 6 with exporting PDF from Keynote
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error 6 with exporting PDF from Keynote


  • Subject: Error 6 with exporting PDF from Keynote
  • From: Takaaki Naganoya <email@hidden>
  • Date: Tue, 10 Jan 2017 11:00:02 +0900

I met an “Error 6” with exporting PDF from Keynote.app. It seems an error related with the Sandbox function.

<AppleScript>
tell application "Keynote"
set dCount to count every document
end tell

if dCount = 0 then
display dialog “There is no Keynote document" with icon 0 with title "No Document Error"
return
end if

tell application "Keynote"
set aPath to file of document 1
end tell

set curPath to (current application's NSString's stringWithString:(POSIX path of aPath))'s lastPathComponent()'s stringByDeletingPathExtension()'s stringByAppendingString:".pdf"

set tmpPath to (path to desktop) as string
set outPath to tmpPath & (curPath as string)

tell application "Keynote"
set anOpt to {class:export options, export style:IndividualSlides, all stages:false, skipped slides:true, PDF image quality:Best}
export document 1 to file outPath as PDF with properties anOpt —> Error 6
end tell
</AppleScript>

The solution is “touch” command before export. This works fine.

<AppleScript>
do shell script "touch " & quoted form of POSIX path of outPath
tell application "Keynote"
set anOpt to {class:export options, export style:IndividualSlides, all stages:false, skipped slides:true, PDF image quality:Best}
export document 1 to file outPath as PDF with properties anOpt
end tell
</AppleScript>

--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/



 _______________________________________________
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

  • Follow-Ups:
    • Re: Error 6 with exporting PDF from Keynote
      • From: Takaaki Naganoya <email@hidden>
  • Prev by Date: Crazy Sierra TextEdit Saving Infects Keynote?
  • Next by Date: Re: Crazy Sierra TextEdit Saving Infects Keynote?
  • Previous by thread: Re: Crazy Sierra TextEdit Saving Infects Keynote?
  • Next by thread: Re: Error 6 with exporting PDF from Keynote
  • Index(es):
    • Date
    • Thread