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

viewaspdf does not inherit viewbag/viewdata #17

Open
dineshk007 opened this issue Mar 29, 2023 · 3 comments
Open

viewaspdf does not inherit viewbag/viewdata #17

dineshk007 opened this issue Mar 29, 2023 · 3 comments

Comments

@dineshk007
Copy link

In addition to passing the model, is it possible to add viewdata as well. It will make it easier to support both online an pdf implementation of the code + compatible with other rotativa implementations.

@arichika
Copy link
Owner

~ other rotativa implementations.

I have no understanding of its usage. Is there a code to refer to?

@dineshk007
Copy link
Author

In MVC5, we were using https://github.com/webgio/Rotativa
We were able to set properties in the viewbag and they were available in the view included with viewaspdf. We are switching to rotativacore as it seems to offer more than the mvc core version of webgio/rotativa,aspnetcore.
we found that webgio viewaspdf can handle viewdata, but rotativacore viewaspdf doesn't. To make it work, we would need to make changes to use model rather than viewbag.

thanks.

@arichika
Copy link
Owner

arichika commented Apr 6, 2023

@dineshk007
If so, then it would be best to use Rotativa's follow-on product. I don't know, I've never used it, but it is available at https://github.com/webgio/Rotativa.AspNetCore, etc.

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