watermark text on each page

edited 6:55AM in FastReport 4.0
Hello, sorry if it's already asked but i don't find on forum, i found only http://www.fast-report.com/en/forum/index....mp;hl=watermark

i want at runtime add a overlay with a text at bottom of each page, i can found how add it runtime but not what and settings.

is someone havealready make it and can help me?

Thanks.

Comments

  • edited 6:55AM
    no i have buy the pro version, i think i found.

    i must at runtime take size of page and set overlay to, then set my text in overlay, right?
  • gpigpi
    edited 6:55AM
    You can add text in TfrxReport.OnEndDoc event
    procedure TForm1.frxReport1EndDoc(Sender: TObject);
    var p: TfrxReportPage;
        m: TfrxMemoView;
        i: integer;
    begin
         frxReport1.Preview.Lock;
         for i := 0 to frxReport1.PreviewPages.Count - 1 do
           begin
             p:=TfrxReportPage(frxReport1.PreviewPages.Page[i]);
             m:=TfrxMemoView.Create(p);
             m.CreateUniqueName;
             m.SetBounds(0, 0, (p.PaperWidth  - p.RightMargin - p.LeftMargin) * fr01cm, (p.PaperHeight - p.TopMargin - p.BottomMargin) * fr01cm);
             m.Text := 'Demo';
             m.Rotation := 45;
             m.Font.Size := 128;
             m.VAlign := vaCenter;
             m.HAlign := haCenter;
             frxReport1.PreviewPages.ModifyPage(i,p);
           end;
         frxReport1.Preview.UnLock;
    end;
    

    or in TfrxReport.OnPrintPage event
    procedure TForm1.frxReport1PrintPage(Page: TfrxReportPage;
      CopyNo: Integer);
    var m: TfrxMemoView;
    begin
             m:=TfrxMemoView.Create(page);
             m.CreateUniqueName;
             m.SetBounds(0, 0, (page.PaperWidth  - page.RightMargin - page.LeftMargin) * fr01cm, (page.PaperHeight - page.TopMargin - page.BottomMargin) * fr01cm);
             m.Text := 'Demo';
             m.Rotation := 45;
             m.Font.Size := 128;
             m.VAlign := vaCenter;
             m.HAlign := haCenter;
    end;
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.