Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How do I get the DPI of my printer using C#?

Avatar of kmullins5
kmullins5 asked on
.NET ProgrammingC#Multimedia Programming
3 Comments1 Solution3449 ViewsLast Modified:
The question
-----------------------------------
How do I get the Printer's actual DPI? (Preferably using C# and .net 2.0 or earlier)

A little background information
--------------------------------------
I am trying to create a print dialog for an application. It needs to be able to print the images into standard photo sizes, which are listed in inches. The user is able to choose their Printer, Paper Size, and Print Quality. Based on the Print Quality, I figure I am going to have to scale my image so it will print to the correct dimensions.

The problem
-----------------------------------
On my printer, when I use the System.Drawing.Printing.PrintResolution.Kind variable to find the available Printer Resolutions, I get results back like High, Medium, Low, and Draft. When I look at the X and Y values of those, I get results like "-4" and "-2".

After further reading, I found that those are just enumerated standards and are part of the WinGDI.h file. However, I can't find out anywhere what they actually stand for.

So basically, from what I have read, the Print Qualities are just standards and should be as simple as saying Medium is 300 DPI. Unfortunately I can't find any information to back this idea up.
ASKER CERTIFIED SOLUTION
Avatar of Mikael Jansson
Mikael JanssonFlag of Sweden image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers