I'm trying to set up a cloud code function to produce and return a PDF file.
Ideally, the scenario is this:
- User requests a PDF file (function call made to cloud code function)
- cloud code returns PDF file to the user's browser.
I realise it's possible to create a PDF client-side. The reason for using cloud code is to avoid sending a lot of data (or perhaps confidential data) to the client-side code. And to avoid filling the client-side interface with elements of a multi-page PDF.
What is needed to get the basic documentation example here to work as a cloud function?
Thanks