Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing in visual c++

Status
Not open for further replies.

merlinv

Programmer
Jun 11, 2001
32
US
I have some problems with printing in visual c++. When I change fonts it doesn't print normally. It shows on the screen ok but on paper is too big. This happens mainly on HP printers. Doesn't happen on others.

Any suggestions on how to set up fonts to print on various printers?

Thanks.

Merlin Vilhauer
 
To print without problems you should send your document as a picture. So, before printing will be created an image and after that the image will be sent to printer.

Ion Filipski
1c.bmp
 
"To print without problems you should send your document as a picture"

interesting... and how do you do that ? is there an API ?
 
I don't know how do you print. For example if you get the DC of the printer and you draw in this DC, there should be no problems. But if you use some printer dialog, I think there should be an option in that dialog.

Ion Filipski
1c.bmp
 
The resolution of a printer is different from the screen and even other printers. You need to consider this when creating a font, specifically, the point size.

This is the usual way of calculating a font's point size:

nHeight=-MulDiv( <desired pt size>, GetDeviceCaps(hDC,LOGPIXELSY),72)

(taken from MSDN)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top