-
Notifications
You must be signed in to change notification settings - Fork 120
Support images, .NET 8.0 and added options #92
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
Conversation
…e a new package version
|
Also bumped the version to 1.4.0 and added manual test in Web App to verify that images are created (png and jpeg). A similar automated test as with Pdf (to check if a text inside the PDF is present) is not possible as it is an image. @webgio What do you think of the proposed changes? |
|
Added two unit tests based on existing Rotativa code that at least check for the image format. |
|
Added some useful option flags, moved Zoom to This is the last commit for this PR before the review. @webgio Could you review the code? |
webgio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works, thanks for the contribution!
| [InlineData("https://localhost:7059", "Asp.net 6")] | ||
| public void Contact_PDF(string url, string site) | ||
| //[InlineData("https://localhost:7059", "Asp.net 6")] | ||
| [InlineData("https://localhost:56246", "Asp.net 8")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
Created a fork as I needed to create images with wkhtmltoimage in .NET 8.
return new ViewAsPdf("MyPartialView", isPartialView = true);ViewAsImagebased on original Rotativa code;ViewAsPdf: use default ViewName, Model, ViewData and TempData properties instead of overriding them;MasterNameas it wasn't used;zoomparameter (as Add Zoom property #53 #54 has conflicts);