Solved

I Need To Print Web Pages As They appear Onscreen

Posted on 1997-05-09
3
1,143 Views
Last Modified: 2006-11-17
I'm currently using a program that runs on Delphi2, and this program contains an ActiveX Internet Browser tool that lets the user view web pages on the WWW. I've built a "Print" option to allow the user to print any web-page he/she likes, but at the moment all I'm getting is the source code being printed out, is there anyway I could print the web-page as it appears on the screen rather than the source code ???.... here's the procedure I'm using, any suggestion would be greatly appreciated.....




procedure TfrmWebMain.Print1Click(Sender: TObject);
var
  MyFile: TextFile;
begin
  if printdialog1.execute then begin
    AssignPrn(MyFile);
    Rewrite(MyFile);
//    Writeln(MyFile, DocSourceFrm.Memo1.Lines[0]);
    Writeln(MyFile, HTML1.SourceText);
    System.CloseFile(MyFile);
  end;
end;
0
Comment
Question by:zuuec
  • 2
3 Comments
 
LVL 2

Expert Comment

by:kolarb
ID: 1336072
It is obvious from the code you are getting the source code (HTML1.SourceText). Please let me now which component are you using to do this.

I can offer you an answer for using the Microsoft's ActiveX Internet Explorer component and printing the pages exactly as they should appear with Delphi2 or Delphi3.
0
 

Author Comment

by:zuuec
ID: 1336073
Hi There Kolarb,

           I don't exactly know what the component I'm using is called, but I do that it is an ActiveX Internet Browsing tool. I hope the code below for the component helps in anyway, send me what you know, even if it might not be what I need, perhaps I can try it out. Thank you for your time...

       zuuec@westminster.ac.uk

0
 
LVL 2

Accepted Solution

by:
kolarb earned 50 total points
ID: 1336074
OK - here it is - the most simple way.

Get Delphi3, look into demos/cool
they've done it all for you...
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
delphi exception 7 64
Delphi Firemonkey Need Sample for Online Shopping Example. 2 145
Base1 Encode/Decode 3 77
Tvertscrollbox like a whatsapp layout delete messages 1 19
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…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

831 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