RadEditor: Adding watermark to html report

4 posts, 0 answers
  1. Jason
    Jason avatar
    20 posts
    Member since:
    Jun 2014

    Posted 10 Aug 2014 Link to this post


    I have found and am a little confused by the way these examples work. This is the way my code is setup:

    C# side

    string reportResult = report.GetReport(**all parameters needed to make a dynamic html**);
    RadEditorReportView.Content = reportResult;

    .asp side

    telerik:RadEditor ID="RadEditorReportView" Runat="server" Width="100%" EditModes="Preview" Height="100%"    ToolsWidth="0" Enabled="false">

    Now I am trying to add a Text Watermark as shown in this example: http://www.telerik.com/help/reporting/designing-reports-watermarks.html

    So I am trying to do it 3 different ways and only 1 way needs to work listed in order by the way I prefer to do it most:

    1. Code Behind. As you see I am just setting the Content to be an html string in my RadEditor. Do I need to create a System.Drawing.Image object?
    2. asp side. Running asp code but it seems that it needs to create some sort of document object that I'm not doing here.
    3. Designing Reports Watermarks link seems to be creating a type of Report that is not the same as what I'm trying to do here.

    But it doesn't seem the Reports talked about here are an actual printed report but some sort of computer report. What I'm trying to accomplish is to add a watermark to files that we print in pdf format. The PDF files are already created. I just need to add watermarks now. How do I exactly add watermarks here? In the previous link therei s an example doing it in the asp side using OnClientLoad but we don't create an actual document here. What is the document that needs to be created to make this work? Or to do it from the code behind, I need to somehow make the html string into this object: System.Drawing.Image ???
  2. Jason
    Jason avatar
    20 posts
    Member since:
    Jun 2014

    Posted 10 Aug 2014 in reply to Jason Link to this post

    Please ignore the very last paragraph.
  3. Jason
    Jason avatar
    20 posts
    Member since:
    Jun 2014

    Posted 11 Aug 2014 Link to this post

    Can someone please help me? I cannot quite figure out the details.
  4. Marin Bratanov
    Marin Bratanov avatar
    3908 posts

    Posted 13 Aug 2014 Link to this post

    Hello Jason,

    The forum thread you linked modified the RadEditor content so it includes HTML that produces the desired watermark. If this is what you are after, you would need to modify the content string on the server to include an <img /> tag, or another tag with appropriate CSS rules. Another option is to modify the content area itself to have a watermark as shown here. In either case this is done with CSS/HTML and not with .NET objects.

    The help article you linked is related to the Telerik Reporting toolset and is not applicable for RadEditor for ASP.NET AJAX. The reports have watermark functionality built in, but with RadEditor the developer must add it according to their logic and needs.

    I hope this explains the situation.

    Regards, Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top