|
| Printing / Service Question |
| Iniciado por djsummers, 04,sep. 2015 20:50 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 04,septiembre 2015 - 20:50 |
Hi all
I have a printer process for printing ZPL labels and I need to move the code to a WD Windows service project
I cant get the same code to work, I presume its the iConfigure satement. Any help as to an alternative would be greatly appreciated. This is the current working code in a standard windev app :
IF iConfigure(sysLabel.PrinterPair) = True THEN iPrint("CT~~CD,~CC^~CT~") iPrint("^XA~TA000~JSN^LT0^MNM^MTD^PON^PMN^LH0,0^JMA^PR5,5~SD10^JUS^LRN^CI0^XZ") iPrint("^XA") iPrint("^MMT") iPrint("^PW799") iPrint("^LL0400") iPrint("^LS0") sPrintLine = "^FT582,379^A0B,46,33^FH\^FD" + NoSpace(sysLabel.Sequence) + "^FS" iPrint(sPrintLine) sPrintLine = "^FT454,379^A0B,46,33^FH\^FD" + NoSpace(sysLabel.Description) + "^FS" iPrint(sPrintLine) iPrint("^FT187,282^A0N,28,28^FH\^FDDoor^FS") iPrint("^FT187,174^A0N,28,28^FH\^FDTime^FS") iPrint("^FT665,335^A0B,22,26^FH\^FDChassis Number^FS") iPrint("^FT39,299^A0B,22,26^FH\^FDLeoni Part No.^FS") iPrint("^FT527,379^A0B,28,28^FH\^FDSequence^FS") iPrint("^BY2,3,88^FT761,331^BCB,,Y,N") sPrintLine = "^FD>;" + NoSpace(sysLabel.BatchCode) + "^FS" iPrint(sPrintLine) iPrint("^FT187,68^A0N,28,28^FH\^FDPosition^FS") iPrint("^BY2,3,88^FT131,357^BCB,,Y,N") sPrintLine = "^FD" + NoSpace(sysLabel.ProductCode) + "^FS" iPrint(sPrintLine) sPrintLine = "^FT186,323^A0N,34,33^FH\^FD" + NoSpace(sysLabel.DeliveryPoint) + "^FS" iPrint(sPrintLine) sPrintLine = "^FT185,215^A0N,34,33^FH\^FD" + NoSpace(sysLabel.Time) + "^FS" iPrint(sPrintLine) sPrintLine = "^FT187,127^A0N,51,50^FH\^FD" + NoSpace(sysLabel.SequencePosition) + "^FS" iPrint(sPrintLine) sPrintLine = "^PQ" + NoSpace(sysLabel.Copies) + ",0,1,Y^XZ" iPrint(sPrintLine) iEndPrinting()
Many thanks
Dave |
| |
| |
| | | |
|
| | |
| |
| Publicado el 07,septiembre 2015 - 12:11 |
Hello Dave,
most of the time, this kind of problems come from one thing : the user running the service is not your regular logged in user, but a system user. And this system user has limited rights by default (from the top of my head, printing is not one of them)
SO you can either configure this iser to have the rights you need, or you can configure the service to run under YOUR user login/password
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
Already there: WXShowroom.com, WXReplication (open source) Coming soon: WXEDM (open source) More information on http://www.fabriceharari.com
On 9/4/2015 12:50 PM, Dave Summers wrote:
Hi all
I have a printer process for printing ZPL labels and I need to move the code to a WD Windows service project
I cant get the same code to work, I presume its the iConfigure satement. Any help as to an alternative would be greatly appreciated. This is the current working code in a standard windev app :
IF iConfigure(sysLabel.PrinterPair) = True THEN iPrint("CT~~CD,~CC^~CT~")
iPrint("^XA~TA000~JSN^LT0^MNM^MTD^PON^PMN^LH0,0^JMA^PR5,5~SD10^JUS^LRN^CI0^XZ")
iPrint("^XA") iPrint("^MMT") iPrint("^PW799") iPrint("^LL0400") iPrint("^LS0") sPrintLine = "^FT582,379^A0B,46,33^FH\^FD" + NoSpace(sysLabel.Sequence) + "^FS" iPrint(sPrintLine) sPrintLine = "^FT454,379^A0B,46,33^FH\^FD" + NoSpace(sysLabel.Description) + "^FS" iPrint(sPrintLine) iPrint("^FT187,282^A0N,28,28^FH\^FDDoor^FS") iPrint("^FT187,174^A0N,28,28^FH\^FDTime^FS") iPrint("^FT665,335^A0B,22,26^FH\^FDChassis Number^FS") iPrint("^FT39,299^A0B,22,26^FH\^FDLeoni Part No.^FS") iPrint("^FT527,379^A0B,28,28^FH\^FDSequence^FS") iPrint("^BY2,3,88^FT761,331^BCB,,Y,N") sPrintLine = "^FD>;" + NoSpace(sysLabel.BatchCode) + "^FS" iPrint(sPrintLine) iPrint("^FT187,68^A0N,28,28^FH\^FDPosition^FS") iPrint("^BY2,3,88^FT131,357^BCB,,Y,N") sPrintLine = "^FD" + NoSpace(sysLabel.ProductCode) + "^FS" iPrint(sPrintLine) sPrintLine = "^FT186,323^A0N,34,33^FH\^FD" + NoSpace(sysLabel.DeliveryPoint) + "^FS" iPrint(sPrintLine) sPrintLine = "^FT185,215^A0N,34,33^FH\^FD" + NoSpace(sysLabel.Time) + "^FS" iPrint(sPrintLine) sPrintLine = "^FT187,127^A0N,51,50^FH\^FD" + NoSpace(sysLabel.SequencePosition) + "^FS" iPrint(sPrintLine) sPrintLine = "^PQ" + NoSpace(sysLabel.Copies) + ",0,1,Y^XZ" iPrint(sPrintLine) iEndPrinting()
Many thanks
Dave |
| |
| |
| | | |
|
| | |
| |
| Publicado el 07,septiembre 2015 - 15:11 |
Many thanks Fabrice, I will try admin account
You don't think it because of iConfigure?
Even though i am naming the printer so there will be no UI dialog, iConfigure can operate with a user interface if blank and therefore does this make it an ignored statement due to UI blocking not allowed in a windows service program ?
Cheers Dave |
| |
| |
| | | |
|
| | | | |
| | |
|