WPCubed Product Support

PDF file as watermark

Hi,

Is there a possibility to have a PDF file as watermark of a WPRichText ?

Thanks,
Attila

#1 ♥ 0
11k Views 4 users read 2 min

Try emailing support directly. Julian doesn't visit here quite as often as we would like but a direct email generally works for me.

If you get a solution post it back here for the rest of us.

#4 ♥ 0

I did as you suggested... I'll let you know if I get an answer

#5 ♥ 0

and here is the answer I've got from Julian :

Yes. You need our component WPViewPDF fot this.

Here I would recommend to extract the PDF as PNG file and paint in in the >background of a TWPRichText as usual. (See Tasks\Watermark)

#6 ♥ 0
support

Hi,

WPTools does not read PDF directly. But it is very easy to render a PDF as a watermark using WPViewPDF:

uses WPViewPDF3;

....

var WPViewPDF : TWPViewPDF;

procedure TForm1.FormCreate(Sender: TObject);
begin
   WPViewPDFLoadDLL( 'wPDFViewDemo03.dll' );
   WPViewPDF := TWPViewPDF.Create(Self);
   WPViewPDF.Visible := false;
   WPViewPDF.Parent := Self;
end;

procedure TForm1.LoadPDFClick(Sender: TObject);
begin
  if OpenDialog1.Execute then
  WPViewPDF.LoadFromFileAsCopy(OpenDialog1.Filename);
end;

procedure TForm1.WPRichText1PaintWatermark(Sender: TObject;
  RTFEngine: TWPRTFEnginePaint; toCanvas: TCanvas; PageRect: TRect;
  PaintPageNr, RTFPageNr: Integer; WaterMarkRef: TObject; XRes,
  YRes: Integer; CurrentZoom: Single; PaintMode: TWPPaintModes);
begin
  WPViewPDF.PrintHDC(0,
    toCanvas.Handle,
    XRes,YRes);
end;
#8 ♥ 0
This category is archived. No new posts are possible.