Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TWebBrower and Printing

Posted on 2001-09-03
4
Medium Priority
?
389 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 400 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

715 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