Adding
pdf.HeaderFooterColor := clNone;
seems to have helped ( found by reading https://www.wpcubed.com/manuals/wpdf/textrendering.htm )
Hope this may be useful to others ;-)
Adding
pdf.HeaderFooterColor := clNone;
seems to have helped ( found by reading https://www.wpcubed.com/manuals/wpdf/textrendering.htm )
Hope this may be useful to others ;-)
We have tried using the wPDF attribute :
pdf.CanvasReference := wprefPrinter;
We have tried at the TWPRichText level by adding wpDontGrayHeaderFooterInLayout into ViewOptions
We still get the greyed headers on saving
Is there anything else we can do ?
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
This "gray on emailing" is becoming more of a problem in that some accounts offices are using it as a reason to delay or refuse payment.
Any help welcome ;-)
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
if GlobalOptions.SuppressHeadersAfterFirstPage then
begin
wprtDocument.HeaderFooterTextRange := wpraOnOddPages;
wprtDocument.WorkOnText := wpHeader;
wprtDocument.InputString(' ');
wprtDocument.HeaderFooterTextRange := wpraOnEvenPages;
wprtDocument.WorkOnText := wpHeader;
wprtDocument.InputString(' ');
wprtDocument.HeaderFooterTextRange := wpraOnFirstPage;
wprtDocument.WorkOnText := wpHeader;
end;
Alles anzeigen
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 wpsupportDid 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 but I'm trying to find a solution for both WPT3 and WPT4 so can such a solution exist ?
Sorry I must be missing something ( or have been looking at code using WPTools3 for far too long :roll: ) but I do not see where/how to create headers for the different page options ?
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 ?