How to separate srichviewedit To pages

General TRichView support forum. Please post your questions here
Post Reply
nadirakyildiz
Posts: 12
Joined: Thu May 21, 2009 8:38 am

How to separate srichviewedit To pages

Post by nadirakyildiz »

Srichviewedit has 29 pages. I find special cracters on it then convert to some long text.
But every page gets empty line on begining of the document because of my external edition. Generally pages contains 15 lines of text

Code: Select all

For Example, Is there any way to do that; 
for i:=0 to srichviewedit.PageCount do
begin
srichviewedit.Pages[i].SaveToStream(MS);// save only i page then run with only this page
end;
Sergey Tkachenko
Site Admin
Posts: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

There is no method for saving pages. We can consider add it, but we want to know what you really need.
Can you explain what you want to implement, may be we can suggest a simpler solution.
nadirakyildiz
Posts: 12
Joined: Thu May 21, 2009 8:38 am

Post by nadirakyildiz »

Code: Select all

---------------------------------------------------------
-- Something	   - : -	[AddingTextInRunTime]   -
-- Something 2	 - : -	[AddingTextInRunTime2]  -
-- Something 3	 - : -	[AddingTextInRunTime3]  -
--------------------------------------------------------- (This is a Table :S )
    Blaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Blaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  • [AddingTextInRunTime]= include 5 line Text
  • [AddingTextInRunTime2]= include 8 line Text
  • [AddingTextInRunTime3]= include 2 line Text
As the variables that are written to the cells contains different length of texts and the cells that I designed before are designed as single line when the variables are begin printing the pages begin to go down by each extra line required for each variable.

I mean I designed the 5th header at the top of the 5th page but when I run the program 5th header begins at the middle of the page and the sliding of the pages continues growing with each variable.

Is there a way to prevent this sliding?
  • The other explanation
The cell variables contents/line counts is different length from I prepared before. I designed pages, cells of Tables have 1 line and I typed the variables then add some information about the page. This page is done and I add page break then continue to second page and the others.

In runtime, I open the file and Replace the variables to long text that includes 5 or 8 lines text. After the Replacing process page count increase cause that includes 5 or 8 lines text. In design time every page has a header that position of beginning of page but in run time (After the variable replacing) header position shifted and other page headers nearly middle of the page.
Sergey Tkachenko
Site Admin
Posts: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, I do not understand: if a "header" has a page break before it, how can it be at the middle of a page?
Do you mean a real, explicit pagebreak (PageBreaksBeforeItems[ItemNo] = True)?
nadirakyildiz
Posts: 12
Joined: Thu May 21, 2009 8:38 am

Post by nadirakyildiz »

there is an example for my problem

Code: Select all

http://rs684.rapidshare.com/files/263137251/problem.zip
thanks
Best Regards
Sergey Tkachenko
Site Admin
Posts: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

In this situation, making pagebreaks by adding empty lines is obviously a bad solution, while adding page breaks (Ctrl+Enter) is a correct solution.
Unfortunately, search and replace may remove page breaks.
So I suggest to use procedure from mailmerge-text3 example, see http://www.trichview.com/forums/viewtopic.php?t=8
It solves the problem with removing pagebreaks, and, on top of it, it is MUCH faster than search and replace.
I modified your project, see http://www.trichview.com/support/files/temp/problem.zip

PS: As I can see, you repeat the same template page many times. A much better solution is creating only one page of template, and then generate multipage document basing on it. See the same demo (mailmerge-text3) how to do it.
nadirakyildiz
Posts: 12
Joined: Thu May 21, 2009 8:38 am

Post by nadirakyildiz »

thanks for all your helps
Best Regards
Post Reply