public ActionResult Print(string Ids)
{
using (MemoryStream ms = new MemoryStream())
{
AssetsLabelContainerPrint r = new AssetsLabelContainerPrint();
r.PrintingSystem.ContinuousPageNumbering = true;
r.CreateDocument();
string[] IdsArry = Ids.Split(',');
for (int i = 0; i < IdsArry.Count(); i++)
{
AssetsLabelPrint r1 = new AssetsLabelPrint(IdsArry[i]);
r1.CreateDocument();
r.Pages.AddRange(r1.Pages);
}
PdfExportOptions opts = new PdfExportOptions();
opts.ShowPrintDialogOnOpen = true;
r.ExportToPdf(ms, opts);
ms.Seek(0, SeekOrigin.Begin);
byte[] report = ms.ToArray();
Response.ContentType = "application/pdf";
Response.Clear();
Response.OutputStream.Write(report, 0, report.Length);
Response.End();
return Content("");
}
}