Page 1 of 1

pagination problem

Posted: Tue Dec 30, 2008 2:43 am
by palmeira
Hi,
I am looking into the possibility of using TScaleRichView in an existing application. I Have linked the component to an external TRichView an TRVStyle, but it resulted in a pagination error that I have not been able to correct.
The component shows some text beetwen the pages, the bottom margin is not respected, and some text is not shown just after the page breaks.
I am using the latest full version of the component.
Any idea about what I am doing wrong? Should I post a screen capture? Thanks in advance,
Alexandre

Posted: Tue Dec 30, 2008 2:23 pm
by Sergey Tkachenko
Linking TSRichViewEdit to external TRichViewEdit may cause this TRichViewEdit to display text incorrectly. But in TSRichViewEdit all must be ok.
A simple project reproducing the problem is preferable.

Posted: Mon Jan 12, 2009 2:14 am
by palmeira
As I tried to isolate the bug, I have found out what was causing the problem: the program was setting the margins of the associated RichViewEdit to zero.
Anyway, I have stumbled upon some possible problems:
a) ScaleRichViews does not use RichViewPixelsPerInch, even when its value is not zero;
b) ScaleRichView is printing the page numbers even when PageNoVisible=false; and
c) The routine DeleteBlankLines (posted in this forum), and some others that change and remove items directly, are causing the error "list index out of bounds."
Is there a workaround for b) ?
All the best, and thanks in advance.

Posted: Mon Jan 12, 2009 10:30 am
by Sergey Tkachenko
It is supposed that margins of this RichViewEdit are changed by ScaleRichView. Do not change them directly.

a) Yes, ScaleRichView always assumes pixels-per-inch = 96, both on screen and on printing. It uses other mechanisms to provide a high resolution output. Actually, it's very convenient to ignore devices resolutions. For providing better RTF output, I recommend to set this variable to 96.

b) Ilya will check this problem

c) These routines must work correctly, providing that you call Format and ClearUndo after them.

Posted: Mon Jan 12, 2009 10:50 am
by Sergey Tkachenko
Ilya said that he could not reproduce the problem with page numers.
He assigned SRichViewEdit1.PageProperty.PageNoVisible = False in the ActionTest, and page numbers disappeared.
Which steps are needed to reproduce the problem?

Posted: Mon Jan 12, 2009 12:17 pm
by palmeira
I found out my mistake: although I was setting the component property to false, I was using the method DrawPage with PageNoVisible set to true (I had forgotten about this argument). Many thanks for your help.

Posted: Thu Jan 22, 2009 3:13 pm
by palmeira
Just to make sure I undestood, I may set RichViewPixelsPerInch=96 even if the screen resolution is 120, and everything will work correctly. Is that so? Thanks.

Posted: Thu Jan 22, 2009 4:07 pm
by Sergey Tkachenko
Yes, in ScaleRichView you should assume that resolution is 96.
It is independent of screen or device resolutions.