Has anyone done this before. I am having trouble understanding the example play provided.
Promise<InputStream> pdf = new ReportAsPDFJob(report).now();
InputStream pdfStream = await(pdf);
renderBinary(pdfStream);
I know how to make a job in play framework but using the pdf module in play how do you return an input stream.
The example is just something to show a long running process, and how it may be used with a Job. There is no ReportAsPDFJob object.
Secondly, the PDF module that is provided is used to render from a controller using a renderPDF method. This results in a Result being thrown, and not a Promise being created.
To get this to work, you should take a look at the PDF module and see how you could convert it to return a Promise, rather than throwing a Result.