Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Windows form
hi,
 
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
Comments
ThePhantomUpvoter at 28-Jun-13 13:03pm
   
http://www.codeproject.com/Answers/610076/printingplusmultipleplusimages#answer1
Sergey Alexandrovich Kryukov at 28-Jun-13 13:48pm
   
What you need is not "looking", but writing the code. What's the problem?
—SA

1 solution

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

Solution 1

This is easily done by using System.Drawing.Printing.PrintDocument:
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[^].
 
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:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.aspx[^].
 
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.
 
—SA
  Permalink  
Comments
CPallini at 28-Jun-13 14:55pm
   
5.
Sergey Alexandrovich Kryukov at 28-Jun-13 17:11pm
   
Thank you, Carlo.
—SA

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

  Print Answers RSS
0 OriginalGriff 250
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 DamithSL 125
4 Afzaal Ahmad Zeeshan 120
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 28 Jun 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