Thanks,
I arrived to this code that works fine:
Dim fRealWidth As Double ' Image's real width in inches
Dim fRealHeight As Double ' Image's real height in inches
Dim fPrnDPIX As Double ' Number of pixels per logical inch along the screen width
Dim fPrnDPIY As Double ' Number of pixels per logical inch along the screen height
Dim hdc As Long
[...]
With leadPrinter
.EnableProgressEvent = True
.PaintSizeUseDPI = True
fRealWidth = .BitmapWidth / .BitmapXRes
fRealHeight = .BitmapHeight / .BitmapYRes
Printer.Print Now
.StretchIntensity
If fRealHeight > fRealWidth Then
If Printer.Orientation <> vbPRORPortrait Then
.Rotate 9000, ROTATE_RESAMPLE Or ROTATE_RESIZE, RGB(255, 255, 255)
.Render Printer.hdc, 1, 1, Printer.PrintQuality * fRealHeight, Printer.PrintQuality * fRealWidth
Else
.Render Printer.hdc, 1, 1, Printer.PrintQuality * fRealWidth, Printer.PrintQuality * fRealHeight
End If
Else
If Printer.Orientation = vbPRORLandscape Then
.Rotate 9000, ROTATE_RESAMPLE Or ROTATE_RESIZE, RGB(255, 255, 255)
.Render Printer.hdc, 1, 1, Printer.PrintQuality * fRealHeight, Printer.PrintQuality * fRealWidth
Else
.Render Printer.hdc, 1, 1, Printer.PrintQuality * fRealWidth, Printer.PrintQuality * fRealHeight
End If
End If
.EnableProgressEvent = False
End With
[...]
greetings
Renato