export a panel to PDF in windows application
-
Tuesday, June 07, 2011 12:56 PM
I am working with windows application development and I have my custom report including panel, group box,label,ms chart,I can render my report to an image by creating graphics object from bitmap and then calling several draw methods of Graphics class.
Same way I was trying to render my report to PDF,is there any way that I can create MS graphics object for PDF page.Is there any support available for PDF docs.
Currently I am using VS2008 and framework 3.5.
- Moved by CoolDadTxMVP Tuesday, June 07, 2011 1:47 PM Winforms related (From:Visual C# IDE)
All Replies
-
Wednesday, June 08, 2011 3:46 AMModerator
Hi danny132,
To export your form/report to PDF, you can refer to Tutorials on creating PDF files using C# (.NET 2.0) on CodeProject. It's a tutorials about creating PDF files using C# (.NET 2.0) and iTextSharp.
And here is a thread discussed about Saving a scrollable panel as PDF using .NET
Also you can refer below links
1) http://www.codeproject.com/KB/showcase/TallComponents.aspx
2) http://www.mikesdotnetting.com/Article/80/Create-PDFs-in-ASP.NET-getting-started-with-iTextSharp
3) http://www.codedigest.com/Articles/ASPNET/344_Export_to_PDF_file_in_ASPNet-Gridview_to_PDF_ASPX_Page_Content_to_PDF.aspx
Here are some sites to get some C# beginner in this forum who searched to this thread to start with:
1) How to get a screen capture of your window
http://www.developerfusion.com/code/4630/capture-a-screen-shot/
2) How to save it to a file
http://www.onedotnetway.com/programmatically-take-screenshot-using-c/
3) How to Save a file to PDF
http://fci-h.blogspot.com/2008/03/save-as-pdf-using-c_06.html
Read through these and you should be able to cobble something together.
And also why don't you use crystal report, so that C# Crystal Report Export to PDF will be target at this.
Helen Zhou [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

- Marked As Answer by Helen ZhouModerator Monday, June 13, 2011 6:02 AM


