473,226 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

Printing with the WebBrowser Control

Hi everyone,

Does anyone know how to fix the paper orientation depending on the paper size used when printing with the WebBrowser control please?

What I've got is a HTML file, containing 1 big table of data, created by transforming an XML file using a XSLT file I created in InfoPath (didn't have time to learn XSLT!), the resulting HTML file is fine, except I had to fix the column sizes of the table in cm. Because of this, the table will only fit on A4 Landscape or A3 portrait paper (I know that these are the only 2 paper sizes that'll be used).

Ideally I need the WebBrowser to print using the correct orientation, regardless of what printer and paper size the user chooses!
I have come across a couple of example in the MSDN Library, but they all seem to be in 1 of the dialects of C?

Any help or examples anyone can give would be very much appreciated!
Thanks for your time,

Nov 20 '05 #1
2 4735
* "=?Utf-8?B?Q2hyaXMgQmluZ2hhbQ==?=" <an*******@discussions.microsoft.com> scripsit:
I have come across a couple of example in the MSDN Library, but they
all seem to be in 1 of the dialects of C?

Can you post the links to the samples?

Herfried K. Wagner [MVP]
Nov 20 '05 #2
Hi Herfried,

I got the links from an article in the MSDN Library (The one that comes on CD with VS 2003.Net) called 'Printing with the Internet Explorer WebBrowser Control', that article has some examples, mostly seem to be some from of C like I said before, it also has a VB6 example project, but VS.Net says it needs VB6 installing before it can upgrade and open that 1!

The links for the article are:

Q140285 HOWTO: Modify Printer Settings by Using SetPrinter at http://support.microsoft.com/support.../q140/2/85.asp

Q167345 HOWTO: Modify Printer Settings with DocumentProperties at http://support.microsoft.com/support.../q167/3/45.asp

Q236777 HOWTO: Change Print Settings for Internet Explorer and WebBrowser Control Programmatically at http://support.microsoft.com/support.../q236/7/77.asp

Q188271 HOWTO: Print Contents of the Web Browser Control from VB at http://support.microsoft.com/support.../q188/2/71.asp

Thanks for any help you can give, once I've got this bit sorted I'm home free on this one!
Thanks again,

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: John Bowman | last post by:
Hi, I've been reading through the threads on using the WebBrowser control in C# app's and how to print it's contents. I've got that much working. However, the big problem is I can't figure out...
by: larry mckay | last post by:
I'm trying to programatically print the content that is rendered in an internet explorer control. if do webbrowser.navigate ("http://www.yahoo.com") the content of the webpage appears in the...
by: John Peterson | last post by:
Hello all! I'm at my wits end trying to search for what I assumed to be a relatively straightforward task. I have a Web application written in C#, and I have a button on the form that I want to...
by: eskildb | last post by:
First, please be gently. I am fairly new to the programming world (1.5 years with some expermentation prior to). I have been working on a project that has to print HTML pages with graphics in a...
by: eskildb | last post by:
First, please be gently. I am fairly new to the programming world (1.5 years with some expermentation prior to). I have been working on a project that has to print HTML pages with graphics in a...
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
by: johnb41 | last post by:
I'm using .NET 2.0. My form is displaying the webbrowser control, which is displaying some HTML text. When printing with webbrowser.print(), my printout includes the header and footer. How...
by: nikhilgargi | last post by:
Requirement: I need to provide printing capability in a C# desktop application that I am developing The documents that need to be printed can be in Rich Text Format (RTF) or HTML. Custom...
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.