Printing on the Server Side

Results 1 to 3 of 3

Thread: Printing on the Server Side

  1. #1
    Join Date
    Dec 1969

    Default Printing on the Server Side

    I need a way to print the current diplayed HTML page on the server side. That is I want the server to print it to it&#039s printer, NOT to the client&#039s printer. I thought the easiest way to do that would be to start an instance of Internet Explorer on the server and navigate it to the site I want and then make it print the site. Is there any possible way I can do that through ASP code, or will I have to write a component in VB or C? I tried doing CreateObject(InternetExplorer.Application) and then calling ExecWB, but it doesn&#039t seem to work.<BR><BR>Thank you<BR><BR>

  2. #2
    Ed Guest

    Default RE: Printing on the Server Side

    Don&#039t know much about running IE and such from an ASP page, but there is a component that can print PDF files on the server-side...<BR><BR>Perhaps those guys have a component to print on the server side (HTML, that is) or can help you out?<BR><BR>(They also have an HTML-2-PDF component ( so if worse came to worse you could turn HTML into PDF, then print PDF...)

  3. #3 Guest

    Default RE: Printing on the Server Side

    This is basically the same issue I posted a question about some days ago:<BR>&#060;BLOCKQUOTE&#062;<BR>I need to take a raw print file and send it to the local printer. I can do this easily for any network printer by using FSO to copy (not write, due to binary data issues) the file to \serverprinter. Works fine. But I can&#039t copy the file to LPT1 or PRINTER$ or LPT1.DOS or my machinemy printer share or any **** thing else.<BR><BR>I&#039ve found bunches of code on how to send a raw print file to a local printer via Win32API calls to WINSPOOL.DLL in Visual Basic. The trick is, I don&#039t have VB (and I really don&#039t want to learn it) I just need to find a way to:<BR>A) call winAPI function in winspool.dll <BR>OR<BR>B) copy binary data directly to the printer port<BR><BR><BR>Any ideas?<BR>&#060;/BLOCKQUOTE&#062;<BR>Since then, I&#039ve found the following:<BR><BR>A) No you can&#039t just copy BINARY print data to the local port (images get garbled using FSO or ADO) and<BR>B) No you can&#039t start IE on the server with a command line that tells it to print the data (for "security" reasons says M$).<BR><BR>Amazing isn&#039t it? Seems like it would be so simple.<BR><BR>C) What you can do is use one of the following to get access to the local port.<BR>Dump Raw Data to Printer via Windows API calls.<BR><BR><BR>Send Raw Data to a Printer Using the Win32 API from Visual Basic<BR><BR><BR>Access Windows API calls for printing from Java<BR><BR><BR>Sending a Tk canvase to the printer in perl with winAPI calls.<BR><BR><BR>Alll of which will work from a language that can make WinAPI function calls (i.e. NOT ASP). What needs to be done is that the method in <BR><BR>needs to be made into an ASP component (ActiveX control) useing Visual Basic which can then be called by the ASP page to send raw data to the local port. Also, you need to use ghostscript or some other utility to convert HTML to some PLD (Page Description Language) then take that Postscript or PCL (or even just a bitmap) as raw print data and send it to the printer.<BR><BR>I gave up, let me know if you make it further than I did.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts