Beiträge von walt1957

    The following code causes the range of pages printed for a document to be different from what is printed using just Preview1.WPRichText.Print to print the entire document.

    /////////////////////////////////////////////////////////////////////
    WPPreview1.wpRichText.PrintParameter.PageList := Rangesel.StartPage.text + '-' + Rangesel.LastPage.text;
    WPPreview1.wpRichText.PrintParameter.pageRange := wprPageList;
    WPPreview1.WPRichText.Print;
    /////////////////////////////////////////////////////////////////////


    However, if I do not include the WPPreview1.WPRichText.Print in the same method, and print using a button it prints the pages correctly?????

    This is a very strange behavior!

    I tried using PrintPages(2.2) and it does the same thing. I put a breakpoint in my printfooter(..) method and it does not trigger until page 2.

    If it matters I am doing this from a TWPPreview, but since that uses the WPRichText to print I don't see why that should have any effect.

    Thanks

    Printing a range of pages fails to take into account the header/footer from the skipped pages, therefore printing different text on each page than a full print would do. Is there a workaround for this?