WPTools 5: Watermark missing when using wPDF
27.1k Views
2 users
read 1 min
When I try your code on TWPLetterHeadEdit.WPRichTxt1PaintWatermark
I get "Stack Overflow" in WPRTEPaint.pas
Is there any other information I can provide you with to solve to problem.
Thanks
-Dennis
#3
♥ 0
With this OnPaintWatermark event handler it should work fine:
procedure TWPLetterHeadEdit.WPRichText1PaintWatermark(Sender: TObject;
RTFEngine: TWPRTFEnginePaint; toCanvas: TCanvas; PageRect: TRect;
PaintPageNr, RTFPageNr: Integer; WaterMarkRef: TObject; XRes,
YRes: Integer; CurrentZoom: Single; PaintMode: TWPPaintModes);
begin
if wppInPaintForwPDF in PaintMode then
WPLetterhead.PaintPageOnCanvas(0,
0, 0, 0, 0, toCanvas, [wppInPaintForwPDF],
WPScreenPixelsPerInch, WPScreenPixelsPerInch, -1, -1, [])
else
WPLetterhead.PaintPageOnCanvas(0,
0, 0, 0, 0, toCanvas, [],
XRes, YRes, -1, -1, [wpNoViewPortAPI]);
end;
Julian
#2
♥ 0
I am using project "LetterHead" from WaterM3 in this example found in the Demos.
I use some graphics on the LetterHead.
I add the wppdfexport component, link it to LetterHead - the outputted PDF file shows exactly the same as the LetterHead.
If I change the link to the Letter - the outputted PDF file show only the letter - Not the letter and the LetterHead.
How can this be solved?
Best regards Dennis
#1
♥ 0