Dear All,
I want to print bar codes from an asp.net application.I am using Zebra printer and i have created text files from my application below are the code to create text file
Using dr As SqlDataReader = cmd.ExecuteReader()
Using StringWriter
StringWriter.WriteLine("CT~~CD,~CC^~CT~")
StringWriter.WriteLine("^XA~TA000~JSN^LT0^MNW^MTD^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ")
While dr.Read()
Dim linex As String = "^FD>;" & dr.Item("BARCODEVALUE") & "^FS"
StringWriter.WriteLine("^XA")
StringWriter.WriteLine("^MMT")
StringWriter.WriteLine("^PW406")
StringWriter.WriteLine("^LL0203")
StringWriter.WriteLine("^LS0")
StringWriter.WriteLine("^BY3,3,82^FT51,113^BCN,,Y,N")
StringWriter.WriteLine(linex)
StringWriter.WriteLine("^PQ1,0,1,Y^XZ")
End While
End Using
End Using
This is working fine if i am typing from dos prompt
Type filename.txt >prn
Now i have created a function to print like below
Dim proc As New System.Diagnostics.Process
With proc.StartInfo
.FileName = "cmd.exe"
.Arguments = _shellcmd
End With
proc.Start()
where _shellCmd is the command to call dos printing
Dim shellcommand As String = "/C copy " & barcodefile + " lpt1"
this all working from dev server,but after publishing when i press the button nothing happend.I published the site in the same system where the printer is installed and add Defaultpool users to the printer and gave permission to print but still nothing happening.Please help
What I have tried:
Created the barcode text file and it printed from asp.net application which is in development stage