Creating PDF from WIX content using Velo

I am trying to use pdfmake as a replacement for pdfGeneratorAPI, creating a pdf in a backend jsw and then passing to the page code to display; I do not need to keep the pdf file. I don’t know how to take the pdfmake output and pass it back to the front end from the backend. Any chance you could provide a generic example of this step? Thanks in advance.