public ActionResult GuardarListaPDF(IEnumerable <HttpPostedFileBase> files, float ancho, float largo) { try { ZipFile zip = new ZipFile(); if (files.Count() > 0) { foreach (var file in files) { zip.AddEntry(file.FileName.Replace(".jpg", ".pdf"), ImageLogic.ImagenA4(file, ancho, largo).ToArray()); } } using (MemoryStream output = new MemoryStream()) { zip.Save(output); zip.Dispose(); return(this.File(output.ToArray(), "application/zip", "ImagenesA4.zip")); } } catch { return(this.RedirectToAction("Index", "Imagen")); } }
public ActionResult GuardarPDF(HttpPostedFileBase files, float ancho, float largo) { try { return(this.File(ImageLogic.ImagenA4(files, ancho, largo).ToArray(), "application/pdf")); } catch { return(this.RedirectToAction("Index", "Imagen")); } }