|Top Previous Next|
Assigns the specified document for using as a header.
(introduced in version 17)
Header – document which will be used as a header (of the type specified in HFType);
HFType – header type (normal/for the first page/for even pages).
This header will be used when saving and loading files and streams. It will not be used for printing, use TRVPrint.SetHeader for assign headers for printing.
▪Header will be saved together with the main document in RVF;
▪Header will be saved together with the main document in RTF and DocX, if rvrtfSaveHeaderFooter is included in RTFOptions;
▪when loading RVF or RTF containing a header of this type, it will be read in Header;
Each document assigned as a header/footer must be linked to each own TRVStyle component. Values of UseStyleTemplates must be the same for the main document and all headers and footers. UseStyleTemplates = True, MainRVStyle of RVStyles of headers and footers must be equal to RVStyle of the main document (to allow them using the same collections of StyleTemplates).
RichView1.RTFReadProperties.ReadDocParameters := True;
RichView1.Format; // contains document
RichView2.Format; // contains header
if RichView2.ItemCount>0 then
RVPrint1.Print('Doc with header', 1, False);
See also properties of TRVStyle:
TRichView © trichview.com