Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

Printing from an ASP.Net application

I've got an application that would be perfect as an intranet web app.  The only problem is, some of the users work in material handling and need print out a label, and I don't know how to make that work.  The label printers are connected to a LPT port and aren't networked.

My first thought was to make printer-friendly HTML output.  It works OK unless the user has header and footer info in the page setup.  I can't figure out how to control that programatically, and I can't trust users to configure their print page setup properly. So that option is out.

Has anyone done something similar before or have any tips?

Sunday, February 1, 2004

You aren't going to get what you want without running active code. If your users are all limited to IE, one potential path might be to write an ActiveX control that does the printing for you.

Brad Wilson (
Sunday, February 1, 2004

Limiting it to IE wouldn't be a problem since it's an intranet app, but I'm still confused re ActiveX controls. I've only created 2 before - both in VB.  I'm still hobbling along figuring out .Net, and I can't figure out what the .Net equivalent of an ActiveX control is.

Sunday, February 1, 2004

The .NET equivalent is an embedded Windows Forms control. However, the clients have to have .NET installed, and the code runs in a sandbox by default (which I think probably means no printing without user intervention).

Brad Wilson (
Sunday, February 1, 2004

Kind of sounds like a problem where pdf might be a solution, possibly, maybe...

Umpteen different ways to generate pdf from an application and you'll end up with exactly what you want in terms of page and layout.


Wednesday, February 4, 2004

Can anyone tell me how to add existing forms in Visual

Saturday, February 14, 2004

*  Recent Topics

*  Fog Creek Home