我正在使用vb.net进行开发,使用Brother打印机PT 98OOPCN打印条形码标签。我使用的是Network Shared,而不是Peer to Peer。 有我的代码
Dim objDoc As bpac.Document
objDoc = CreateObject("bpac.Document")
Dim PrinterName As String = "\\hostprinterserver\printer1"
If (objDoc.Open("Label_Barcode\Label_Ex.lbx")) Then
objDoc.GetObject("dateObject").Text = "10/23/2012"
objDoc.GetObject("barcodeObject").Text = "100123239734"
objDoc.SetPrinter(PrinterName, True)
objDoc.StartPrint("", PrintOptionConstants.bpoDefault)
objDoc.PrintOut(1, PrintOptionConstants.bpoDefault)
objDoc.EndPrint()
objDoc.Close()
End If
是否可以使用Brother SDK打印到网络共享打印机? 如果有可能怎么做呢?
答案 0 :(得分:0)
Dim PrinterName As String = "printer1 on hostprinterserver'sIP"
For instance:
Dim PrinterName As String = "Brother PT-9600 on 192.168.1.45"
它对我有用!