pagination problem

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
palmeira
Posts: 139
Joined: Mon Sep 12, 2005 10:18 pm

pagination problem

Post 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
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
palmeira
Posts: 139
Joined: Mon Sep 12, 2005 10:18 pm

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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?
palmeira
Posts: 139
Joined: Mon Sep 12, 2005 10:18 pm

Post 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.
palmeira
Posts: 139
Joined: Mon Sep 12, 2005 10:18 pm

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, in ScaleRichView you should assume that resolution is 96.
It is independent of screen or device resolutions.
Post Reply