Sign In  Sign Up Live-Chat

Watermark Reappearing on slides

Last post 04-24-2008, 2:08 PM by lbyrd. 14 replies.
Sort Posts: Previous Next
  •  04-22-2008, 8:43 AM 123501

    Watermark Reappearing on slides

    Currently we are using the software to create a risk cube report in Powerpoint. The problem is we inconsistently get a license watermark appearing on the slides even though we DO have a license. We need to stop this watermark from appearing on our slides.
    This message was posted using Aspose.Live 2 Forum
     
  •  04-22-2008, 9:38 AM 123521 in reply to 123501

    Re: Watermark Reappearing on slides

    Dear lbyrd,

    You should set the license in your application load event only once and before you use any of the Aspose.Slides API.

    Please show me your code where you are setting license. If you are using Aspose.Slides for JAVA, then are you also using Aspose.Metafiles?


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  04-22-2008, 9:45 AM 123524 in reply to 123521

    Re: Watermark Reappearing on slides

    This code is in the Page_Load event.

    License license = new License();

    try

    {

    license.SetLicense(Server.MapPath("~/Aspose.Total.lic"));

    }

    catch (Exception ex)

    {

    Debug.WriteLine("Trouble with License");

    Debug.WriteLine(ex.StackTrace);

    }

     
  •  04-22-2008, 3:39 PM 123589 in reply to 123524

    Re: Watermark Reappearing on slides

    Please get your code into Global.asax.cs (Global.asax.vb) file, in the Application_Start protected method.


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  04-22-2008, 3:56 PM 123591 in reply to 123524

    Re: Watermark Reappearing on slides

    One thing more, don’t declare the License variable in function scope as you are doing it in function scope, keep it in a class scope and initialize it in your Application start event.

     

    You can also make it static for example

     

    class SomeClass : …

    {

       //Class scope

    static  License licenseObj;

     

    //Application load event or page load event

    void Application_start(….)

    {

        //licenseObj has been declared in class scope not in function scope

         licenseObj.SetLicense(Server.MapPath("~/Aspose.Total.lic"));

    }

     

    }


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  04-23-2008, 7:25 AM 123710 in reply to 123591

    Re: Watermark Reappearing on slides

    Thanks! I will try this. This problem is not easy to duplicate. Do you know how I can test this to make sure it works? It does not happen all the time.

     

     

     
  •  04-23-2008, 8:49 AM 123724 in reply to 123591

    Re: Watermark Reappearing on slides

    It did not work for me. What I did was went into my browser, cleared the history, cookies and files. I modified the code and restarted IIS. When I went to the report in my browser, I still get the the watermark. Here is my code in the global.asax.cs:

    static Aspose.Slides.License licenseObj = new Aspose.Slides.License();

    protected void Application_Start(Object sender, EventArgs e)

    {

    //License ////////////////////////////////////////////////////////////

    //Create a License object

    //Aspose.Slides.License license = new Aspose.Slides.License();

    try

    {

    licenseObj.SetLicense(Server.MapPath("~/Aspose.Total.lic"));

    }

    catch (Exception ex)

    {

    Debug.WriteLine("Trouble with License");

    Debug.WriteLine(ex.StackTrace);

    }

    //////////////////////////////////////////////////////////////////////

    }

     
  •  04-23-2008, 9:58 AM 123741 in reply to 123724

    Re: Watermark Reappearing on slides

    Try to move SetLicense call to the method where you create presentation object
    and call it before creating Presentation object.
    Please check for example our Aspose.Slides.WF.Template asp.net demo.
    We call it in the Button1_Click method.

    Do you use template presentations in your app?
    Make sure you template (if you use it) doesn't have any watermarks.

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  04-23-2008, 10:27 AM 123745 in reply to 123741

    Re: Watermark Reappearing on slides

    Where is that demo located? I found that we are using a template file. When I opened that, there is no watermark on it.
     
  •  04-23-2008, 10:34 AM 123747 in reply to 123745

    Re: Watermark Reappearing on slides

    \Program Files\Aspose\Aspose.Slides\Demos\WebForms\Template

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  04-23-2008, 1:47 PM 123782 in reply to 123747

    Re: Watermark Reappearing on slides

    I do not have that demo. This is really getting frustrating.
     
  •  04-23-2008, 2:34 PM 123796 in reply to 123782

    Re: Watermark Reappearing on slides

    Download Aspose.Slides.msi installer from here and install it.
    May be Aspose.Total installer put demos to another folder.

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  04-24-2008, 12:19 PM 123972 in reply to 123796

    Re: Watermark Reappearing on slides

    I've viewed the template code. In that code the license variable is NOT declared in the global.asax. It is declared in the button1_click. It is used exactly like mine was previously except it is before the declaration of the presentation object. Should that fix it? Or will the variable still have to be in the global.asax.cs file? If it still has to be in the global file, how will I reference it in my other code page?
     
  •  04-24-2008, 1:49 PM 123982 in reply to 123972

    Re: Watermark Reappearing on slides

    Sure, if you call SetLicense before declaration of Presentation object it should fix the problem.

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
     
  •  04-24-2008, 2:08 PM 123990 in reply to 123982

    Re: Watermark Reappearing on slides

    To sum it up:

    1. Move the declaration of the license variable out of the global.asax.cs back to the code page outside of the function.
    2. Call the SetLicense method just before creating the presentation object.

    Correct? Is there a way to duplicate this error consistently that you know of so I can make sure this fix works? Currently I can not consistently make it reoccur.

     

     
View as RSS news feed in XML