Solved

TWebBrower and Printing

Posted on 2001-09-03
4
378 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
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: …

743 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

11 Experts available now in Live!

Get 1:1 Help Now