How to Email a PDF from Server

Discussion created by vfoecke on Jan 27, 2016
Latest reply on Jan 27, 2016 by jrenfrew

I have a script that works properly to email a client a PDF of a receipt for a just-completed sale.


Now, as I am working toward allowing clients onto the system via WebDirect, I'd like to tweak the receipt emailing script to run on the Server.

Unfortunately, the Save Records as PDF command won't run on the Server.


From an earlier thread, I think I can can why this is true:

As far as I knew it is because the server is lacking the layout rendering engine. Since it can't render any layout it can neither print a layout nor export a layout as a PDF.



Is there an elegant solution I'm not seeing?


I can imagine an ugly solution like:

- the WebDirect client completes the transaction

- I mark the receipt as needing to be emailed to the client's email address

- I create an OnTimer script on a non-server machine to periodically troll for receipts waiting to be emailed.

- When that script finds one, it generates the PDF and emails it as an attachment.


I just can't imagine that that is the best solution in the FileMaker toolbag.