zuuec
asked on
I Need To Print Web Pages As They appear Onscreen
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(Se nder: 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;
procedure TfrmWebMain.Print1Click(Se
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;
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.