VB .NET Print Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm printing a combination of text and graphics to the printer. When I print
to my HP Laserjet, everything comes out ok. If I print to my Canon Inkjet
photo printer (i475D series), all I get is text. I don't get lines under the
text, printed using e.Graphics.DrawLine(Pens.Black, LineX1, LineY, LineX2,
LineY) in the Print_Page event, and I don't get images, using
e.Graphics.DrawImage(Me.picSign.Image, 0, CInt((0.25 + (4 *
NumPrintedOnPage)) * pdDoc.DefaultPageSettings.PrinterResolution.X),
CInt(SignWidth), CInt(SignHeight)) to print the graphic stored in a picture
box at a set number of inches. Like I said, the same print code prints
everything fine on the one printer, and on the other I only get what was
printed using the e.Graphics.DrawString method. Any ideas on how to fix this
would be greatly appreciated!

Thanks.
 
I found that the pdDoc.DefaultPageSettings.PrinterResolution.X works on the
laserjet, but on the other printer the resolution .X and .Y are both negative
numbers. That's what's throwing the graphics off. I need the graphic printed
at a specific number of inches, so I was using NumInches * Resolution to get
the number of pixels the graphic should be. Unfortunately, with resolution of
-3 or -6 (can't remember), it's not working! Can anyone tell me why this
would return negative resolutions, and how I can get this going? Any help is
GREATLY appreciated. Thanks!
 
Back
Top