0

I want to save aspx page as pdf file like google chrome(like picture). how can i do this ?

save as PDF

Amedee Van Gasse
  • 7,280
  • 5
  • 55
  • 101
Can Çalışkan
  • 274
  • 3
  • 16

1 Answers1

-1

Chrome uses the open source wkhtmltopdf. If you're using mvc I would recomend rotativa, which wraps the calls to wkhtmltopdf giving you

return new ActionAsPdf("Index", new { name = "Giorgio" }) { FileName = "Test.pdf" };

if you're using vanilla asp.net you can post the raw html or a link back to the server and shell out to the wkhtmltopdf command line and generate a pdf. If you're sending a link back you'll have to handle authentication as the command line app will not automatically authenticate as your user.

Miniver Cheevy
  • 1,667
  • 2
  • 14
  • 20