Hello,
I am looking for any help or suggestions to this problem I am having. Here's the synopsis of what I am trying to do:
- Using a windows NT service print a file (Labels.txt)
- The labels.txt file is a list of print codes that will generate several labels. The actual number of labels could be different for each file.
- When I print I only want to have one spool file being sent to the printer. This can be achieved by a simple DOS command ("print c:\MidmarkLabelService\Labels.txt /d:\\printers\isszbtst"). However, I cannot get DOS commands to work with an NT service by using Shell() or Process.Start(). All of these commands work fine with a normal VB.Net executable, but for some reason they all act different with a service!
- I tried using the PrintDocument object, but it only ever prints the first page. I thought about finding a way to keep track of the # of lines per page, and then putting a loop in the to continue printing until there is no more data. However, it seems as if that approach will give me several spool files (one per label written)...while I was wanting only one spool file for "x" number of labels
I hope I have given enough details for somebody to help me, but if you need more information please feel free to ask. I will send/post anything you need to possibly help.
Thanks!
Jason
I am looking for any help or suggestions to this problem I am having. Here's the synopsis of what I am trying to do:
- Using a windows NT service print a file (Labels.txt)
- The labels.txt file is a list of print codes that will generate several labels. The actual number of labels could be different for each file.
- When I print I only want to have one spool file being sent to the printer. This can be achieved by a simple DOS command ("print c:\MidmarkLabelService\Labels.txt /d:\\printers\isszbtst"). However, I cannot get DOS commands to work with an NT service by using Shell() or Process.Start(). All of these commands work fine with a normal VB.Net executable, but for some reason they all act different with a service!
- I tried using the PrintDocument object, but it only ever prints the first page. I thought about finding a way to keep track of the # of lines per page, and then putting a loop in the to continue printing until there is no more data. However, it seems as if that approach will give me several spool files (one per label written)...while I was wanting only one spool file for "x" number of labels
I hope I have given enough details for somebody to help me, but if you need more information please feel free to ask. I will send/post anything you need to possibly help.
Thanks!
Jason