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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer Offset

Status
Not open for further replies.

KCI

Programmer
Jun 30, 2003
39
DE
To the helpful one:

This question is not necessarily related to VC++, but I am using VC++ 6.0 and could not find a general printer question forum. Please, direct me to the correct forum if needed.

My issue involve the difference ways printers handle the Manual Feed or Multi purpose tray. When you use the MF tray, some printers left justify the paper (HP LJ 4, HP LJ 5), that is you left justify the paper in the tray then use a slide from the right to make the tray fit the paper. Other printers center the paper (HP 4000TN), that is you place the paper in the middle then slide two paper guides to center the paper. Yet others right justify the paper (Xerox Phaser). My paper size about 7” wide by 7.785” length.

I need a way to determine where to start printing on the document from the left margin (an offset). One issue is that the Print dialog is called after OnPrint, so I do not know which printer will be selected when OnPrint is called. Am I putting my code in the right place? I am currently playing with parameters from DEVMODE from within OnPrint via the pInfo CprintInfo* object. I have set dmPaperSize = 0, dmPaperWidth = 1778, and dmPaperLength = 2000. The units are in tenths of a millimeter.

Your help IS appreciated.

KCI
 
Hey All,

a little follow up. I was incorrect when I said "Print dialog is called after OnPrint". In my case OnPrint was called twice once for the print preview then again for the actual print job. Meaning I do have access to the printer DC. My bad.

KCI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top