Beiträge von dis_micros

    Is there any attribute either in WPTools or in wPDF which can turn off the graying of the headers ?

    All we are doing to convert for email is this

    WPDF_Start('user', 'password');
    pdf := TWPPDFExport.Create(nil);
    pdf.DLLName := Working_Directory + 'WPDF300A.DLL';
    pdf.Source := wprtDocument;
    try
    pdf.FileName := AdsDataPath + '\' + fDocName + '.pdf';
    pdf.Print
    finally
    pdf.free
    end;

    EMailDocForm.ListBox1.Items.Add(AdsDataPath + '\' + fDocName + '.pdf');

    Note : wprtDocument is an instance of TWPRichText,
    AdsDataPath is the location of the Advantage Database tables used in this product

    We are using WPTools 4.09 and wPDF 3.5 and have a problem that when a document is printed it looks OK similarly when the initial PDF from wPDF is viewed it looks fine but when saved to disk and emailed the text in the header is being rendered in gray

    Initially we thought it might have been a problem with images in the header but even with plain text this graying happens. ( all text colours come out as gray in the PDF header )

    I've tried setting/resetting the ViewOptions flag wpDontGrayHeaderFooterInLayout on the TWPRichText but it seems to have made no difference to the end result

    Is there anything else I can try within the wPDF settings ?

    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 ?

    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

    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>

    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 ?