Save to Pdf does not work from external triggers (php or run from server)
Using FM13, Mac and php
I have a script which saves the layout as a pdf, sets up an email, attaches the pdf and sends via smpt.
It works just fine when triggered inside Filemaker 13 e.g. 'run script'
HOWEVER: we are calling the script through a web page
$recid = $Customerprofile->getRecordId();
$editCommand = $this->fmDb->newEditCommand('Customerprofile', $recid);
$result = $editCommand->execute();
The script is triggered OK and everything works EXCEPT it will not save the pdf file so nothing gets attached to the email.
Note: If there is a file of the right name in the location designated the file attachment to the email works OK
I have also trialled setting up the script to run externally on the server and this gives exactly the same results... the save to pdf does not work. I have used the script debugger on the perform on server script but it will not swap over to the script when it transfers to the server so I cannot see what error is happening with the save to PDF.
Obviously there is an issue on triggering this functionality from outside FM13 . I can find hints that it does not work and all the plugins I have checked out do not mention that they are addressing this specific issue.
i have considered doing work arounds but all field and layout scripts are triggered when they are 'active' which is no good when accessing the database through the server.
Does anyone know a work around or plug in that will allow us to get FM13 to save to PDF when triggered from outside of FM13?