This is the source code I used for a YouTube tutorial I made a while ago, which shows how to render PDF files using HTML&CSS in ASP.NET Core, using the rotativa framework.
Check out the video here
You can run this project out of the box. The easiest way to to import this as a Web Application in Visual Studio.