views:

254

answers:

1

We have several applications that generate their own PCL and Postscript via C#. When it comes to print we've traditionally allowed for multiple outputs such as IP (LPR or RAW 9100) or local printer using:

How to send raw data to a printer by using Visual C# .NET

We also send via UNC (\\server\printer_share). The problem with the last one is that a printer UNC seems to be a little different then a file UNC. I get different results depending on the OS of the server (sometimes a write error) and more importantly, on some systems I get an additional file that is sent first. This is the Zone Transfer file that contains:

[ZoneTransfer]
ZoneId=3

My solution, which isn't a very good one in my eyes, involves me creating a process and executing "copy \\server\printer_share" in a hidden command prompt in the background. This resolves all my issues but doesn't provide me with much feedback etc. It looks like the command line copy program is quite different from that of method in the System.IO.File class.

Any thoughts on a better way to do this in .NET?

A: 

As will all very strange problems this seems to have gone away. Maybe it was never a real issue.

Douglas Anderson