The general idea is to take advantage of media queries in CSS to provide specific CSS for “print” that removes colors, headers, navigation, buttons and so on. The one I’ve been using recently is EVO HTML to PDF Converter, which lets me work directly with streams (also available via NuGet). Luckily, this is quite straightforward with HTML to PDF conversion tools. My ideal would be to build PDFs as I would regular web pages. Instead, I’d much rather work with HTML and CSS, and in particular, MVC and Razor as templating. I could use a tool like SQL Server Reporting Services, but to be honest the report building and styling of those tools is difficult to say the least. I work on quite a few line of business applications, and a common ask is for printable reports. Rendering ASP.NET content as PDF 4 February, 2014.
0 Comments
Leave a Reply. |