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

Re: Error 6 with exporting PDF from Keynote


  • Subject: Re: Error 6 with exporting PDF from Keynote
  • From: Takaaki Naganoya <email@hidden>
  • Date: Tue, 10 Jan 2017 14:44:33 +0900

I forgot to describe the version. macOS Sierra, 10.12.3beta + Keynote 7.0.5.
It will be same with macOS 10.12.x, I think.

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

2017/01/10 11:00、Takaaki Naganoya <email@hidden>のメール:

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: Ray Robertson <email@hidden>
References: 
 >Error 6 with exporting PDF from Keynote (From: Takaaki Naganoya <email@hidden>)

  • Prev by Date: Re: Strange error -10810 when running applets
  • Next by Date: Re: Can Acrobat PDF's be saved as single pages via Applescript
  • Previous by thread: Error 6 with exporting PDF from Keynote
  • Next by thread: Re: Error 6 with exporting PDF from Keynote
  • Index(es):
    • Date
    • Thread