Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ie5 browser ocx Properties

Status
Not open for further replies.

ascht

Programmer
Sep 22, 2000
43
CH
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top