?
Solved

Print Pixel scale (200 Pts)

Posted on 1999-01-26
2
Medium Priority
?
169 Views
Last Modified: 2010-04-06
Hi, you might answer this question in "How to print a StringGrid", where you will get 200 pts

I'm doing some textout to the printer.canvas, and having trouble specifing the y-offset for the next line. I'm printing from a stringgrid, and I thought that the rowheight could be the y-offset but on the printer.canvas this value must be around 2.5 larger or the lines are drawed on top of each other.
How to I get this const to multiply with stringgrid.rowheight, I sure it changes from printer to printer, depending on the paper and printer resolution.
0
Comment
Question by:koger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 0 total points
ID: 1363420
Hi koger,

As I understand your question, then your looking for the difference of pixels between screen and printer? Correct?

If so, this should be a solution :

XPixelsPerInch := GetDeviceCaps(Printer.Handle, LOGPIXELSX);
YPixelsPerInch := GetDeviceCaps(Printer.Handle, LOGPIXELSY);

And screen.PixelsPerInch gives you the pixels per inch of your screen...

so devide these two and you get your constant...

or am I wrong?

Regards, Zif.
 
0
 

Author Comment

by:koger
ID: 1363421
You are right go ahead and answer the other question to get your 200 pts ;-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question