Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6178089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:24:15+00:00 2026-05-24T00:24:15+00:00

I am printing an HTML file by using the WebBrowser Control, but I want

  • 0

I am printing an HTML file by using the WebBrowser Control, but I want to force it to print landscape. I thought the following might do the trick but it didn’t

Dim ps As New System.Drawing.Printing.PrinterSettings
ps.DefaultPageSettings.Landscape = True
WebBrowser1.ShowPrintDialog()

Is there any way of doing this that doesn’t resort to SetPrinter APIs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:24:16+00:00Added an answer on May 24, 2026 at 12:24 am

    This is not possible. While the user is capable of setting printer settings (and even able to select a different printer) using the user interface, this is not possible programatically.

    Some “hacks” exist where users set values in the registery directly (for the Internet Explorer keys), but mistakes here could be problematic.

    Refer to the following Microsoft Knowledge base article: http://support.microsoft.com/kb/313723
    Also a connect issue on this: https://connect.microsoft.com/VisualStudio/feedback/details/678232
    And another related StackOverflow question: How do I programatically change printer settings with the WebBrowser control?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I am using C# WPF webbrowser control to show html file in my
I want to print using php_printer.dll. I have no problem printing a simple text
M using the following code for printing but if there are some long lines
I have successfully implemented printing and print preview for my app using the PrintDocument,
I get a strange syntax error in Firefox 3.0.10/Leopard when using the following html/css:
I have to read a file using servlet.here is the code iam using.but file
I am generating the html using JSON file. Now I need to pass data
When printing RFC documents on my A4 format printer I noticed that I print
When printing a report, the user sometime have the following error: CrystalDecisions.CrystalReports.Engine.LogOnException: Error in
I just added printing capability to a web site using a style sheet (ie.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.