//string fileName = Guid.NewGuid() + ".pdf"; //string filePath = Path.Combine(Server.MapPath(("/UploadedFiles"))); /// <summary> /// metodo principal de escritura /// </summary> /// <param name="stream"></param> public void Write(Stream stream) { // step 1 using (Document document = new Document(PageSize.A4.Rotate())) { // step 2 PdfWriter.GetInstance(document, stream); // step 3 document.Open(); // step 4 List <string> days = new List <string>(); days.Add("Lunes"); days.Add("Martes"); days.Add("Miercoles"); days.Add("Jueves"); days.Add("Viernes"); IPdfPTableEvent Pevent = new PdfCreate(); foreach (string day in days) { PdfPTable table = GetTable(day); table.TableEvent = Pevent; document.Add(table); document.NewPage(); } } }