Odd Printing behaviour with Laserjet 6L (I know it's old)

Odd Printing behaviour with Laserjet 6L (I know it's old)

Hey all, just wanted to say hi, first time poster. I have a really odd printing issue. All of my printings are about 10% of the actual size they should be. In otherwords if I am printing an excel spreadsheet then it will appear tiny in the top left hand corner of the page. I am on Win98se and the printer in question is an HP Laserjet 6l. I have taken a look at the scaling properties and they are set correctly. If anyone has any thoughts I would greatly appreciate it. Thanks in advance.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Is this a Fortran-related problem?


Retired 12/31/2016

I had this problem when I first started writing CVF code. The problem is the resolution of the printer versus the screen. You are probably generating your graphics based on screen resolution instead of printer resolution. Your laser printer is probably at least 10 times finer resolution than your screen which would, in that case, result in the graphics being about 1/10 the size you would like it to be on the printer. You should call PrintDlg to select your printer. The structure returned from this function will contain the handle to the device context for the selected printer. You then call GetDeviceCaps with the handle to the device context, to obtain the horizontal resolution, vertical resolution, physical offsets, physical width and height of the page, etc. From these variables, you can treat the printer as if you were writing to the screen using the proper scale factors.

See XFTLite sample for an illustration of scaled drawing/printing.

Leave a Comment

Please sign in to add a comment. Not a member? Join today