Rob Lauer
Rob Lauer

Reputation: 3171

Generate PDF in ASP.NET from Fully Rendered Page

Does anyone know of a component (open source or 3rd party) that would allow you to export a fully rendered HTML page to PDF in c#? We have a page that has its DOM modified with jquery but the methods we have tried (ABCpdf.NET, WebClient, etc) don't register any DOM changes from javascript in the PDF. We need to programmatically export that rendered HTML (post-jquery) to PDF on the fly.

Upvotes: 3

Views: 2810

Answers (3)

Chris Haas
Chris Haas

Reputation: 55427

I'm never tried is but there's an open source solution called wkhtmltopdf that renders a PDF from HTML/JavaScript/CSS using the WebKit engine. This post talks a little bit about using it. If it works I'd like to know because I've heard this request a couple of times here.

Upvotes: 0

splatto
splatto

Reputation: 3217

I was looking for something similar many months ago and as far as I can remember, it's not possible with any free third-party controls. There are paid ones available. The closest you can get is iTextSharp. It will allow you to export the contents of specific html tads and user controls but it's a bit of a pain to deal with

Upvotes: 1

Related Questions