trichview.support
Re: page setup and margins |
Author |
Message |
Sergey Tkachenko |
Posted: 12/06/2004 14:20:19 Well, theoretically it's possible to set all RVPrint's margins to 0 and use only TRichView's margins (modified by TRVRuler). The only problem is taking "physical offsets" into account - outermost areas on paper where the printer cannot print. But I am not sure if it makes sense. WYSIWYG printing is not supported yet, documents cannot be displayed in the editor exactly like on the page. Only an approximation is possible. Taking it into account, plus impossibility of zooming in editor, I do not understand why users may need large margins in TRichViewEdit. It's possible to force TRichViewEdit to use the fixed screen resolution, for example 96. You can do it by assigning RichViewPixelsPerInch := 96; // defined in RVFuncs unit RVStyle1.TextStyles.PixelsPerInch := 96; > > Sergey, > > First, I am very pleased with TRichView, your documentation and support, > and the ease of moving my complex code from another word processing component. > Just wanted you to know ... :-) > > I am trying to understand how to work with the layout features of TRichViewEdit. > I have read various newsgroup posts and examined the documentation. I realize > that the margins for the page setup and the margins for TRVRuler measure > different things and are additive. For example, if the left margin of RVPrint > is set to 10 mm and the LeftMargin of TRichViewEdit is set to 15 mm, the > resulting printed document will have a combined left margin of 25 mm. > > Based on this understanding, do you have any recommendations as to how I > can make this function for the user more like a typical word processor? I > don't mind doing calculations in code. To work like other applications, what > the user sees in page setup should be the same as what is on the ruler. If > the user sets the left margin in page setup to 30 mm, then it should show > the same in the ruler. > > In concept, this seems easy. But in practice, I know there are issues in > converting pixels to mm, screen resolution differences, etc. My thought is > to set the margins in RVPrint to equal those on the ruler when the page setup > dialog is opened and then reset the ruler margins when it is closed. I would > always keep the RVPrint margins at zero (unless of course the dialog is opened). > > The other issue is the MinTextWidth. Since this value as well as left/right > margins are saved as pixels, and screen resolutions can differ, I am not > sure how and what to save in a document so that when it is opened on another > computer it looks the same. > > Could you give me some guidance on these issues? How would you best accomplish > this if you were in my position? > > Mike |
Powered by ABC Amber Outlook Express Converter