Click here to Skip to main content
11,641,971 members (62,607 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET C#4.0
Hi all,

I have a web page which shows the reports of various parameters as a Chart.It is a daywise report.I have 20 charts in a single webpage.Now I want the screenshot of this report page and save it as a pdf dynamically from code behind.Can anyone help me on this by giving a solution or a sample application.

Posted 18-Apr-13 0:04am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2[^]

the above link is very useful.I used CaptureScreen() method from the above mentioned link and created image and passed that image to the following code which creates the screen shot

Bitmap bitmap = new Bitmap(CaptureScreen());
Graphics graphics = Graphics.FromImage(bitmap as System.Drawing.Image);
graphics.CopyFromScreen(0, 0, 0, 0, bitmap.Size);
bitmap.Save("c:\\screenshot.jpeg", ImageFormat.Jpeg);

It will create the image in the path mentioned.


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

  Print Answers RSS
0 Mika Wendelius 460
1 DamithSL 353
2 OriginalGriff 315
3 Sergey Alexandrovich Kryukov 179
4 Afzaal Ahmad Zeeshan 169

Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 18 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100