Printing from a web page.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mufasa

    Printing from a web page.

    I have a page where somebody enters some information. On submitting the
    page, I want to take the info, format it 'pretty' and print the page
    automatically for the user.

    Can anybody point me somewhere to look on how to do this?

    Thanks - Jeff.


  • John Timney \(MVP\)

    #2
    Re: Printing from a web page.

    Well you can't automatically print at the clients printer as you have no
    rights to do that - but you could present a formatted PDF for them to print
    if they choose to do that.

    Regards

    John Timney (MVP)




    "Mufasa" <jb@nowhere.com wrote in message
    news:uDZhkdAdIH A.3736@TK2MSFTN GP04.phx.gbl...
    >I have a page where somebody enters some information. On submitting the
    >page, I want to take the info, format it 'pretty' and print the page
    >automaticall y for the user.
    >
    Can anybody point me somewhere to look on how to do this?
    >
    Thanks - Jeff.
    >
    >

    Comment

    • Mufasa

      #3
      Re: Printing from a web page.

      How do web pages do it where they have a button that says 'Print this page'
      ?

      "John Timney (MVP)" <xyz_john@timne y.eclipse.co.uk wrote in message
      news:DpOdnVhSXb 9LOCHanZ2dnUVZ8 vidnZ2d@eclipse .net.uk...
      Well you can't automatically print at the clients printer as you have no
      rights to do that - but you could present a formatted PDF for them to
      print if they choose to do that.
      >
      Regards
      >
      John Timney (MVP)


      >
      >
      "Mufasa" <jb@nowhere.com wrote in message
      news:uDZhkdAdIH A.3736@TK2MSFTN GP04.phx.gbl...
      >>I have a page where somebody enters some information. On submitting the
      >>page, I want to take the info, format it 'pretty' and print the page
      >>automatical ly for the user.
      >>
      >Can anybody point me somewhere to look on how to do this?
      >>
      >Thanks - Jeff.
      >>
      >>
      >
      >

      Comment

      • Mufasa

        #4
        Re: Printing from a web page.

        With that - here's another question -

        If I have a web page that somebody is going to print, how can I put page
        breaks in it to force the print to eject the page?

        I don't even know if I can embed a ^L on the page.

        "John Timney (MVP)" <xyz_john@timne y.eclipse.co.uk wrote in message
        news:DpOdnVhSXb 9LOCHanZ2dnUVZ8 vidnZ2d@eclipse .net.uk...
        Well you can't automatically print at the clients printer as you have no
        rights to do that - but you could present a formatted PDF for them to
        print if they choose to do that.
        >
        Regards
        >
        John Timney (MVP)


        >
        >
        "Mufasa" <jb@nowhere.com wrote in message
        news:uDZhkdAdIH A.3736@TK2MSFTN GP04.phx.gbl...
        >>I have a page where somebody enters some information. On submitting the
        >>page, I want to take the info, format it 'pretty' and print the page
        >>automatical ly for the user.
        >>
        >Can anybody point me somewhere to look on how to do this?
        >>
        >Thanks - Jeff.
        >>
        >>
        >
        >

        Comment

        • John Timney \(MVP\)

          #5
          Re: Printing from a web page.

          You can invoke hte printer dialogue with a single line fo javascript

          <a href="JavaScrip t:window.print( );">Print this page</a>

          But to format the page correctly, you should read up on CSS print

          The page you requested could not be found. Please check the URL and try again or use the search feature above to locate the item. If you are looking for a news item that no longer appears on the site, please visit Tufts Now.


          Regards

          John Timney (MVP)




          "Mufasa" <jb@nowhere.com wrote in message
          news:OZ9nnkIdIH A.2404@TK2MSFTN GP05.phx.gbl...
          With that - here's another question -
          >
          If I have a web page that somebody is going to print, how can I put page
          breaks in it to force the print to eject the page?
          >
          I don't even know if I can embed a ^L on the page.
          >
          "John Timney (MVP)" <xyz_john@timne y.eclipse.co.uk wrote in message
          news:DpOdnVhSXb 9LOCHanZ2dnUVZ8 vidnZ2d@eclipse .net.uk...
          >Well you can't automatically print at the clients printer as you have no
          >rights to do that - but you could present a formatted PDF for them to
          >print if they choose to do that.
          >>
          >Regards
          >>
          >John Timney (MVP)
          >http://www.johntimney.com
          >http://www.johntimney.com/blog
          >>
          >>
          >"Mufasa" <jb@nowhere.com wrote in message
          >news:uDZhkdAdI HA.3736@TK2MSFT NGP04.phx.gbl.. .
          >>>I have a page where somebody enters some information. On submitting the
          >>>page, I want to take the info, format it 'pretty' and print the page
          >>>automaticall y for the user.
          >>>
          >>Can anybody point me somewhere to look on how to do this?
          >>>
          >>Thanks - Jeff.
          >>>
          >>>
          >>
          >>
          >
          >

          Comment

          • siccolo

            #6
            Re: Printing from a web page.

            On Feb 21, 9:24 am, "John Timney \(MVP\)"
            <xyz_j...@timne y.eclipse.co.uk wrote:
            You can invoke hte printer dialogue with a single line fo javascript
            >
            <a href="JavaScrip t:window.print( );">Print this page</a>
            >
            But to format the page correctly, you should read up on CSS print
            >
            The page you requested could not be found. Please check the URL and try again or use the search feature above to locate the item. If you are looking for a news item that no longer appears on the site, please visit Tufts Now.

            >
            Regards
            >
            John Timney (MVP)http://www.johntimney.comhttp://www.johntimney.com/blog
            >
            "Mufasa" <j...@nowhere.c omwrote in message
            >
            news:OZ9nnkIdIH A.2404@TK2MSFTN GP05.phx.gbl...
            >
            >
            >
            With that - here's another question -
            >
            If I have a web page that somebody is going to print, how can I put page
            breaks in it to force the print to eject the page?
            >
            I don't even know if I can embed a ^L on the page.
            >
            "John Timney (MVP)" <xyz_j...@timne y.eclipse.co.uk wrote in message
            news:DpOdnVhSXb 9LOCHanZ2dnUVZ8 vidnZ2d@eclipse .net.uk...
            Well you can't automatically print at the clients printer as you have no
            rights to do that - but you could present a formatted PDF for them to
            print if they choose to do that.
            >
            Regards
            >>
            "Mufasa" <j...@nowhere.c omwrote in message
            >news:uDZhkdAdI HA.3736@TK2MSFT NGP04.phx.gbl.. .
            >>I have a page where somebody enters some information. On submitting the
            >>page, I want to take the info, format it 'pretty' and print the page
            >>automatical ly for the user.
            >
            >Can anybody point me somewhere to look on how to do this?
            >
            >Thanks - Jeff.- Hide quoted text -
            >
            - Show quoted text -
            you may want to try <DIV style="page-break-after:always"></DIVas a
            page break...


            ... more at http://www.siccolo.com/articles.asp ...

            Comment

            • Tanzim Saqib

              #7
              Re: Printing from a web page.

              It has nothing to do about ASP.NET nor server side code. It's accomplished
              by many websites in purely JavaScript way:

              window.print();

              --


              Tanzim Saqib

              B: http://weblogs.asp.net/TanzimSaqib
              W: http://www.TanzimSaqib.com


              "Mufasa" <jb@nowhere.com wrote in message
              news:upijYiIdIH A.1208@TK2MSFTN GP03.phx.gbl...
              How do web pages do it where they have a button that says 'Print this
              page' ?
              >
              "John Timney (MVP)" <xyz_john@timne y.eclipse.co.uk wrote in message
              news:DpOdnVhSXb 9LOCHanZ2dnUVZ8 vidnZ2d@eclipse .net.uk...
              >Well you can't automatically print at the clients printer as you have no
              >rights to do that - but you could present a formatted PDF for them to
              >print if they choose to do that.
              >>
              >Regards
              >>
              >John Timney (MVP)
              >http://www.johntimney.com
              >http://www.johntimney.com/blog
              >>
              >>
              >"Mufasa" <jb@nowhere.com wrote in message
              >news:uDZhkdAdI HA.3736@TK2MSFT NGP04.phx.gbl.. .
              >>>I have a page where somebody enters some information. On submitting the
              >>>page, I want to take the info, format it 'pretty' and print the page
              >>>automaticall y for the user.
              >>>
              >>Can anybody point me somewhere to look on how to do this?
              >>>
              >>Thanks - Jeff.
              >>>
              >>>
              >>
              >>
              >
              >

              Comment

              Working...