WPTools 5: Watermark missing when using wPDF

Tips for wPDF - please <b>no</b> Questions without Answers! Replies are possible.
itognet
Posts: 8
Joined: Mon Jan 30, 2006 2:09 pm

WPTools 5: Watermark missing when using wPDF

Postby itognet » Mon Jan 30, 2006 2:19 pm

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

wpsupport
Site Admin
Posts: 7384
Joined: Fri Oct 24, 2003 4:06 pm
Contact:

Postby wpsupport » Tue Jan 31, 2006 4:17 pm

With this OnPaintWatermark event handler it should work fine:

Code: Select all

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

itognet
Posts: 8
Joined: Mon Jan 30, 2006 2:09 pm

Watermark missing when using wPDF

Postby itognet » Thu Feb 02, 2006 7:11 pm

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

wpsupport
Site Admin
Posts: 7384
Joined: Fri Oct 24, 2003 4:06 pm
Contact:

Postby wpsupport » Fri Feb 03, 2006 6:15 am

Does not happen in my demo - try WPLetterhead.ReformatAll;


Return to “FAQ wPDF”



Who is online

Users browsing this forum: No registered users and 1 guest