rvico TRichView Reference | TRichView

TCustomRichView.SaveHTML

Top  Previous  Next

Exports TRichView document to HTML or XHTML file, using HTML tags like <font>, <b>, <div>, etc.

function SaveHTML(const FileName, Title, ImagesPrefix: String;

  Options: TRVSaveOptions): Boolean;

This method saves HTML file and a set of images (in separate files).

Files saved by this method can be rendered by the most of HTML applications. But many advanced formatting options are lost. Files saved by SaveHTMLEx look better in modern browsers.

Parameters:

FileName – the name of the output HTML file.

Title – the title of the output HTML file.

ImagesPrefix – the first part of names of images that will be saved with HTML document.

Options – options for saving, see TRVSaveOptions for possible values.

 

By default, inserted controls are not saved. You can save them yourself using OnSaveComponentToFile event.

By default, items tags are saved as targets of hypertext links. You can customize saving using OnWriteHyperlink event.

You can:

completely change HTML code for certain items using OnSaveItemToFile event;

insert additional code in HTML in OnSaveHTMLExtra and OnSaveParaToHTML events;

change how images are saved using OnHTMLSaveImage or OnSaveImage2 event,

insert HTML codes in text.

 

Return value: "successful saving?"

 

See also methods:

SaveHTMLEx;

SaveHTMLToStream.

See also events:

OnWriteHyperlink;

OnSaveComponentToFile;

OnSaveHTMLExtra;

OnHTMLSaveImage;

OnSaveImage2;

OnSaveItemToFile;

OnSaveParaToHTML;

OnProgress.

See also:

Export to HTML;

RichViewSavePInHTML typed constant;

TFontInfo.Options (HTML codes);

Saving and loading.


TRichView © trichview.com