Вот мой фактический код:
Код: Выделить всё
var Avis_views = new ViewAsPdf("~/Views/AvisAutomatique/ExportPdfDebit.cshtml", printa)
{
PageMargins = new Rotativa.Options.Margins(0, 0, 0, 0),
MinimumFontSize = 14,
/*ageHeight=60,*/
PageOrientation = Rotativa.Options.Orientation.Portrait,
PageSize = Rotativa.Options.Size.A4,
};
var fileName = "DEBITADVISE_" + Numcpt + "_" + _GetTransDateTime() + ".pdf";
//var path = Path.Combine(@"C:\DocumentPdf\", fileName);
byte[] abc = Avis_views.BuildFile(quotesController.ControllerContext);
//System.IO.File.WriteAllBytes(path, abc);
MemoryStream ms = new MemoryStream(abc);
sendemail(email, fileName, abc, emailc);
Подробнее здесь: https://stackoverflow.com/questions/645 ... job-with-h