Click here to Skip to main content
12,394,573 members (71,184 online)
Rate this:
 
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 6:57am
Comments
ThePhantomUpvoter 28-Jun-13 13:03pm
   
http://www.codeproject.com/Answers/610076/printingplusmultipleplusimages#answer1
Sergey Alexandrovich Kryukov 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 28-Jun-13 14:55pm
   
5.
Sergey Alexandrovich Kryukov 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 28 Jun 2013
Copyright © CodeProject, 1999-2016
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