The code which sets the license is below:
Please let me also know the way to send lic file once an aspose staff member gets allocated to the issue i have raised.
Sumeet21:Hi,We are using PdfViewer API to print the documents. We have already been using Aspose.pdf redistributable license. However , in the client environment we are getting this evaluation message which i have mentioned in the subject. I am unable to reproduce the license evaluation issue on my local machine.Client environment is Windows Server 2012. is there some specific registry or security setting which i can perform on client machine. I have tried to set the license as per the suggestions from Aspose licensing help and asked client to try and run the application. However i wanted to know if i could check some other things which may cause this issue in their environment.The code block we are using to print is below:var viewer = new PdfViewer();viewer.OpenPdfFile(fileName);//Set attributes for printingviewer.AutoResize = true;viewer.AutoRotate = true;viewer.PrintPageDialog = false;//Create objects for printer and page settings and PrintDocumentvar ps = new PrinterSettings();var pgs = new PageSettings();ps.PrinterName = Printer;pgs.Margins = new Margins(0, 0, 0, 0);viewer.PrintDocumentWithSettings(pgs, ps);viewer.ClosePdfFile();Thanks,Sumeet
- If you are developing an ASP.NET application, you can call License.SetLicense from the Global.asax.cs (Global.asax.vb) file, in the Application_Start protected method. It is called once when the application starts. Do not call License.SetLicense from within Page_Load methods since it means the license will be loaded every time a web page is loaded.
- If you are developing a Windows Forms or console application, call License.SetLicense in your startup code, before using Aspose.Pdf for .NET classes.
- If you are developing a class library, you can call License.SetLicense from a static constructor of your class that uses Aspose.Pdf for .NET. The static constructor will execute before an instance of your class is created making sure Aspose.PDF for .NET license is properly set.
Please try to set license as per your application structure and share the results.
Sumeet21:Please let me also know the way to send lic file once an aspose staff member gets allocated to the issue i have raised.
Hi Sumeet,Sumeet21:I was curious to know as to what does license.SetLicense does and does it put any registry entry on the machine. Please let me know.