Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Printing to non default printer from ASP.NET Page [modified]

Printing to non default printer from ASP.NET Page [modified]

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelpquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Steve Messer
    wrote on last edited by
    #1

    I am trying to print to a receipt printer during our payment process. The printer is not the default printer and I can't change that. The problem is that from the browser you don't have permission to programatically get a list of printers and select which one you want. So, currently we pop up the Print dialog then select the desired printer and then click ok. This is two steps too many. How can you get around this limitation and automate the printing of the receipt?

    modified on Friday, June 6, 2008 11:29 AM

    C V 2 Replies Last reply
    0
    • S Steve Messer

      I am trying to print to a receipt printer during our payment process. The printer is not the default printer and I can't change that. The problem is that from the browser you don't have permission to programatically get a list of printers and select which one you want. So, currently we pop up the Print dialog then select the desired printer and then click ok. This is two steps too many. How can you get around this limitation and automate the printing of the receipt?

      modified on Friday, June 6, 2008 11:29 AM

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      No, you cannot. As you said, in javascript, you can kick off the printing process, but you can't interact with it.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      S 1 Reply Last reply
      0
      • S Steve Messer

        I am trying to print to a receipt printer during our payment process. The printer is not the default printer and I can't change that. The problem is that from the browser you don't have permission to programatically get a list of printers and select which one you want. So, currently we pop up the Print dialog then select the desired printer and then click ok. This is two steps too many. How can you get around this limitation and automate the printing of the receipt?

        modified on Friday, June 6, 2008 11:29 AM

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        The default JavaScript does not have the privileges of choosing a printer. You may need an ActiveX Solution to do that. Check out ScriptX, the basic version of which is free. I also have a small review of the same over here: http://www.dotnetspider.com/resources/3147-Software-Review-Granular-Print-Control-wi-Inte.aspx[^]

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        All the world's a stage, And all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts... --William Shakespeare

        1 Reply Last reply
        0
        • C Christian Graus

          No, you cannot. As you said, in javascript, you can kick off the printing process, but you can't interact with it.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          S Offline
          S Offline
          Steve Messer
          wrote on last edited by
          #4

          So, I guess we could create a client side windows web service which accepts the html and then have the web page post to it and then it could do the printing.

          C 1 Reply Last reply
          0
          • S Steve Messer

            So, I guess we could create a client side windows web service which accepts the html and then have the web page post to it and then it could do the printing.

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Well, a client side app that calls a web service, yes, that would work. Or an ActiveX control perhaps.

            Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            S 1 Reply Last reply
            0
            • C Christian Graus

              Well, a client side app that calls a web service, yes, that would work. Or an ActiveX control perhaps.

              Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              S Offline
              S Offline
              Steve Messer
              wrote on last edited by
              #6

              Yes, I didn't what to do an ActiveX control but either way it is a client side solution. thanks for your input.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups