Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If metin.Height >= metin.Width Then
- Printer.Orientation = vbPRORPortrait ' Taller than wide.
- Else
- Printer.Orientation = vbPRORLandscape ' Wider than tall.
- End If
- textRatio = metin.Width / metin.Height
- printerWidth = Printer.ScaleX(Printer.ScaleWidth, Printer.ScaleMode, vbHimetric)
- printerHeight = Printer.ScaleY(Printer.ScaleHeight, Printer.ScaleMode, vbHimetric)
- printerRatio = printerWidth / printerHeight
- If textRatio >= printerRatio Then
- printerTextWidth = Printer.ScaleX(printerWidth, vbHimetric, Printer.ScaleMode)
- printerTextHeight = Printer.ScaleY(printerWidth / textRatio, vbHimetric, Printer.ScaleMode)
- Else
- printerTextHeight = Printer.ScaleY(printerHeight, vbHimetric, Printer.ScaleMode)
- printerTextWidth = Printer.ScaleX(printerHeight * textRatio, vbHimetric, Printer.ScaleMode)
- End If
- Printer.Print metin
Add Comment
Please, Sign In to add comment