|
|
Top Previous Next |
|
This component allows printing TRichView, TRichViewEdit, TDBRichView, or TDBRichViewEdit. It is Invisible at run-time. Unit PtblRV; Syntax TRVPrint = class(TCustomRVPrint) Hierarchy TObject TPersistent TComponent How to Use
Events You can display some information about the process of repaginating and printing:
You can draw additional content using the following events:
Margins There are four properties: LeftMarginMM RightMarginMM, TopMarginMM,BottomMarginMM.
This picture illustrates the meaning of margin properties. Paragraph indents are not shown for simplification. LeftMarginMM, RighMarginMM, TopMarginMM, BottomMarginMM are measured in millimeters (shown in red). TRichView.LeftMargin, TRichView.RightMargin, TRichView.TopMargin and TRichView.BottomMargin are measured in "screen pixels" (they are recalculated according to the printer resolution, and margins on the page look like margins on the screen; shown in blue). Left and right margins can be swapped for even pages, if MirrorMargins is set to True. See also ClipMargins property. Headers and Footers The current implementation of headers and footers is preliminary. It allows to print the same header and footer on all pages. Any RichView document can be assigned as a header or footer. Positions of header and footer are defined by HeaderYMM and FooterYMM.
If header and/or footer is too long, size of the main document is adjusted to avoid overlapping:
If you want different header / footer for different pages, consider:
See also: GetHeaderRect, GetFooterRect. Document inside RVPrint RVPrint contains an instance of TPrintableRV (descendant of TRichView) inside. This variable (named rv) is public and you can change some properties of it:
Changing other its properties is not recommended. Example: MyRVPrint.rv.Color := clWhite; Note: this richview does not contain the full information about the printed document, just a formatting information; so you must provide that source RichView is not destroyed while you are printing. Tips and Tricks See http://www.trichview.com/forums/viewtopic.php?p=250. See Also See also:
Demo projects:
|