Solved

Print Pixel scale (200 Pts)

Posted on 1999-01-26
2
161 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
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 0 total points
Comment Utility
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
Comment Utility
You are right go ahead and answer the other question to get your 200 pts ;-)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now