Rotativa icon indicating copy to clipboard operation
Rotativa copied to clipboard

Generating Pdf in a background job (without HttpContext or ControllerContext)

Open m-okhovat opened this issue 2 years ago • 1 comments

Hi, webgio. It looks like in order to building a pdf from a view it is mandatory to use the "BuildFile(ControllerContext context)" method which requires ControllerContext as an input argument. So what can we do when there is no HttpContext, for instance consider a scenario in which you are intended to generate some pdfs and email them to some clients in a background job (e.g. Hangfire)? Is there any workaround for it?

m-okhovat avatar Feb 20 '23 08:02 m-okhovat

Hi, were you able to find a solution to the problem, I have the same problem and I can't get it to work in any way from my background task.

KevinRo96 avatar Jul 30 '24 03:07 KevinRo96