rvico TRichView Reference | TRichView

TCustomRichView.RTFOptions

Top  Previous  Next

Options for saving RTF (Rich Text Format). Some options are used for saving DocX files as well.

type

  TRVRTFOption = (rvrtfSaveStyleSheet,

    rvrtfDuplicateUnicode, rvrtfSaveEMFAsWMF,

    rvrtfSaveJpegAsJpeg, rvrtfSavePngAsPng,

    rvrtfSaveBitmapDefault,

    rvrtfSaveEMFDefault, rvrtfSavePicturesBinary,

    rvrtfPNGInsteadOfBitmap,

    rvrtfSaveDocParameters, rvrtfSaveHeaderFooter);

  TRVRTFOptions = set of TRVRTFOption;

 

property RTFOptions: TRVRTFOptions;

(introduced in versions 1.3, 10, 11)

Note: TRVRTFOption and TRVRTFOptions are declared in RVStyle unit.

Options for RTF

Option

Meaning

rvrtfSaveStyleSheet

Used only if UseStyleTemplates=False. If set (not recommended), RichView saves a style sheet in RTF; this style sheet is created from text and paragraph styles having Standard=True.

If UseStyleTemplates=True, the component always saves Style.StyleTemplates as a style sheet.

rvrtfDuplicateUnicode

If set, RichView saves an ANSI equivalent of Unicode text.

A conversion is based on Charset property of text styles.

Turning off this option increases saving speed and produces smaller RTF file. Unicode-enabled RTF readers just ignore ANSI equivalent of Unicode characters. However, ANSI text is necessary for RTF readers that cannot read Unicode.

rvrtfSaveEMFAsWMF

If set, RichView saves EMF (enhanced (Win32) metafiles) as WMF (Windows (Win3.1) metafiles).

Some RTF readers do not understand EMF in RTF.

rvrtfSaveJpegAsJpeg

If set, RichView saves TJpegImage as JPEG. Otherwise, RichView saves JPEG images in other formats (see below).

Some RTF readers do not understand JPEG images in RTF.

rvrtfSavePngAsPng

If set, RichView saves PNG images (PNG class is registered with RVGraphicHandler.RegisterPngGraphic) as PNG. Otherwise, RichView saves PNG images in other formats (see below).

Some RTF readers do not understand PNG images in RTF.

rvrtfSaveBitmapDefault

If set, RichView saves graphics formats other than bitmaps, metafiles (and optionally Jpegs) as bitmaps. If not set, as WMF or EMF (see below). See also rvrtfPNGInsteadOfBitmap below.

(unfortunately, many RTF reader do not understand WMF with mapping mode = MM_TEXT, which RichView uses for saving other formats; some other RTF readers do not understand bitmaps).

rvrtfSaveEMFDefault

If set (and rvrtfSaveBitmapDefault is not set), RichView saves graphics formats other than bitmaps (and optionally Jpegs) as EMF. If not set, as WMF

rvrtfSavePicturesBinary

If set, pictures are saved in binary format. Less in size (twice), but such RTF becomes a binary file (and cannot be stored in MEMO field of data bases)

rvrtfPNGInsteadOfBitmap

If included, and PNG class is registered with RVGraphicHandler.RegisterPngGraphic, bitmaps are saved as PNG (including saving of non-RTF picture types, if rvrtfSaveBitmapDefault is included). Not all RTF readers understand PNG.

Options for RTF and DocX

Option

Meaning

rvrtfSaveDocParameters

If included, properties of DocParameters are saved in RTF and DocX.

rvrtfSaveHeaderFooter

If included, documents assigned by RTFReadProperties.SetHeader and .SetFooter are saved as a header and footer in RTF and DocX.

Default value

[rvrtfDuplicateUnicode, rvrtfSaveEMFAsWMF, rvrtfSaveJpegAsJpeg, rvrtfSavePngAsPng]

See also methods:

SaveRTF;

SaveRTFToStream;

CopyRTF.

See also:

Saving and loading in RichView;

Pictures.


TRichView © trichview.com