Hi, I have an application that produces some pdf files on a server. With this application you can alter the original file with Indesign and when you save your work a pdf file is also created.
In the application you can preview this pdf file to check how it looks via an apple script. This works fine until you edit the original file and the pdf is re-stored on the file server. After that it is impossible to preview the pdf file again. It seems like finder no longer recognizes the path - but, if you open finder, navigates to the folder on the server where the pdf is stored, finder somehow refreshes itself and the preview function works again.
It is very annoying to have to open finder every time to refresh its content. Below is the actual applescript that runs to preview the pdf. The path is set earlier and there is no problem with the path, I get the pdf to launch at least once.
tell application "Finder"
open file "pathToPDF"
end tell
is there any workaround to avoid this problem. I have searched for a solution and have tried to “refresh” the finder with different scipts but nothing seems to work. One of these scripts was to create and directly delete a new folder in the same folder the pdf file is stored - but that did not do the trick.
I really hope someone has any suggestions for me, thanks!