TRVSaveOption, TRVSaveOptions Types

<< Click to display table of contents >>

TRVSaveOption, TRVSaveOptions Types

Unit RVStyle;


  TRVSaveOption = (rvsoOverrideImages,

    rvsoFirstOnly, rvsoMiddleOnly, rvsoLastOnly,

    rvsoDefault0Style, rvsoNoHypertextImageBorders,

    rvsoImageSizes, rvsoForceNonTextCSS, rvsoUseCheckpointsNames,

    rvsoMarkersAsText, rvsoNoDefCSSStyle, rvsoInlineCSS,


    rvsoXHTML, rvsoUTF8, rvsoHeaderFooter);

  TRVSaveOptions = set of TRVSaveOption;

Options for HTML export. Used for the parameter of SaveHTML, SaveHTMLEx, SaveHTMLToStream, SaveHTMLToStreamEx.

Options for saving images, both for SaveHTML, SaveHTMLEx




If set, TRichView can override existing images.

If not set, TRichView will generate unique names for images.


By default, browsers add borders around hypertext images. This option suppresses borders for hotspots and hot-pictures.


If set, TRichView saves widths and heights of images in HTML explicitly.

This option provides more smooth (and sometimes faster) loading by browsers.

This option does not affect pictures having defined rvepImageWidth and/or rvepImageHeight item extra integer properties. Sizes are always saved for such images.

You can override this setting for the specific item using rveoNoHTMLImagesSize item extra integer properties .


If included, images with defined (non-empty) file names will not be saved, but their file names will be written in HTML. If this option is included, OnHTMLSaveImage and OnSaveImage2 events have initial value of the Location parameter equal to the image file name.

File names for items are defined via rvespImageFileName string property.


If included, a header is saved at the beginning of HTML document, and a footer is saved at the end. Headers and footers are defined by SetHeader/SetFooter methods.

If DocParameters.TitlePage = True, the component uses a header and a footer for the first page. Otherwise, a normal header and footer are used.

For SaveHTMLEx, headers and footers are always use inline CSS (as if rvsoInlineCSS is included).

Options for saving list markers, both for SaveHTML, SaveHTMLEx




If included, paragraph lists are saved as normal text or images. Usually, HTML files saved with this option look closer to the original document.

If not included, lists are saved as <ul> and <ol> HTML tags.

If rvsoMarkersAsText is not included

Export using CSS (SaveHTMLEx); CSS of lists are inserted directly in HTML:

rvlstBullet, rvlstUnicodeBullet exported as bullets with default markers (disc, circle or square). FormatString and Font are ignored;

rvlstDecimal,rvlstLowerAlpha,rvlstUpperAlpha,rvlstLowerRoman,rvlstUpperRoman exported as lists with the proper numbering. FormatString and Font are ignored;

rvlstPicture,rvlstImageList,rvlstImageListCounter exported as a bullet with picture. It's possible to change default image saving by OnHTMLSaveImage;

indents are saved, but not very accurately.

Export without CSS (SaveHTML):

rvlstBullet, rvlstUnicodeBullet,rvlstPicture,rvlstImageList exported as bullets with default markers (disc, circle or square). FormatString, Picture, ImageList and Font are ignored;

rvlstDecimal,rvlstLowerAlpha,rvlstUpperAlpha,rvlstLowerRoman,rvlstUpperRoman exported as lists with the proper numbering. FormatString and Font are ignored;

rvlstImageListCounter saved as a decimal numbering;

indents are not saved.

If rvsoMarkersAsText is included

Markers are saved without special HTML keywords for lists (like <ol>, <ul>, <li>).

Font and format strings settings are respected.

Saving without CSS (SaveHTML): all indents are ignored.

Saving with CSS (SaveHTMLEx): LeftIndent and MarkerIndent are retained. FirstIndent are retained for non-hanging markers only (MarkerIndent>=LeftIndent)..

Generally, HTML files saved with this option look closer to the original.

Other options, both for SaveHTML, SaveHTMLEx




Checkpoints' names are used instead of checkpoint indices. Recommended.


If included, XHTML is saved instead of HTML


If included, Unicode (UTF-8) HTML file is saved. Highly recommended for multilingual documents.


If set, no formatting will be saved for text of the 0-th style (TextStyles[0]).

Browsers will use a default font for it.

This option affects the appearance of all styles, because only attributes different from attributes of the 0th style are saved.

Options for SaveHTML




CSS is used for exporting non-text items. This option allows to retain colors of breaks and layout of tables saved with SaveHTML (without using CSS for text and paragraph styles).

Note: SaveHTMLEx always uses CSS in this case.

Options for SaveHTMLEx




By default, SaveHTMLEx assigns attributes of TextStyles[0] to <body> and <table>, and attributes of all other styles are saved relative to attributes of TextStyles[0].

If you include this option, TextStyles[0] will be treated like any other style. The same for ParaStyles[0].

It's not recommended to use this option: it generates much larger CSS and HTML.

This option is useful if HTML generated by TRichView is used as a part of larger HTML, and you do not want to change properties of <body> and <table>.


If included, CSS is inserted directly in <p>, <span> and <li> tags (instead of generating CSS table at the beginning of HTML).

This option generates highly overbloated HTML. Not recommended.

Options for saving only part of document, both for SaveHTML, SaveHTMLEx

These options are useful when generating HTML documents what will be inserted in larger HTML document.




If set, RichView saves only opening part of HTML
(opens <html> tag, saves full <head> tag, opens <body> tag)


If set, RichView saves only body of HTML document
(content inside <body> tag)


If set, RichView saves closing part of HTML document
(closes <body> and <html> tags)

If none of these three options specified, full HTML document is saved.

You cannot set two or all of these flags at the same time (nothing will be saved in such case).