Click here to Skip to main content
Rate this: bad
good
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.
 
Thanks!
Posted 18-Apr-13 1:04am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

http://www.developerfusion.com/code/4630/capture-a-screen-shot/[^]
 
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.
 
Enjoy!!!
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 18 Apr 2013
Copyright © CodeProject, 1999-2014
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