We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Workbook printing is printed with Aspose Evalvation watermark (ver aspose-2.5.3.2006)

Hi,

I’m using the code below. I want to print the xls file. Printing is working fine with all formatting but it is printed with Aspose Evaluation watermark, even though i’m using License. I don’t get evaluation in gridweb but i’m getting in printed sheet. Please reply me with your suggestion. Its urgent


string filename = “f:\one1.xls”;

// Saves to the file.
g.WebWorksheets.SaveToExcelFile(filename);

// Sents the file to browser.
Response.ContentType = “application/vnd.ms-excel”;

//Adds header.
Response.AddHeader(“content-disposition”, “attachment; filename=book1.xls”);

// Writes file content to the response stream.
Response.WriteFile(filename);

Workbook workbook = new Workbook(filename);
//Save the document in Pdf format
workbook.Worksheets[0].PageSetup.FitToPagesWide = 1;
workbook.Worksheets[0].PageSetup.Orientation = PageOrientationType.Landscape;
workbook.Worksheets[0].PageSetup.PaperSize = PaperSizeType.PaperA3;
workbook.Save(filename, SaveFormat.Xlsx);
workbook.open(filename);
workbook.worksheet[0].SheetToPrinter(“printername”);


Many Thanks,
Assal

Hi,

You will have to set separate licenses for each of components.

  1. Aspose.Cells for .NET
  2. Aspose.Cells for GridWeb

Please see the code below.

C#

string licPath = @“F:\Shak-Data-R\Aspose\License\Aspose.Total.lic”;

Aspose.Cells.GridWeb.License gridLic = new Aspose.Cells.GridWeb.License();

gridLic.SetLicense(licPath);

Aspose.Cells.License cellsLic = new Aspose.Cells.License();

cellsLic.SetLicense(licPath);