Problems with header and footer.

  • Hi,

    I'm trying to print an invoice with TWPRichtText (WPAll).
    In WPAll I first put a header with WPAll.AssingToHeader(WPHeader, wpraOnFirstPage).
    After that I put a footer with WPAll.AssingToFooter(WPFooter, wpraOnLastPage).
    At last I put about 50 article-lines with WPAll.FastAppendText(WPLine, false).
    When printing, the invoice takes 2 pages.
    The problem is: On the first-page is no footer, but the last article-lines are printed in the area, reserved for the footer. On the second page there is no header, but the first article-lines are printed in the area reserved for the header. Pre-printed paper is used. Name and logo of the company are still on the paper in de header-area, so WPAll must not print in there. How can I force WPAll to print the article-lines only in the body-area?

    Regards,
    Dirk.

  • Hi.

    I've added now two times "WPAll.ReformatAll" before printing, but with the same result.

    But, this way of printing isn't wrong, when blank paper is used. Then it's ok. In my case I use pre-printed paper where in the header allready a componies-logo is printed and an area is reserved for printing the customer's address, invoice-number and the like. In the footer an area is reserved for printing de invoice-mount, VAT-amounts and the like. So, my paper has "fisically" a header, body and footer, thus the header, body end footer form WPAll has all te be printed on the right place.
    Is it a certain property I have to set?, or isn't is possible at all?

    And sorry, I forgot: I'm using Delphi5.

    Regards,
    DirkR

  • Hi,

    Since my last post I continued to solve my problem.
    Now I see, I can set the margins of header, body and footer separately with WPAll.Header.TopMargin, ...BottomMargin and the like. That gives me what I wanted. So this problem is solved.
    Thanks for looking to it.

    Regards,
    Dirk.