TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Michael Margolius
NA
60
3.6k
How do I save a .net core view to PDF
Dec 31 2017 12:23 PM
I am trying to save a .net core view (cshtml) to PDF. I am using Rotativa.NetCore(1.0.4) When I call the routine from my view I get an error mesage.
I will appreciate any assistance on this.
TypeLoadException: Could not load type 'Microsoft.AspNetCore.Builder.CookieAuthenticationOptions' from assembly 'Microsoft.AspNetCore.Authentication.Cookies, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
The following NuGet packages are installed:
Microsoft.AspNetCore.All(2.0.3)
Microsoft.AspNetCore.Mvc(2.0.1)
Microsoft.Aspnetcore.Authentication.Cookies(2.0.1)
Rotativa.NetCore(1.0.4)
RotativaCore(2.1.1)
I have the following code in my Controller:
public IActionResult GetSign()
{
var sign = new List<Sign>
{
new Sign {Name = "Rami1", Company = "Rami",DateSigned=DateTime.Now},
new Sign {Name = "Rami2", Company = "Rami",DateSigned=DateTime.Now}
};
return View(sign);
}
public ActionResult GeneratePDF()
{
return new Rotativa.NetCore.ActionAsPdf("GetSign");
}
Reply
Answers (
1
)
print of a div in asp.net use javascript
Is it possible to update XML file, when it was accessing