- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


Frequently Asked Questions

Printing a WEB page with the HTML control?

Question:

How do I print a WEB page with the HTML control?

Answer:

Use either the HTML control's AutoPrint method, or 

alternatively use the PrintPage method.



Example using AutoPrint:



uses Printers;



procedure TForm1.Button1Click(Sender: TObject);

var

  OldCur: TCursor;



begin

  OldCur := Screen.Cursor;

  

  with Printer do begin

    BeginDoc;

    HTML1.AutoPrint(handle);

    Title := HTML1.URL;

    EndDoc;

  end;



  Screen.Cursor := OldCur;

end;



* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile