How to detect an auto page break?

  • 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.

    The codesnipet, sent by richard diamand (FAQ WPTools 5 Upgrade) can only be used to find "storable" information like a manual pagebreak with #12


    Code to find manual page breaks:

    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


    sincerely
    Michael

    • Offizieller Beitrag

    Hi,

    WPTools 5 does not break the lines up like V4 does. In faxct it is possible that one paragraph is used on several pages at once, (think of table header/footer rows)

    The question is what you exactly need to do - maybe it is not necessary anmore to detect the automatic breas and use dynamic header/footer instead or the mentioned table header/footer rows.


    But the TParagraph.Lines array records have a property PageNum. You can use this to detect in a loop if a line is on printed on a different page.

    Julian