找回密码
 加入
搜索
查看: 2046|回复: 1

[系统综合] 用针式打印机打出来的字很大,激光打印机打出来的又很小,各位师兄,这是为什么?

[复制链接]
发表于 2011-8-15 19:00:00 | 显示全部楼层 |阅读模式
#include "WinPrint.au3"

Global $hPrintDC
Local $s_DefaultPrinter, $DOCINFO, $result, $hFont, $hOldFont, $s_TextOut

$s_DefaultPrinter = _WinSpool_GetDefaultPrinter()
;If $s_DefaultPrinter = "" Then Return SetError(1, 0, 0)

$hPrintDC = _WinAPI_CreateDC("winspool", $s_DefaultPrinter)
;If $hPrintDC = 0 Then Return SetError(1, 0, 0)

$DOCINFO = DllStructCreate($tagDOCINFO)

$result += _WinAPI_StartDoc($hPrintDC, $DOCINFO)
$result += _WinAPI_StartPage($hPrintDC)

$hFont = _WinAPI_CreateFont(50, 0, 0, 0, $FW_NORMAL, False, False, False, $GB2312_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $ANTIALIASED_QUALITY, $FIXED_PITCH, 'Arial')
$hOldFont = _WinAPI_SelectObject($hPrintDC, $hFont)

$s_TextOut = "小罗叫罗成洋"
$result += _WinAPI_TextOut($hPrintDC, 100, 200, $s_TextOut)

$s_TextOut = "让我1一面对让我1一面对"
$result += _WinAPI_TextOut($hPrintDC, 100, 300, $s_TextOut)

$result += _WinAPI_EndPage($hPrintDC)
$result += _WinAPI_EndDoc($hPrintDC)

_WinAPI_ReleaseDC(0, $hPrintDC)
_WinAPI_DeleteDC($hPrintDC)
;Return $result
 楼主| 发表于 2011-8-17 10:32:27 | 显示全部楼层
怎么没人帮忙啊?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-15 01:41 , Processed in 0.076202 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表