Accessing LPT-port directly (on server) from ASP .Net application?

.net , Sweden
  • 13 years ago


    I need to send data, to be printed by a label writer, to the LPT1-port on the server from an ASP .Net application written in C#.

    Has anyone any suggestions on how to do this or if it is even possible?

    The data to be sent to the printer is only about 500 bytes, including all initiations, selections of font and the two short lines of text to be written.

    I have it working nicely by using the simplest of methods, with "type file.txt > lpt1:", but need to assemble the data and send it from within an ASP .NET (C#) application. I've searched all over the place but have found nothing that have helped. Often the questions regarding ASP and accessing LPT1 are about how to print on the client side which is not what I need.

    Any ideas? Help would be greatly appreciated...


Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“An expert is a man who has made all the mistakes that can be made in a very narrow field” - Niels Bohr