Click to See Complete Forum and Search --> : ie5 browser ocx Properties


ascht
August 22nd, 2001, 06:23 AM
Setting Document/Printer Properties with ie5 browser ocx or with html

I want to print html forms in differen sizes, orintation with the browser control.

I tried three approaches:
1. size and orientation in the .html file
example: <style> @page { size:21.0cm 14.5cm;landscape } </style>
but this needs CSS2 support which the internet explorer does not
-or is there another way?

2. application driven
at the moment i have a small VB sample application that works quit well

WebBrowser.Navigate (AnyUrl)

Private Sub WebBrowser_DocumentComplete(ByVal pDisp As Object, URL As Variant)
WebBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER
End Sub

except for the fact, that i have to configure the printer manually
OLECMDEXECOPT_PROMPTUSER shows the printer dialog but i would rather use
OLECMDEXECOPT_DONTPROMPTUSER and apply the settings programatically

-can i change the settings with VB or do i have to do this in C++ using COM?
-does anyone hav an example.
-i am a C++ programmer with some basic knowledge of MFC.
-but i dont know how to handle IPrint::Print with DEVMODE

3. default printer settings
i also tried to change the printer properties (start/settings/printers)
but the browser just does not use them.
may be there is somewhere a template i could use
internet explorer/ properties / general (tab) / accessibility (button) / user style sheet
-how must a stylesheet look?
-would it work like this? or are these stylesheets only for display?

---------------------------------------------------------------------------------------------------------------------------------------------

Yours Sincerely // Mit freundlichen Grüssen

Theo Portmann
_____________________________________________

Atraxis AG
CEPM
CH-8058 Zurich-Airport

Phone: +41 1 812 28 63
Telefax: +41 1 812 90 31
Telex: ZRHQGSR
E-mail: theo.portmann@atraxis.com

Padma kumar
November 5th, 2001, 06:12 AM
I am in need to use WebBrowser2 control in my dialog (non mfc). sisce this is possible in vb, i trust, it can also be done in VC also. I am using a WinMain SDK application.

sf_everlast
January 16th, 2002, 04:12 AM
Hi Theo,

I am currently having a similar problem with printing web/html reports and wanting to have custom headers/footers. So when I print a three page html page I have a header and footer on each page.

If you found out any info I would appreciate it.

Thanks in advance.

Naz