Question

I want to create a windows form application that will sit on our local server and print invoices to a network printer say every 30 minutes.

Can someone confirm that you definitely can't use a console application to print (invoices will include images for logos etc). The reason I ask is that it seems pointless to have a GUI when there's no need for one. If it can, a simple resource to get me going would be great.

Also I can't seem to find an easy to follow tutorial on .net printing basics (positioning data etc). A the moment the whole concept isn't sinking in at all!

Was it helpful?

Solution

If you don't need a UI, perhaps a .Net Windows service will do the job. I have used this method before for exactly this purpose -- every n minutes, it looks for something to print, either in a folder or a database table.

If you choose this route, here is one of many helpful online tutorials you could use.

OTHER TIPS

I don't see why a console app would be out of the question, you can use all the same libraries that a WinForms app can. If you are simply pulling data from the database, any number of ways could be used to generate documents. If you wanted to get fancy, you could even produce a 'nicely' formatted document using GDI+ objects and plug in your values. As long as your producing your documents in the background, it doesn't really matter if you have a Window available to preview(though it may be wise to have some hidden debugging tools.)

I also agree with the above post that a windows service may be your best bet.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top