Solved

TWebBrower and Printing

Posted on 2001-09-03
4
380 Views
Last Modified: 2010-04-06
Hi,

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

Ta.
0
Comment
Question by:dvk
  • 3
4 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 6451277
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;
0
 
LVL 17

Accepted Solution

by:
inthe earned 100 total points
ID: 6451281
take a look here for more examples etc:

http://members.home.com/hfournier/webbrowser.htm
0
 

Author Comment

by:dvk
ID: 6452664
That worked, thanks.  Is there any way to control the formatting, page headers etc.

0
 
LVL 17

Expert Comment

by:inthe
ID: 6452708
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

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now