Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello,

I want to export Asp.Panel content(text, GridViews) with CSS to PDF from C#.NET. Now I am using iTextSharp and RenderControl with Asp.Panel, but CSS is not rendered in PDF. How can I solve this problem(with iTextSharp(if is possible) or in another way) ?

Thanks.
Posted
Updated 10-Jan-14 3:16am
v4
Comments
ZurdoDev 10-Jan-14 8:31am    
Use the improve question link to add relevant code and show us where it is going wrong.
Kees van Spelde 10-Jan-14 14:05pm    
If you can save the asp.panel to a file you can use a tool like wkHTMLtoPDF. Just search for it on Google.
Sergey Alexandrovich Kryukov 10-Jan-14 23:33pm    
CSS is not supposed to be rendered in PDF. This is you who needs to provide some mapping from HTML to PDF, using styles or whatever else. This problem is ambiguous, due to very different nature of HTML and PDF structure/rendering. There is no one-to-one correspondence.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900