Could it be that the first time you run it and the PDF opens automatically you forgot to CLOSE the file? If the file is open, it is locked by the OS and FM 13 appears to object to overwriting it (a good thing).
Try closing the document first and they re-running the script.
The Get (TemporaryPath) avoids this problem as the path actually changes and the file does not try to "stomp" on the previous file.
I tried reproducing this myself on 10.9.x but it asks me if I want to replace the file. It is possible that 10.8.x behaves differently with respect to locking the file).
Message was edited by: deninger
Hmmm, thanks but no not that naive....
Ane the temp path only changes between sessions, not during...
Can you post the script—or at least the relevant steps?
Same problem here. We are on OS X 10.8-10.9 and save on an OS X server. Everything worked fine in FM12, but in FM13 it is exactly as you write, that it works a couple of times and then no longer. I have been checking permissions on the file server, thinking like deninger here that it happened only when someone tried to overwrite an old document with the same name, but that is not the case. Originally I thought that the users had forgotten to log on to the file server... but that is not the case.
One weird thing is that it happens to all users except me. The differences I can see is that 1) I log into the file server with full permissions, 2) I have full permissions in Filemaker and 3) I run Filemaker Advanced.
I tried to reproduce the error on my machine by using another Filemaker account with the same permissions as the others, as well as another log in to the file server with the same permissions, but I couldn't make it happen. I didn't think about Filemaker Advanced at this point.
We are getting quite desparate about this now, as it means all users need to restart a couple of times a day, which off course means they want to switch back to FM12.
jrenfrew, have you found a solution?
There is another known bug for which there is a solution. I believe most people here already did this, which is why they fail to get this save-as-pdf-bug, but that's my theory.
Anyway, after deleting the Adobe PDF plug-ins under Library -> Internet support, this bug DISAPPEARS for all my team members.
There is a 'known incompatibility' between some versions of the Adobe PDF plugin and FMP. This has been brought up before.
You should be able to update the PDF plugin to the latest version, I think its 11, and FMP should still work.
A 'known incompatibility' means someone said it and someone else corroborated it.