Solved

TWebBrower and Printing

Posted on 2001-09-03
4
385 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

623 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