Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
m-okhovat opened this issue Feb 20, 2023 · 1 comment

Comments

@m-okhovat
Copy link

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?

@KevinRo96
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants