Backgroung Printing in ASP


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Backgroung Printing in ASP

  1. #1
    Gurpreet Singh . Guest

    Backgroung Printing in ASP



    Hi,

    I'm building an Intranet app in which I need to print documents
    without displaying them in the browser. All the reports and
    documents in the app are generated by asp so they can be displayed
    in the browser by hitting the appropriate URL, but I don't want the
    user to have to individually load each document and manually print it.

    I have lot's of ideas about how to do this, but I'm not happy with
    any of them. This seems like sich an important thing that someone
    else must have done it.

    Any suggestions would be appreciated. I'll post some of my ideas
    later, if necessary.


    -GS

  2. #2
    Colm Gallagher Guest

    Re: Backgroung Printing in ASP


    Gurpreet,

    The normal way to do this is to get the ASP to update a "prints" table.
    Create an NT service or schedule a program to run to check this table every
    X seconds, minutes whatever suits - The timer starts the printing process
    for the required job.

    Alternatively, if you want to trigger the process from the web page, create
    an activeX object which has a callback function (check MSDN for this or ask
    again here) - you say print this thing and set the callback, you then return
    control to your ASP. In the background, the callback will re-call the ActiveX
    print routine independant of your ASP. (sounds a bit complex if you've never
    done it before, but it's really very easy, just use a timer, this is a callback)

    --
    Colm Gallagher
    www.coralquest.com

    "Gurpreet Singh" . wrote:
    >
    >
    >Hi,
    >
    > I'm building an Intranet app in which I need to print documents
    > without displaying them in the browser. All the reports and
    > documents in the app are generated by asp so they can be displayed
    > in the browser by hitting the appropriate URL, but I don't want the
    > user to have to individually load each document and manually print it.
    >
    > I have lot's of ideas about how to do this, but I'm not happy with
    > any of them. This seems like sich an important thing that someone
    > else must have done it.
    >
    > Any suggestions would be appreciated. I'll post some of my ideas
    > later, if necessary.
    >
    >
    >-GS



  3. #3
    Gurpreet Singh . Guest

    Re: Backgroung Printing in ASP



    Colm

    Thanks for the response. I tried something that sounds like a
    mix of both your suggestions. I had an ActiveX exe running on the server
    which exposed an object with an Add method, that added a URL to a queue.

    The EXE loaded the URLs from the Queue into an InternetExplorer object
    and used WBExec to print them.

    Worked great on the development machine, and worked fine on the server
    if I ran it within VB, but if I tried compiling it I got the error/bug

    Q278013 - BUG: ASP Error 80070005 Access Denied.

    Getting this sorted is a short term problem, any help would be
    appreciated, The MSDN advice hasn't worked.

    but longer term this solution still has problems.
    This technique (and most I can think of) relies on the server doing the
    printing. This is fine for intranet apps, but obviously won't work for
    internet apps.

    Ultimately the client is going to have to have control of the printing.
    I suppose I could write a similar app for the client, but it does defeat
    the platform independance idea a bit.

    This is such a simple idea, and very important in Client Server Apps,
    I'm amazed there isn't more discussion about it.

    Do I need to start looking at Java?

    Would you agree that you can't make a proper application
    from ASP alone? You need some sort of rich client, Java Applets, or
    ActiveX OCXs, or something else.

    -Gurpreet


  4. #4
    Colm Guest

    Re: Backgroung Printing in ASP


    Gurpreet,
    >
    > Would you agree that you can't make a proper application
    > from ASP alone? You need some sort of rich client, Java Applets, or
    > ActiveX OCXs, or something else.
    >


    It depends on what you call a "proper" application. Thin client apps are
    limited in a number of respects, things like JAVA/ActiveX etc. are a method
    of sending instructions over to the client - making it a plump client?

    Remeber that the problem here is not the power of ASP (which is only an object
    model after all), it's the power of the client/server deployment model.
    A lot of people take the browser for granted nowadays, but remember that
    this is ultimately your deployment platform.

    There are a few good things in IE for setting up a page for printing,
    If you want the same results in netscape then you're right look out to a
    richer client than a browser...

    Consider Microsoft.DOC format (just an XML export nowadays) and ever good
    old PDF (never found a free convertor yet though ).

    I've not yet come across an interface problem that couldn't be sorted with
    HTML4 (netscape 4 pushes the limits of frustration sometimes, but hopefully
    that particular nightmare will fade with the release of version 6)

    --
    Colm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center