c# - How to convert a HTML Table in an MVC View to PDF file, ITextSharp -


i've been pointed in direction of itextsharp, when went download package nuget noticed called razortopdf discover unsolvable formatting issues due project no longer being supported.

after more research surprised find there wasn't worded question on so.

so guys, what's best way convert html page/table in mvc project pdf file?

what's best way convert html page/table in mvc project pdf file?

generally, print pdf web browser on client.

the thing is, relying on end-user perspective of view in case, you're relying on end-user rendering of view. it's step should removed particular equation entirely.

keep in mind there fundamental differences between how html page renders , how pdf renders. 2 aren't 100% interchangeable. pdf has static page size , elements placed absolutely, whereas html has dynamic sizes , elements placed in flow layout. there additional considerations such client-side dom manipulation may take place in view. "rendering" becomes browser-based activity, shouldn't need server-side.

instead of thinking of pdf step following rendering of view, think of view in , or itself, parallel other view. 1 requested action results in html view, requested action results in pdf "view". such, design pdf template how want , populate data (using itextsharp) before returning file contents client.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -