• 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: Wed, 11 Jan 2017 12:43:59 +0900

Ray,

Thank you for your confirmation. 

This issue is same with the other sandboxed applications, as you indicated.
Mail.app’s issue is very interesting. 

And…Word/Excel 2016 for Mac is sandboxed, too.
Does their export command have same problem and not solved yet?  Hm…….

Excel 2016 can access ~/Library/Application Scripts/com.microsoft.Excel/
Word 2016 can access ~/Library/Application Scripts/com.microsoft.Word/

My plan is …once export data from Word/Excel to above location, then move it to the other location (ex.Desktop).
How about it?

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


2017/01/10 22:27、Ray Robertson <email@hidden>のメール:

Takaaki,

I can only confirm that I get the same results under 10.12.3beta (and others report this under 10.12.2).

Your workaround (the “touch” shell script) succeeds for me as well. Or alternately you can use “open for access” to create a placeholder file before exporting.

I can also report that this workaround functions for Mail, allowing us to save attachments directly to locations other than Downloads.

I’m having mixed results in Word and Excel, and am still testing it there. Unfortunately, the above workaround will still be a problem for applications which do not support saving or exporting over existing files.

Thanks,

Ray

On Jan 10, 2017, at 12:44 AM, Takaaki Naganoya <email@hidden> wrote:

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

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