title: Download ZIP file and output Rotativa PDF in browser ASP.NET MVC
body: <p>I am working on a report which requires multiple PDF files to download in one zip file and as well as create a new PDF file and save that new created file on server as well. I am using <code>DotNetZip</code> and <code>Rotativa</code> for zip and pdf files.</p>
  
  <p>Currently i have this in my <code>Controller</code>:  </p>
  
  <pre><code>[HttpGet]  
  public ActionResult GetReport()  
  {  
     var test2 = new ActionAsPdf("ContractorReportNew");
     var zip = new ZipFile();  
     zip.AddFile("MyFile.zip", "Orders");  
     string zipName = string.Format("Contractor Report{0}.zip", DateTime.Now.ToString("dd-MMM-yyyy-HH:mm:ss"));
     using (MemoryStream memoryStream = new MemoryStream())
     {
       zip.Save(memoryStream);
       return File(memoryStream.ToArray(), "application/zip", zipName);
     }
  }  
  </code></pre>
  
  <p>And   </p>
  
  <pre><code>[HttpGet]
  public ActionResult ContractorReportNew()  
  {  
     //Data from DB  
     var test = new ViewAsPdf("Contractor_report")
     {
        MinimumFontSize = 14,
        PageOrientation = Rotativa.Options.Orientation.Landscape,
        PageSize = Rotativa.Options.Size.A4,
     };
  
       var abc = test.BuildFile(this.ControllerContext);
       System.IO.File.WriteAllBytes(path, abc);
       MemoryStream ms = new MemoryStream(abc);
       return new FileStreamResult(ms, "application/pdf");
  }
  </code></pre>
  
  <p>How can i achieve what i need?<br>
  Any help would be much appreciated.</p>