Marges

General TRichView support forum. Please post your questions here
Post Reply
Benoit B.

Marges

Post by Benoit B. »

Hi,

How to code my rtf for TRichPrint understand my marges ?
Currently, I'm writting like that :

Code: Select all

"\\margl"+size
Word know this syntaxe but RichView ignor that.
How to do ?

Thank.
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Margins are not read from RTF files.

There is a temporal solution - you need to compile you application with the define RICHVIEW_DPMARGINS (for example, place {$DEFINE RICHVIEW_DPMARGINS} in RV_Defs.inc - of course, a source code version of TRichView is required)
Margins will be read from RTF in RichView.DocProperties, in stings like
'LeftMarginMM=20'.
You can then assign these values to properties of RVPrint.
Tomas
Posts: 8
Joined: Tue Nov 22, 2005 1:57 pm

Post by Tomas »

Why page margins are not read from RTF by default? Is it some reason for that? Why you have named it as "temporal solution"?

We asking this because we also need read RTF margins in our current app and we are afraid that enabling Margins can cause side effect on TRichView.
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This solution is temporal because DocProperties was designed to store custom user properties, not standard document properties like margins.

Initially TRichView was not designed as WYSIWYG editor, it was assumed that page layout properties are not document but application properties (the same for all documents). What's why TRichViews do not have page layout properties, they are concentrated in TRVPrint component which can be used by many TRichViews.
It will be changed in future.
Post Reply