Click here to Skip to main content
11,931,584 members (66,818 online)
Rate this:
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 28-Jun-13 13:03pm
Sergey Alexandrovich Kryukov 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 28-Jun-13 14:55pm
Sergey Alexandrovich Kryukov 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.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