Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# Windows form

I have a images in database .

i want to print the images in whole (A4) paper with the size of 180*100 px.

i am looking for windows form with c# codes
Posted 28-Jun-13 7:57am
ThePhantomUpvoter at 28-Jun-13 13:03pm
Sergey Alexandrovich Kryukov at 28-Jun-13 13:48pm
What you need is not "looking", but writing the code. What's the problem?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This is easily done by using System.Drawing.Printing.PrintDocument:[^].

To print the image itself, you will need to use one of the System.Drawing.Graphics.DrawImage methods, those which allows you to choose required rectangle size. Please see:[^].

Make sure you select the image size matching the page size in pixel, which will be available to you during runtime. In this case, the DrawImage method will resample the image for you, automatically. Just do you math on size and location.


CPallini at 28-Jun-13 14:55pm
Sergey Alexandrovich Kryukov at 28-Jun-13 17:11pm
Thank you, Carlo.

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

  Print Answers RSS
0 OriginalGriff 455
1 Sergey Alexandrovich Kryukov 445
2 Maciej Los 290
3 ProgramFOX 275
4 CHill60 225
0 OriginalGriff 550
1 Sergey Alexandrovich Kryukov 470
2 Maciej Los 310
3 ProgramFOX 275
4 Peter Leow 250

Advertise | Privacy | Mobile
Web02 | 2.8.150331.1 | Last Updated 28 Jun 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