473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to write an app to automatically send a job to the printer?

Hi there,

I currently have a USB printer that is permanently connected to one of the
machines in the office. I would like to write a simple application whereby
other users in other computers could copy a file to a directory which the
application monitors in the background. Whenever the application sees a new
file in the in directory it processes it and, if successful, writes it to
the out folder. I am not really looking for resiliency or any elaborate
means to detect that the file has actually been printed. Just something
that gets the file and dumps it in the printer using the default print
settings.

Being a system admin with a little C# knowledge I know how to modify a
prototype to fit my needs but wouldn't really know where to start with the
application. Can someone please help?

Naturally, I could just go out and buy an USB to Ethernet print server but
that wouldn't be a fun way to learn C# would it?

Regards,

Ricko
Nov 16 '05 #1
2 1204
Ric Da Force,

Take a look at the FileSystemWatcher class in the MSDN. You can use this to
watch for changes in a directory and then program your functionality (i.e.
move to another folder, check file contents, etc...) to the events of this
class.

I hope this helps.
-----------------------
Nov 16 '05 #2
Start a new ConsoleApplication Project, in the main method use the
System.IO.Directory to get all the file in a directory, then use the
System.Diagnostic.Process to start a print job for each file.
"Ric Da Force" <ri*@next-level.com.au> schrieb im Newsbeitrag
news:ct**********@nnrp.waia.asn.au...
Hi there,

I currently have a USB printer that is permanently connected to one of the
machines in the office. I would like to write a simple application
whereby
other users in other computers could copy a file to a directory which the
application monitors in the background. Whenever the application sees a
new
file in the in directory it processes it and, if successful, writes it to
the out folder. I am not really looking for resiliency or any elaborate
means to detect that the file has actually been printed. Just something
that gets the file and dumps it in the printer using the default print
settings.

Being a system admin with a little C# knowledge I know how to modify a
prototype to fit my needs but wouldn't really know where to start with the
application. Can someone please help?

Naturally, I could just go out and buy an USB to Ethernet print server but
that wouldn't be a fun way to learn C# would it?

Regards,

Ricko

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Richard Johnson | last post by:
I am a C++ newbie and am trying to send simple text data to my local printer. My printer is a USB printer and I have tried the following code using my USB port. This code executes but does not send...
2
by: Uros | last post by:
Does anybody know how to write data directly to the LPT port from MSAccess. Now I use "Open PrtPort For Append Access Write As IntFilenum" then "Print $IntFilenum, ..........." but doesn't work...
3
by: RC | last post by:
I am using docmd.printout to send Reports (formatted as labels) to a barcode label printer. I need to collate the labels so that I print lable 1 twice, then label 2 twice, then label 3 twice, etc....
2
by: MLH | last post by:
I would like to allow users to set, as an application default, a specific printer to send reports to. I don't know how to bring up a list of valid print devices in A97, nor do I know how to...
13
by: Susan Beebe | last post by:
I have downloaded the code described in Microsoft article Q154078. I am trying to send raw ZPL (zebra barcode printer) code from Microsoft access. It works just fine if I hard code the actual...
0
by: mvreddy | last post by:
SIR, I NEED TO SEND PRINTER COMMANDS using pic microcontrollers to PRINTER USING C LANGUAGE,IS IT POSSIBLE TO SEND PRINTER COMMANDS TO PRINTER USING CONTROLLERS IN C, PLZ HELP..
5
by: itfetish | last post by:
I have made an electronic sign out book for my office in ASP using VBScript. Problem is, when there is a fire we need to check who is out and who is burning. I have been trying to think of how...
1
by: remya1000 | last post by:
how to send a .txt file to a printer. after creating a .txt file i need to send that .txt file to a printer.using vb.net and while sending that file to printer i need to tell, which printer i need...
0
by: EricJudge06 | last post by:
We are converting some reports from Crystal Reports to Microsoft SQL Reporting Services (SSRS) in an ASP 2.0 VB.Net web app. Crystal had a function called PrintToPrinter which was being used to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.