WPCubed Product Support

How to detect auto page breaks?

Hello,

is there a way to detect auto page breaks in Wptools5?

I'm looking for (listAutoNewPage in line^.state),
which was available in Wptools4.

sincerely
Michael

#1 ♥ 0
11.8k Views 2 users read 2 min

Michael,

As with all my responses here, I'm issuing a blanket disclaimer: Until Julian gives the CORRECT answer, this may well not be the best way, or even the answer to your question, but feel free to give it a try!

var
  par                  : TParagraph;

begin
    with WPRichText1 do  begin
       par := FirstPar; // using FirstPar here 'cause it uses wpIsBody, not ActiveFirstPar, which is ActiveText-based
        while(              par <> nil            ) do begin
          if(        par.IsNewPage           ) then begin
            // do whatever you want in here
          end;

          par := par.next;
        end;
    end;         // ( of with WPRichText1 do  begin )
end

I hope this is of some help to you.

Regards,
richard diamond

#2 ♥ 0

Richard,

thanks for the quick response.
Unfortunately, your code only find manual page breaks with #12.

I'm interested in the generated page breaks,
if there is no place left for the text/paragraph on current page.

My code, based on Wptools 4.09, contains a lot of dynamical created
text. I need this information for long tables on several pages with
repeated header lines and header rows on each page as well as
calculating paragraphs, which have to keep together or split it logically.
I assume, your WPAT_ParKeepN isn't flexible enough.

Regards,
Michael Ullmann

#3 ♥ 0
This category is archived. No new posts are possible.