Whenever I try to open an outpath.pdf
file that I create (like this) :
-- joining PDFs
do shell script quoted form of ("/System/Library/Automator/Combine PDF Pages.action/Contents/MacOS join") & space & "-o" & space & quoted form of outpath & space & quoted form of frontpdfpath & space & quoted form of temppdfpath & space & quoted form of backpdfpath
tell application "Preview"
activate
open outpath
end tell
I always get this error message:
The file “outpath.pdf” couldn’t be opened because you don’t have permission to view it. To view or change permissions, select the item in the Finder and choose File > Get Info.
Since this is a PDF that I create on the fly, it's not something that I can do permanently. I already changed the permissions of the folder containing the file and didn't help. Is there something else I can do?
The issue doesn't occur if I manually open the file at least once, close it and then run the script again. Any ideas on why this is happening? and how to fix it?
These are the permissions of the file:
set owner privileges to read write
for the created file somewhere, I guess the file privileges will be others than that at first opening.