Removing Header space on second page ?

  • Hi,

    When a user suppresses the header/footer after the first page ( i.e. PrintParameter.PrintHeaderFooter := wprOnlyOnFirstPage ) they find that the first page shows the header OK and the remaining pages have white space matching the header size.

    If the header is the equivalent of 25 lines then that is 25 less lines on every subsequent page

    Is there any way to remove or simply not print the "white space" i.e. set the header size to zero after the first instance ?

  • Zitat von wpsupport

    Did you try my suggestion?

    Yes finally got all the code moved from WPTools3.xx but still no joy with this problem - as an alternative is there any event to indicate a header has been printed within the RTF ?

    This is the latest snippet I'm using ( wprtDocument is of type TWPRichText and GlobalOptions.SuppressHeadersAfterFirstPage is a user-selectable option ) :

    if GlobalOptions.SuppressHeadersAfterFirstPage then
    begin
    wprtDocument.HeaderFooterTextRange := wpraOnAllPages;
    wprtDocument.WorkOnText := wpHeader;
    wprtDocument.InputText(' ');

    wprtDocument.HeaderFooterTextRange := wpraOnFirstPage;
    wprtDocument.WorkOnText := wpHeader;
    end
    else
    begin
    wprtDocument.HeaderFooterTextRange := wpraOnAllPages;
    wprtDocument.WorkOnText := wpHeader;
    end;

    <set text and images for main header here>

  • Sorry Julian but as I said we have now gone from WPTOOLS 3 to 4.09 and when trying your suggestion using

    HeaderFooterTextRange := wpraOnAllPages;
    WorkOnText := wpHeader;
    InputText(' ');

    vs

    HeaderFooterTextRange := wpraOnFirstPage;
    WorkOnText := wpHeader;
    <some code to fill the real header >

    we got the same result as before - I'm sure I'm doing something very silly but I'm not sure what

  • Still no joy - currently i've got this in the FormCreate of the form which has the TWPRichText

    I've assumed it is better to try and set the odd/even headers to a space right at the start before loading the main header. Is this correct ?