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. General Programming
  3. Visual Basic
  4. VB.NET / Printing Webbrowser Control

VB.NET / Printing Webbrowser Control

Scheduled Pinned Locked Moved Visual Basic
helpcsharpcomtutorial
5 Posts 2 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
    Sebastian Br
    wrote on last edited by
    #1

    Hello, I need some help related to printing from .NET's Webbrowser control. I already figured how to print and how to change header/footer, margins and so on ( Some Cool Tips for .NET[^] ). But how I can change the printer that is used for this printjob? I know I could use webbrowser's .ShowPrintDialog() or .ShowPageSetupDialog() methods, but my users shouldn't gambling with this dialogs... they only want printing, without any dialogs, so I must select the printer in my source code. I also know I could change the default printer for exactly the time my printjob is in the pipeline - but that's not fine art, isn't it? That seems to be the ultimate brutal solution, so I would prefer a more elegant solution for my problem. Any suggestions? Thanks for all answers, and I hope I made my problem understandable... - Sebastian

    D 1 Reply Last reply
    0
    • S Sebastian Br

      Hello, I need some help related to printing from .NET's Webbrowser control. I already figured how to print and how to change header/footer, margins and so on ( Some Cool Tips for .NET[^] ). But how I can change the printer that is used for this printjob? I know I could use webbrowser's .ShowPrintDialog() or .ShowPageSetupDialog() methods, but my users shouldn't gambling with this dialogs... they only want printing, without any dialogs, so I must select the printer in my source code. I also know I could change the default printer for exactly the time my printjob is in the pipeline - but that's not fine art, isn't it? That seems to be the ultimate brutal solution, so I would prefer a more elegant solution for my problem. Any suggestions? Thanks for all answers, and I hope I made my problem understandable... - Sebastian

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Is this[^] what you need?

      S 1 Reply Last reply
      0
      • D dan sh

        Is this[^] what you need?

        S Offline
        S Offline
        Sebastian Br
        wrote on last edited by
        #3

        Thanks for your reply, but the article won't help me. I need to specify the printer name via source code.

        D 1 Reply Last reply
        0
        • S Sebastian Br

          Thanks for your reply, but the article won't help me. I need to specify the printer name via source code.

          D Offline
          D Offline
          dan sh
          wrote on last edited by
          #4

          That can be done using PrinterSettings.PrinterName property.

          S 1 Reply Last reply
          0
          • D dan sh

            That can be done using PrinterSettings.PrinterName property.

            S Offline
            S Offline
            Sebastian Br
            wrote on last edited by
            #5

            okay, but how can I assign PrinterSettings to .NET's webbrowser control?

            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