打印機紙張大小的設置

提單套表使用說明
一、前期設定:
1、印表機新增紙張類型:目前只有點陣打印機(即針孔打印機)可以使用提單套表。
A、只需在安裝打印機的本地電腦新增紙張,其它電腦即可使用。
B、打開印表機:開始->設定->印表機和傳真。(見圖-1)
(圖-1)
C、開啟伺服器內容:檔案->伺服器內容。(見圖-2)
(圖-2)
D、新增紙張:建立新格式->格式名稱(輸入Letter 8 1/2),->寬度和高度(寬度輸入21.59cm,高度輸入13.97cm)->確認。(見圖-3)
(圖-3)
E、以上步驟完畢,印表機紙張則新增完畢。
二、提單套表操作:
1、開啟提單套表功能:業務部->日常作業->提單套表。(見圖-4)
(圖-4)
A、         日期DATA:輸入出貨日期,可以不輸入。
B、         提單號碼:輸入打印的第一份提單的號碼。
C、 份數:輸入打印份數
D、         寄件資料:輸入客戶代號會自動跳出客戶相關信息。信息可以更改。
E、         收件資料:輸入客戶代號會自動跳出客戶相關信息。信息可以更改。
F、          輸入資料後按打印預覽
2、選擇列印機:選擇列印機,確定打印份數(即提單份數),按內容。(見圖-5)
(圖-5)
3、先擇紙張:(見圖-6,圖-7)
(圖-6)
(圖-7)
4、選擇紙張完畢後,按確定進行打印。
 
阅读更多

自定義紙張大小的問題!急!!!!

12-06

用以下函數自定義紙張大小,但打印的內容不在原來的位置上了,比如用A4的紙打在紙的左上端,但自定義紙張後並沒在打在紙的左上端,或者根本沒打出來,我用的是虛擬打印機,請高手幫忙解決問題!rnPublic Function mySetPrinter(ByVal prnName As String, _rn Optional ByVal eOrientation As typeOrient = 0, _rn Optional ByVal iDmpaper As Integer = 0, _rn Optional ByVal iDmpaperLength As Single = 0, _rn Optional ByVal iDmpaperWidth As Single = 0) _rn As Booleanrnrn Dim bDevMode() As Bytern Dim bPrinterInfo2() As Bytern Dim hPrinter As Longrn Dim lResult As Longrn Dim nSize As Longrn Dim sPrnName As Stringrnrn Dim dm As DEVMODErn Dim olddm As DEVMODErn Dim pd As PRINTER_DEFAULTSrn Dim pi2 As PRINTER_INFO_2rnrn On Error GoTo Err_Procrn rn sPrnName = prnNamern pd.DesiredAccess = PRINTER_ALL_ACCESSrn rn If OpenPrinter(sPrnName, hPrinter, pd) Thenrn Call GetPrinter(hPrinter, 2&, 0&, 0&, nSize)rn ReDim bPrinterInfo2(1 To nSize) As Bytern lResult = GetPrinter(hPrinter, 2, bPrinterInfo2(1), nSize, nSize)rn Call CopyMemory(pi2, bPrinterInfo2(1), Len(pi2))rn nSize = DocumentProperties(0&, hPrinter, sPrnName, 0&, 0&, 0)rn ReDim bDevMode(1 To nSize)rn rn If pi2.pDevMode Thenrn Call CopyMemory(bDevMode(1), ByVal pi2.pDevMode, Len(dm))rn Elsern Call DocumentProperties(0&, hPrinter, sPrnName, bDevMode(1), 0&, DM_OUT_BUFFER)rn End Ifrn rn Call CopyMemory(dm, bDevMode(1), Len(dm))rn Call CopyMemory(olddm, bDevMode(1), Len(olddm))rn rn With dmrn If eOrientation <> 0 Thenrn .dmOrientation = eOrientationrn .dmFields = DM_ORIENTATIONrn End Ifrn If iDmpaper <> 0 And iDmpaper <> vbPRPSUser Thenrn .dmPaperSize = iDmpaperrn .dmFields = DM_PAPERSIZErn End Ifrn If iDmpaper = vbPRPSUser Thenrn .dmFields = DM_PAPERLENGTH Or DM_PAPERWIDTHrn .dmPaperLength = iDmpaperLengthrn .dmPaperWidth = iDmpaperWidthrn End Ifrn End Withrn rn Call CopyMemory(bDevMode(1), dm, Len(dm))rn rn Call DocumentProperties(0&, hPrinter, sPrnName, _rn bDevMode(1), bDevMode(1), DM_IN_BUFFER Or _rn DM_OUT_BUFFER)rn rn pi2.pDevMode = VarPtr(bDevMode(1))rn rn lResult = SetPrinter(hPrinter, 2, pi2, 0&)rn Call ClosePrinter(hPrinter)rn mySetPrinter = Truern Elsern mySetPrinter = Falsern End Ifrn rn Exit Functionrn rnErr_Proc:rn mySetPrinter = FalsernEnd FunctionrnrnPublic Function ChgPageSize(ByVal prnName As String, _rn Optional ByVal pagesize As Integer = vbPRPSUser, _rn Optional ByVal pagewidth As Single = 0, _rn Optional ByVal pageheight As Single = 0) _rn As Booleanrn rn On Error GoTo Err_Procrn rn ChgPageSize = mySetPrinter(prnName, , pagesize, pagewidth * 10, pageheight * 10)rn rn Exit FunctionrnErr_Proc:rn ChgPageSize = FalsernEnd Functionrn

没有更多推荐了,返回首页