Click here to Skip to main content
15,940,271 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an "aspx page" ,displaying the invoice bill for the product.I want to export this page into excel,pdf formats.can anyone give me a solution?
Updated 22-Mar-17 0:05am

You can convert the page into image and then make it pdf.
To make image you can take screenshot of your aspx page then convert it to pdf.

I have faced the same problem, But I solved in different way like that I drown the value in a fixed report image. I mean I taken a screen shot of report without value, then on runtime I drown my value pixel by pixel on the report image. So, you can use the idea..

thank you.

Rashed:: Bangladesh.
Share this answer
Share this answer
Member 8152251 13-Dec-12 6:10am    
I tried by using this.But got a error "
RegisterForEventValidation can only be called during Render();" from the line "this.Page.RenderControl(hw);" in the code.
Member 8152251 13-Dec-12 6:26am    
can u suggest a solution?
I think better use for the reporting helpers like crystal report or report viewer, its good, converting aspx page to pdf is not a good idea.

This link may help you

Export to PDF using itextsharp[^]
Share this answer

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