Link to home
Start Free TrialLog in
Avatar of dvk
dvk

asked on

TWebBrower and Printing

Hi,

I have added a TWebBrower to my app and i want to print the contents of it.  Any Ideas?

Ta.
Avatar of inthe
inthe

you can print like ths:


var
In,Out : OleVariant;
begin
if assigned(webbrowser1.document) then
 WebBrowser1.ExecWB(OLECMDID_PRINT,OLECMDEXECOPT_DONTPROMPTUSER,In,Out)
else
showmesage('no document to print');
end;
ASKER CERTIFIED SOLUTION
Avatar of inthe
inthe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dvk

ASKER

That worked, thanks.  Is there any way to control the formatting, page headers etc.

hi,
not that im aware of from twebbrowser ,there have been several unanswered questions about that before cause if you call the print dialog it doesnt seem to take effect.
im quite sure that the embeddedwb has options for that stuff ,if your interested its at:
http://www.euromind.com/iedelphi/embeddedwb.htm

yep its documented at:

http://www.euromind.com/iedelphi/embeddedwb/printproperties.htm


embeddedwb is a far supperior twebbrowser than the standard one (can be installed along side it for comparisons),i would really recommend it,i use it for testing stuff instead of twebbrowser it saves alot of "workaround" coding.there ar several "bugs" in twebbrowser especially with the message handling.

Regards Barry