473,406 Members | 2,705 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,406 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,

Chris
Nov 20 '05 #1
2 4750
* "=?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]
<http://www.mvps.org/dotnet>
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,

Chris
Nov 20 '05 #3

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

Similar topics

5
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...
3
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...
3
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...
1
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...
1
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...
12
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...
2
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...
0
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...
18
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.