How to print pdf document.

Discussion in 'ASP .Net' started by Yuriy, Oct 27, 2003.

  1. Yuriy

    Yuriy Guest

    Hello! I need to print PDF Document by clicking a button
    on .aspx page. The PDF should be printed on client printer
    without displaing it on the window. I tried Process
    namespace but it doesn't work.
    Please, help! Thank you.
     
    Yuriy, Oct 27, 2003
    #1
    1. Advertising

  2. You cant print directly to a clients printer from asp.net - printers belong
    to client side, and asp.net is server side. All you could do is feed the
    PDF to the browser and hope the user printed it. Can you imagine the chaos
    if we could all issue print jobs to each others printers without them doing
    anything.
    --
    Regards

    John Timney (Microsoft ASP.NET MVP)
    ----------------------------------------------
    <shameless_author_plug>
    Professional .NET for Java Developers with C#
    ISBN:1-861007-91-4
    Professional Windows Forms
    ISBN: 1861005547
    Professional JSP 2nd Edition
    ISBN: 1861004958
    Professional JSP
    ISBN: 1861003625
    Beginning JSP Web Development
    ISBN: 1861002092
    </shameless_author_plug>
    ----------------------------------------------

    "Yuriy" <> wrote in message
    news:019b01c39cb4$0e2cf6e0$...
    > Hello! I need to print PDF Document by clicking a button
    > on .aspx page. The PDF should be printed on client printer
    > without displaing it on the window. I tried Process
    > namespace but it doesn't work.
    > Please, help! Thank you.
     
    John Timney \(Microsoft MVP\), Oct 27, 2003
    #2
    1. Advertising

  3. John is right. you can not print using Asp.net... But here
    comes javascript to the rescue :).. But I only know how to
    ddo it with html pages. You still have to find out how to
    aadecuate this to pdfs.

    <script language="Javascript1.2">
    <!--
    function printpage() {
    window.print();
    }
    //-->
    </script>

    Make a button or call this script directly from your page.
    >-----Original Message-----
    >You cant print directly to a clients printer from

    asp.net - printers belong
    >to client side, and asp.net is server side. All you

    could do is feed the
    >PDF to the browser and hope the user printed it. Can you

    imagine the chaos
    >if we could all issue print jobs to each others printers

    without them doing
    >anything.
    >--
    >Regards
    >
    >John Timney (Microsoft ASP.NET MVP)
    >----------------------------------------------
    ><shameless_author_plug>
    >Professional .NET for Java Developers with C#
    > ISBN:1-861007-91-4
    >Professional Windows Forms
    > ISBN: 1861005547
    >Professional JSP 2nd Edition
    > ISBN: 1861004958
    >Professional JSP
    > ISBN: 1861003625
    >Beginning JSP Web Development
    > ISBN: 1861002092
    ></shameless_author_plug>
    >----------------------------------------------
    >
    >"Yuriy" <> wrote in message
    >news:019b01c39cb4$0e2cf6e0$...
    >> Hello! I need to print PDF Document by clicking a button
    >> on .aspx page. The PDF should be printed on client

    printer
    >> without displaing it on the window. I tried Process
    >> namespace but it doesn't work.
    >> Please, help! Thank you.

    >
    >
    >.
    >
     
    Esteban Felipe, Oct 27, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. keto
    Replies:
    0
    Views:
    1,049
  2. Pascal
    Replies:
    0
    Views:
    433
    Pascal
    Oct 24, 2008
  3. Martin
    Replies:
    1
    Views:
    287
    Bullschmidt
    Oct 5, 2005
  4. Ricardo Pog
    Replies:
    1
    Views:
    491
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    431
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page