Printing with the WebBrowser Control

G

Guest

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
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?Q2hyaXMgQmluZ2hhbQ==?= said:
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?
 
G

Guest

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/kb/articles/q140/2/85.asp

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

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

Q188271 HOWTO: Print Contents of the Web Browser Control from VB at http://support.microsoft.com/support/kb/articles/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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top