G
Gregg Walker
Hi,
I'm writing a check printing program that needs to put a MICR line 6/16" from the bottom of the page. Since the checks will be
printed on a laser printer using letter sized paper the printable area is not actually 8 1/2" x 11". I'm using an HP LaserJet 4000
and it cannot print all the way to the physical page boundaries. It has the following limitations:
Top Margin = 0.18"
Left Margin = 0.25"
Right Margin = 0.25"
Bottom Margin = 0.28"
The problem I'm having is the the graphics object being passed with PrintPageEventArgs is reporting its PageBounds property as the
full physical page size (850, 1100) instead of (804, 1050). The other properties are as follows:
Top = 0
Left = 0
Right = 850
Bottom = 1100
Width = 1100
Height = 950
I would have thought the PageBounds would be as follows:
Top = 18
Left = 25
Right = 1075
Bottom = 822
Width = 1050
Height = 804
It appears the drawing methods in the graphics are scaling the e.Graphics.PageBounds to fit within the physical page bounds which
makes it difficult to position gdi objects at exact physical locations on the printed page. In other words I can draw anywhere
within the e.Graphics.PageBounds and the results are visible on the printed page.
Is this a known bug in the .net printing or is it possibly a problem with my printer driver? Microsoft word does not have a problem
determing what the physical bounds of the printed page are.
Is there some other way to get the physical page bounds so that I can rescale the drawing points and rectangles?
Thanks for your help,
Gregg Walker
I'm writing a check printing program that needs to put a MICR line 6/16" from the bottom of the page. Since the checks will be
printed on a laser printer using letter sized paper the printable area is not actually 8 1/2" x 11". I'm using an HP LaserJet 4000
and it cannot print all the way to the physical page boundaries. It has the following limitations:
Top Margin = 0.18"
Left Margin = 0.25"
Right Margin = 0.25"
Bottom Margin = 0.28"
The problem I'm having is the the graphics object being passed with PrintPageEventArgs is reporting its PageBounds property as the
full physical page size (850, 1100) instead of (804, 1050). The other properties are as follows:
Top = 0
Left = 0
Right = 850
Bottom = 1100
Width = 1100
Height = 950
I would have thought the PageBounds would be as follows:
Top = 18
Left = 25
Right = 1075
Bottom = 822
Width = 1050
Height = 804
It appears the drawing methods in the graphics are scaling the e.Graphics.PageBounds to fit within the physical page bounds which
makes it difficult to position gdi objects at exact physical locations on the printed page. In other words I can draw anywhere
within the e.Graphics.PageBounds and the results are visible on the printed page.
Is this a known bug in the .net printing or is it possibly a problem with my printer driver? Microsoft word does not have a problem
determing what the physical bounds of the printed page are.
Is there some other way to get the physical page bounds so that I can rescale the drawing points and rectangles?
Thanks for your help,
Gregg Walker