public override void ExecuteResult(ControllerContext context) { var Response = context.HttpContext.Response; var list1 = ReportList().ToList(); if (!list1.Any()) { Response.Write("no data found"); return; } Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "filename=foo.pdf"); doc = new Document(PageSize.LETTER, 36, 36, 36, 36); var w = PdfWriter.GetInstance(doc, Response.OutputStream); w.PageEvent = pageEvents; doc.Open(); dc = w.DirectContent; foreach (var o in list1) { var t = StartPageSet(o); var color = BaseColor.BLACK; foreach (var m in RollsheetModel.FetchOrgMembers(o.OrgId, null) .Where(om => om.MemberTypeId != MemberTypeCode.Member)) { if (color == BaseColor.WHITE) color = new GrayColor(240); else color = BaseColor.WHITE; AddRow(t, m.PeopleId, m.Name, m.Email, m.HomePhone, m.CellPhone, m.WorkPhone, m.MemberType, color); } doc.Add(t); } pageEvents.EndPageSet(); doc.Close(); }
public override void ExecuteResult(ControllerContext context) { var Response = context.HttpContext.Response; var list1 = ReportList().ToList(); if (!list1.Any()) { Response.Write("no data found"); return; } Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "filename=foo.pdf"); doc = new Document(PageSize.LETTER, 36, 36, 36, 36); var w = PdfWriter.GetInstance(doc, Response.OutputStream); w.PageEvent = pageEvents; doc.Open(); dc = w.DirectContent; var haddata = false; foreach (var o in list1) { var t = StartPageSet(o); var color = BaseColor.BLACK; foreach (var m in RollsheetModel.FetchOrgMembers(o.OrgId, null)) { if (color == BaseColor.WHITE) color = new GrayColor(240); else color = BaseColor.WHITE; AddRow(t, m, color); haddata = true; } doc.Add(t); } if (!haddata) doc.Add(new Phrase("\nno data")); pageEvents.EndPageSet(); doc.Close(); }
public override void ExecuteResult(ControllerContext context) { var Response = context.HttpContext.Response; Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "filename=foo.pdf"); dt = Util.Now; doc = new Document(PageSize.LETTER.Rotate(), 36, 36, 64, 64); var w = PdfWriter.GetInstance(doc, Response.OutputStream); var roles = DbUtil.Db.CurrentRoles(); var i = (from o in DbUtil.Db.Organizations where o.LimitToRole == null || roles.Contains(o.LimitToRole) where o.OrganizationId == orgid select new { o.OrganizationName, o.LeaderName, o.FirstMeetingDate }).SingleOrDefault(); w.PageEvent = new HeadFoot { HeaderText = "Recent Attendee Report: {0} - {1} ({2})".Fmt( i.OrganizationName, i.LeaderName, i.FirstMeetingDate.HasValue ? "since " + i.FirstMeetingDate.FormatDate() : "no First Meeting Date set"), FooterText = "Recent Attendee Report" }; doc.Open(); var q = Attendees(orgid.Value); if (!orgid.HasValue || i == null || q.Count() == 0) doc.Add(new Phrase("no data")); else { var mt = new PdfPTable(1); mt.SetNoPadding(); mt.HeaderRows = 1; float[] widths = new float[] { 4f, 6f, 7f, 2.6f, 2f, 3f }; var t = new PdfPTable(widths); t.DefaultCell.Border = PdfPCell.NO_BORDER; t.DefaultCell.VerticalAlignment = PdfPCell.ALIGN_TOP; t.DefaultCell.SetLeading(2.0f, 1f); t.WidthPercentage = 100; t.AddHeader("Name", boldfont); t.AddHeader("Address", boldfont); t.AddHeader("Phone/Email", boldfont); t.AddHeader("Last Att.", boldfont); t.AddHeader("Birthday", boldfont); t.AddHeader("Status", boldfont); mt.AddCell(t); var color = BaseColor.BLACK; bool? v = null; foreach (var p in q) { if (color == BaseColor.WHITE) color = new GrayColor(240); else color = BaseColor.WHITE; t = new PdfPTable(widths); t.SetNoBorder(); t.DefaultCell.VerticalAlignment = Element.ALIGN_TOP; t.DefaultCell.BackgroundColor = color; if (v != p.visitor) t.Add(" ------ {0} ------".Fmt(p.visitor == true ? "Guests and Previous Members" : "Members"), 6, bigboldfont); v = p.visitor; t.Add(p.Name, font); var ph = new Paragraph(); ph.AddLine(p.Address, font); ph.AddLine(p.Address2, font); ph.AddLine(p.CSZ, font); t.AddCell(ph); ph = new Paragraph(); ph.AddLine(p.HomePhone.FmtFone("H"), font); ph.AddLine(p.CellPhone.FmtFone("C"), font); ph.AddLine(p.Email, font); t.AddCell(ph); t.Add(p.LastAttend.FormatDate(), font); t.Add(p.Birthday, font); t.Add(p.AttendType, font); t.CompleteRow(); t.Add("", font); t.Add(p.AttendStr, 4, monofont); t.AddRight("{0:n1}{1}".Fmt(p.AttendPct, p.AttendPct.HasValue ? "%" : ""), font); mt.AddCell(t); } doc.Add(mt); } doc.Close(); }
public override void ExecuteResult(ControllerContext context) { var Response = context.HttpContext.Response; Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "filename=foo.pdf"); doc = new Document(PageSize.LETTER, 36, 36, 36, 36); var w = PdfWriter.GetInstance(doc, Response.OutputStream); w.PageEvent = pageEvents; doc.Open(); dc = w.DirectContent; if (qid != null) { var color = BaseColor.BLACK; var o = ReportList().First(); var t = StartPageSet(o); var q = DbUtil.Db.PeopleQuery(qid.Value); var q2 = from p in q let rr = p.RecRegs.FirstOrDefault() join m in RollsheetModel.FetchOrgMembers(o.OrgId, null) on p.PeopleId equals m.PeopleId into j from m in j.DefaultIfEmpty() orderby p.Name2 select new MemberInfo { ActiveOther = rr.ActiveInAnotherChurch ?? false, ThisChurch = rr.Member ?? false, Address = p.PrimaryAddress, Address2 = p.PrimaryAddress2, CityStateZip = p.CityStateZip5, CellPhone = p.CellPhone, HomePhone = p.HomePhone, MemberStatus = p.MemberStatus.Description, MemberType = m.MemberType, FamMemberThis = p.Family.People.Any(f => f.PositionInFamilyId == 10 && f.MemberStatusId == MemberStatusCode.Member), Name = p.Name, Medical = rr.MedicalDescription, PeopleId = p.PeopleId, Parents = DbUtil.Db.ParentNamesAndCells(p.PeopleId), Age = p.Age }; foreach (var m in q2) { if (color.Equals(BaseColor.WHITE)) color = new GrayColor(240); else color = BaseColor.WHITE; AddRow(t, m, color); } if (t.Rows.Count > 1) doc.Add(t); else doc.Add(new Phrase("no data")); } else foreach (var o in ReportList()) { var t = StartPageSet(o); var color = BaseColor.BLACK; var q = from om in DbUtil.Db.OrganizationMembers where om.OrganizationId == o.OrgId where (om.Pending ?? false) == false where om.MemberTypeId != MemberTypeCode.InActive let rr = om.Person.RecRegs.FirstOrDefault() orderby om.Person.Name2 select new MemberInfo { ActiveOther = rr.ActiveInAnotherChurch ?? false, ThisChurch = rr.Member ?? false, Address = om.Person.PrimaryAddress, Address2 = om.Person.PrimaryAddress2, CityStateZip = om.Person.CityStateZip5, CellPhone = om.Person.CellPhone, HomePhone = om.Person.HomePhone, MemberStatus = om.Person.MemberStatus.Description, MemberType = om.MemberType.Description, FamMemberThis = om.Person.Family.People.Any(f => f.PositionInFamilyId == 10 && f.MemberStatusId == MemberStatusCode.Member), Name = om.Person.Name, Medical = rr.MedicalDescription, PeopleId = om.PeopleId, Parents = DbUtil.Db.ParentNamesAndCells(om.PeopleId), Age = om.Person.Age }; foreach (var m in q) { if (color == BaseColor.WHITE) color = new GrayColor(240); else color = BaseColor.WHITE; AddRow(t, m, color); } doc.Add(t); } pageEvents.EndPageSet(); doc.Close(); }
public override void ExecuteResult(ControllerContext context) { var Response = context.HttpContext.Response; Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "filename=foo.pdf"); dt = Util.Now; doc = new Document(PageSize.LETTER.Rotate(), 36, 36, 64, 64); var w = PdfWriter.GetInstance(doc, Response.OutputStream); w.PageEvent = pageEvents; doc.Open(); dc = w.DirectContent; t = new PdfPTable(1); t.WidthPercentage = 100; t.DefaultCell.Padding = 0; t.HeaderRows = 1; t.AddCell(StartPageSet()); t.DefaultCell.Border = Rectangle.TOP_BORDER; t.DefaultCell.BorderColor = BaseColor.BLACK; t.DefaultCell.BorderColorTop = BaseColor.BLACK; t.DefaultCell.BorderWidthTop = 2.0f; var q = DbUtil.Db.PeopleQuery(qid); var q2 = from p in q let person = p group p by p.FamilyId into g let hhname = g.First().Family.HeadOfHousehold.Name2 orderby hhname select new { members = from m in g.First().Family.People where !m.DeceasedDate.HasValue select new { order = m.PositionInFamilyId*1000 + (m.PositionInFamilyId == 10 ? m.GenderId : 1000 - (m.Age ?? 0)), // order = g.Any(p => p.PeopleId == m.PeopleId) ? 1 : // m.PositionInFamilyId, person = m } }; foreach (var f in q2) { var ft = new PdfPTable(HeaderWids); ft.DefaultCell.SetLeading(2.0f, 1f); ft.DefaultCell.Border = Rectangle.NO_BORDER; ft.DefaultCell.Padding = 5; var fn = 1; var color = BaseColor.BLACK; foreach (var p in f.members.OrderBy(m => m.order)) { if (color == BaseColor.WHITE) color = new GrayColor(240); else color = BaseColor.WHITE; Debug.WriteLine("{0:##}: {1}", p.order, p.person.Name); AddRow(ft, p.person, fn, color); fn++; } t.AddCell(ft); } if (t.Rows.Count > 1) doc.Add(t); else doc.Add(new Phrase("no data")); pageEvents.EndPageSet(); doc.Close(); }
public static Object[] SplitDAelements(String da) { PRTokeniser tk = new PRTokeniser(PdfEncodings.ConvertToBytes(da, null)); ArrayList stack = new ArrayList(); Object[] ret = new Object[3]; while (tk.NextToken()) { if (tk.TokenType == PRTokeniser.TK_COMMENT) continue; if (tk.TokenType == PRTokeniser.TK_OTHER) { String oper = tk.StringValue; if (oper.Equals("Tf")) { if (stack.Count >= 2) { ret[DA_FONT] = stack[stack.Count - 2]; ret[DA_SIZE] = float.Parse((String)stack[stack.Count - 1], System.Globalization.NumberFormatInfo.InvariantInfo); } } else if (oper.Equals("g")) { if (stack.Count >= 1) { float gray = float.Parse((String)stack[stack.Count - 1], System.Globalization.NumberFormatInfo.InvariantInfo); if (gray != 0) ret[DA_COLOR] = new GrayColor(gray); } } else if (oper.Equals("rg")) { if (stack.Count >= 3) { float red = float.Parse((String)stack[stack.Count - 3], System.Globalization.NumberFormatInfo.InvariantInfo); float green = float.Parse((String)stack[stack.Count - 2], System.Globalization.NumberFormatInfo.InvariantInfo); float blue = float.Parse((String)stack[stack.Count - 1], System.Globalization.NumberFormatInfo.InvariantInfo); ret[DA_COLOR] = new Color(red, green, blue); } } else if (oper.Equals("k")) { if (stack.Count >= 4) { float cyan = float.Parse((String)stack[stack.Count - 4], System.Globalization.NumberFormatInfo.InvariantInfo); float magenta = float.Parse((String)stack[stack.Count - 3], System.Globalization.NumberFormatInfo.InvariantInfo); float yellow = float.Parse((String)stack[stack.Count - 2], System.Globalization.NumberFormatInfo.InvariantInfo); float black = float.Parse((String)stack[stack.Count - 1], System.Globalization.NumberFormatInfo.InvariantInfo); ret[DA_COLOR] = new CMYKColor(cyan, magenta, yellow, black); } } stack.Clear(); } else stack.Add(tk.StringValue); } return ret; }
public override void ExecuteResult(ControllerContext context) { var Response = context.HttpContext.Response; var list1 = ReportList(); if (!list1.Any()) { Response.Write("no data found"); return; } Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "filename=foo.pdf"); doc = new Document(PageSize.LETTER, 36, 36, 36, 36); var w = PdfWriter.GetInstance(doc, Response.OutputStream); w.PageEvent = pageEvents; doc.Open(); dc = w.DirectContent; foreach (var o in list1) { var t = StartPageSet(o); var color = BaseColor.BLACK; var q = from om in DbUtil.Db.OrganizationMembers where om.OrganizationId == o.OrgId where (om.Pending ?? false) == false where om.MemberTypeId != MemberTypeCode.InActive let rr = om.Person.RecRegs.FirstOrDefault() orderby om.Person.Name2 select new MemberInfo { ActiveOther = rr.ActiveInAnotherChurch ?? false, ThisChurch = rr.Member ?? false, Address = om.Person.PrimaryAddress, Address2 = om.Person.PrimaryAddress2, CityStateZip = om.Person.CityStateZip5, CellPhone = om.Person.CellPhone, HomePhone = om.Person.HomePhone, MemberStatus = om.Person.MemberStatus.Description, MemberType = om.MemberType.Description, FamMemberThis = om.Person.Family.People.Any(f => f.PositionInFamilyId == 10 && f.MemberStatusId == MemberStatusCode.Member), Name = om.Person.Name, Medical = rr.MedicalDescription, PeopleId = om.PeopleId, Parents = DbUtil.Db.ParentNamesAndCells(om.PeopleId), Age = om.Person.Age }; foreach (var m in q) { if (color == BaseColor.WHITE) color = new GrayColor(240); else color = BaseColor.WHITE; AddRow(t, m, color); } doc.Add(t); } pageEvents.EndPageSet(); doc.Close(); }
public override void ExecuteResult(ControllerContext context) { var Response = context.HttpContext.Response; Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "filename=foo.pdf"); dt = Util.Now; doc = new Document(PageSize.LETTER.Rotate(), 36, 36, 64, 64); var w = PdfWriter.GetInstance(doc, Response.OutputStream); var i = (from m in DbUtil.Db.Meetings where m.MeetingId == mtgid select new { m.Organization.OrganizationName, m.Organization.LeaderName, m.MeetingDate }).SingleOrDefault(); w.PageEvent = new HeadFoot { HeaderText = $"Guests/Absents Report: {i.OrganizationName} - {i.LeaderName} {i.MeetingDate:g}", FooterText = "Guests/Absents Report" }; doc.Open(); var q = VisitsAbsents(mtgid.Value); if (!mtgid.HasValue || i == null || !q.Any()) doc.Add(new Paragraph("no data")); else { var mt = new PdfPTable(1); mt.SetNoPadding(); mt.HeaderRows = 1; float[] widths = {4f, 6f, 7f, 2.6f, 2f, 3f}; var t = new PdfPTable(widths); t.DefaultCell.Border = Rectangle.NO_BORDER; t.DefaultCell.VerticalAlignment = Element.ALIGN_TOP; t.DefaultCell.SetLeading(2.0f, 1f); t.WidthPercentage = 100; t.AddHeader("Name", boldfont); t.AddHeader("Address", boldfont); t.AddHeader("Phone/Email", boldfont); t.AddHeader("Last Att.", boldfont); t.AddHeader("Birthday", boldfont); t.AddHeader("Guest/Member", boldfont); mt.AddCell(t); var color = BaseColor.BLACK; bool? v = null; foreach (var p in q) { if (color == BaseColor.WHITE) color = new GrayColor(240); else color = BaseColor.WHITE; t = new PdfPTable(widths); t.SetNoBorder(); t.DefaultCell.VerticalAlignment = Element.ALIGN_TOP; t.DefaultCell.BackgroundColor = color; if (v != p.visitor) t.Add($" ------ {(p.visitor ? "Guests" : "Absentees")} ------", 6, bigboldfont); v = p.visitor; t.Add(p.Name, font); var ph = new Paragraph(); ph.AddLine(p.Address, font); ph.AddLine(p.Address2, font); ph.AddLine(p.CSZ, font); t.AddCell(ph); ph = new Paragraph(); ph.AddLine(p.HomePhone.FmtFone("H"), font); ph.AddLine(p.CellPhone.FmtFone("C"), font); ph.AddLine(p.Email, font); t.AddCell(ph); t.Add(p.LastAttend.FormatDate(), font); t.Add(p.Birthday, font); t.Add(p.Status, font); t.CompleteRow(); if (p.Status == null || !p.Status.StartsWith("Visit")) { t.Add("", font); t.Add($"{p.AttendStr} {p.AttendPct:n1}{(p.AttendPct.HasValue ? "%" : "")}", 5, monofont); } mt.AddCell(t); } doc.Add(mt); } doc.Close(); }
/* * Requiere: N/A * Modifica: Exporta el grid de vista previa a un PDF y abre una nueva pestaña en el browser que la previsualiza. Si el usuario lo desea puede descargar el documento desde ahi. * Retorna: N/A. */ protected void exportarToPdf() { string nombreReporte = "Reporte Doroteos.pdf"; iTextSharp.text.Document doc = new iTextSharp.text.Document(iTextSharp.text.PageSize.LETTER); if (preGrid.Rows[0].Cells.Count > 4) doc.SetPageSize(iTextSharp.text.PageSize.LETTER.Rotate()); var output = new System.IO.FileStream(Server.MapPath(nombreReporte), System.IO.FileMode.Create); var writer = PdfWriter.GetInstance(doc, output); doc.Open(); iTextSharp.text.Rectangle page = doc.PageSize; PdfPTable head = new PdfPTable(1); head.TotalWidth = page.Width; Phrase phrase = new Phrase("Reporte generado el: " + DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss") + " GMT", new iTextSharp.text.Font(iTextSharp.text.Font.COURIER, 8)); PdfPCell c = new PdfPCell(phrase); c.Border = iTextSharp.text.Rectangle.NO_BORDER; c.VerticalAlignment = Element.ALIGN_TOP; c.HorizontalAlignment = Element.ALIGN_CENTER; head.AddCell(c); doc.Add(head); doc.AddCreationDate(); iTextSharp.text.Font boldFont = new iTextSharp.text.Font(iTextSharp.text.Font.TIMES_ROMAN, 24, iTextSharp.text.Font.BOLD); iTextSharp.text.Font boldFontHeader = new iTextSharp.text.Font(iTextSharp.text.Font.TIMES_ROMAN, 14, iTextSharp.text.Font.BOLD); doc.Add(new iTextSharp.text.Paragraph("Reporte de proyectos", boldFont)); doc.Add(new iTextSharp.text.Paragraph(" ", boldFont)); BaseFont fieldFontRoman = BaseFont.CreateFont(@"C:\Windows\Fonts\arial.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED); iTextSharp.text.Font normalCell = new iTextSharp.text.Font(fieldFontRoman, 11, iTextSharp.text.Font.NORMAL); iTextSharp.text.Font ff = new iTextSharp.text.Font(fieldFontRoman, 13, iTextSharp.text.Font.BOLD); /*Se agregan datos de proyecto, en caso de ser seleccionado*/ PdfPTable table = new PdfPTable(preGrid.Rows[0].Cells.Count); for (int i = 0; i < preGrid.Rows[0].Cells.Count; i++) { Phrase p = new Phrase(HttpUtility.HtmlDecode(preGrid.HeaderRow.Cells[i].Text), ff); PdfPCell cell = new PdfPCell(p); float level = 0.80F; GrayColor gray = new GrayColor(level); cell.BackgroundColor = gray; bool tiene = cell.HasMinimumHeight(); //Phrase p = new Phrase(quitarTildes(preGrid.HeaderRow.Cells[i].Text), ff); table.AddCell(cell); } foreach (GridViewRow row in preGrid.Rows) { for (int i = 0; i < preGrid.Rows[0].Cells.Count; i++) { Phrase p = new Phrase(HttpUtility.HtmlDecode(row.Cells[i].Text), normalCell); //Phrase p = new Phrase(quitarTildes(row.Cells[i].Text), normalCell); PdfPCell cell = new PdfPCell(p); cell.PaddingBottom = 7.0F; cell.PaddingTop = 7.0F; table.AddCell(cell); } } doc.Add(table); //Se cierra documento doc.Close(); Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenWindow", "window.open('" + nombreReporte + "','_newtab');", true); }
private void CreatePdfFile(string pdfFileName) { HtmlForm form = new HtmlForm(); StringWriter sw = new StringWriter(); HtmlTextWriter hTextWriter = new HtmlTextWriter(sw); string html = sw.ToString(); Rectangle r = new Rectangle(240, 300); Document Doc = new Document(r); Doc.SetPageSize(iTextSharp.text.PageSize.A4); string path = Server.MapPath("~\\PdfReport\\" + pdfFileName); PdfWriter.GetInstance (Doc, new FileStream(path, FileMode.Create)); Doc.Open(); BaseFont bfTimes = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1252, false); Font times = new Font(bfTimes, 10, Font.BOLD, Color.BLACK); iTextSharp.text.Font contentFont = iTextSharp.text.FontFactory.GetFont("Calibri", 14, iTextSharp.text.Font.BOLD); iTextSharp.text.Font contentFont1 = iTextSharp.text.FontFactory.GetFont("Calibri", 11); iTextSharp.text.Font contentFont2 = iTextSharp.text.FontFactory.GetFont("Arial", 14, Font.ITALIC); iTextSharp.text.Font contentFont3 = iTextSharp.text.FontFactory.GetFont("Arial", 10, Font.BOLDITALIC); iTextSharp.text.Font contentFont4 = iTextSharp.text.FontFactory.GetFont("Arial", 8, Font.NORMAL); iTextSharp.text.Font contentFont5 = iTextSharp.text.FontFactory.GetFont("Arial", 8, Font.BOLD); iTextSharp.text.Font contentFont6 = iTextSharp.text.FontFactory.GetFont("Arial", 8, Font.UNDERLINE); iTextSharp.text.Font contentFont7 = iTextSharp.text.FontFactory.GetFont("Arial", 8, Font.UNDERLINE | Font.NORMAL); iTextSharp.text.Font Headerstyle1 = iTextSharp.text.FontFactory.GetFont("Arial", 12, Font.BOLD); iTextSharp.text.Font paragraph = iTextSharp.text.FontFactory.GetFont("Arial", 11, Font.BOLD); string imageURLHeader = Server.MapPath("~\\Images\\innerLogo.png"); iTextSharp.text.Image headerimg = iTextSharp.text.Image.GetInstance(imageURLHeader); headerimg.ScalePercent(50f); headerimg.SetAbsolutePosition(35, Doc.PageSize.Height - 60f); PdfPTable tableH1 = new PdfPTable(11); tableH1.WidthPercentage = 100; float[] widthH = new float[] { 3.5f, 0.3f, 4.0f, 0.3f, 0.5f, 3.0f, 1.5f, 4.0f, 3.0f, 0.5f, 4.5f }; tableH1.SetWidths(widthH); PdfPCell cellH1; GrayColor gray = new GrayColor(150); GrayColor graycell = new GrayColor(220); //---------------------------------------------------------header portion //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("To: Office of the State Attorney ", Headerstyle1)); cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 6; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("REQUEST FOR", Headerstyle1)); cellH1.HorizontalAlignment = Element.ALIGN_CENTER; cellH1.BackgroundColor = gray; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 5; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("First judical Circuit", Headerstyle1)); cellH1.HorizontalAlignment = Element.ALIGN_CENTER; cellH1.PaddingLeft = 10f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 6; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("SUBPOENA DUCES TECUM", Headerstyle1)); cellH1.HorizontalAlignment = Element.ALIGN_CENTER; cellH1.BackgroundColor = gray; cellH1.PaddingLeft = 10f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 5; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //---------------------------------------------------------------- end header portion //===================1================================= cellH1 = new PdfPCell(new Phrase("Agency :", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtSupervisor.Text, contentFont7)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 3; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("Representative:", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 2; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtRepresentative.Text, contentFont7)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 2; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("Date:", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 2; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtDate.Text, contentFont7)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthBottom = 0f; cellH1.BorderWidthRight = 0f; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("REQUEST IS HEREBY MADE of the State Attorney, or his duly authorized Assistant, of the First Judicial" + "Circuit of Florida for investigative assistance and the issuance of a subpoena duces tecum for the" + "appearance and testimony of a custodian of records and / or copies of certain records, documents, and /" + "or papers pertinent to an ongoing criminal investigation, more particularly described as follows:", paragraph)); cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.PaddingLeft = 25f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //===========================2=============================== cellH1 = new PdfPCell(new Phrase("Possessor of Records:", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.PaddingLeft = 25f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 3; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtProbableCause.Text, contentFont7)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 3; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("Records Pertain To:", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 2; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtRecordsPertainTo.Text, contentFont7)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 3; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //===================================4====================================== cellH1 = new PdfPCell(new Phrase("Address:", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.PaddingLeft = 25f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtAddressIndividualBusiness.Text, contentFont7)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 10; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("Crime Under Investigation:", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.PaddingLeft = 25f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 3; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtCrimeUnderInvestigation.Text, contentFont7)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthBottom = 0f; cellH1.BorderWidthRight = 0f; cellH1.Colspan = 4; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("F.S.S.", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtFSS.Text, contentFont7)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthBottom = 0f; cellH1.BorderWidthRight = 0f; cellH1.Colspan = 3; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //---------------------------------------- cellH1 = new PdfPCell(new Phrase("Suspect(s):", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.PaddingLeft = 25f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtSuspect.Text, contentFont7)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 5; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("Offense#:", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 2; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtOffense.Text, contentFont7)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 3; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //===============5========================================== cellH1 = new PdfPCell(new Phrase("Information Requested: ", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtInformationRequested.Text, contentFont4)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.FixedHeight = 60f; cellH1.BorderWidthTop = 0.5f; cellH1.BorderWidthLeft = 0.5f; cellH1.BorderWidthRight = 0.5f; cellH1.BorderWidthBottom = 0.5f; cellH1.Colspan = 10; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //---------------------------------------------------------------------- //===============5========================================== cellH1 = new PdfPCell(new Phrase("\"No notice to suspect\" disclaimer needed? ", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 5; tableH1.AddCell(cellH1); //string chk = chkboxNo.Checked == true ? "Yes" : "No"; if(chkboxNo.Checked==true) cellH1 = new PdfPCell(new Phrase("Yes", contentFont4)); else cellH1 = new PdfPCell(new Phrase("", contentFont4)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 1f; cellH1.BorderWidthLeft = 1f; cellH1.BorderWidthRight = 1f; cellH1.BorderWidthBottom = 1f; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("Yes", contentFont4)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; tableH1.AddCell(cellH1); if (chkboxNo.Checked == true) cellH1 = new PdfPCell(new Phrase("", contentFont4)); else cellH1 = new PdfPCell(new Phrase("No", contentFont4)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.BorderWidthTop = 1f; cellH1.BorderWidthLeft = 1f; cellH1.BorderWidthRight = 1f; cellH1.BorderWidthBottom = 1f; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("No", contentFont4)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("(Required for certain companies, banks, etc.)", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 2; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //===============5========================================== cellH1 = new PdfPCell(new Phrase("Probable Cause:", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthBottom = 0f; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(txtProbableCause.Text, contentFont4)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BackgroundColor = graycell; cellH1.FixedHeight = 80f; cellH1.BorderWidthTop = 0.5f; cellH1.BorderWidthLeft = 0.5f; cellH1.BorderWidthRight = 0.5f; cellH1.BorderWidthBottom = 0.5f; cellH1.Colspan = 10; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("AUTHORIZATION: The requesting law enforcement agency has authorized the under signed representative to make the foregoing request and will be responsible for any " + "costs incurred in making said copies. Further, the undersigned here by certifies this request is made in good faith in furtherance of the official pendind" + "criminal investigation described herein and all other avenues for obtaining the described records have been exhausted.", contentFont4)); cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.PaddingLeft = 25f; cellH1.BorderWidthTop = 0f; cellH1.BorderWidthLeft = 0f; cellH1.BorderWidthRight = 0f; cellH1.BorderWidthBottom = 0f; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("Representative Signature (Required)" + "\n" + "______________________________", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 6; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("Supervisor Signature (Required)" + "\n" + "______________________________", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 6; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //================3================================== string imagepath = Server.MapPath("../ContentPages/Uploads/Signature/"); if (HypRepSig.Text != "") { iTextSharp.text.Image gif = iTextSharp.text.Image.GetInstance(imagepath + HypRepSig.Text); cellH1 = new PdfPCell(new Phrase("Signature")); gif.ScaleToFit(150, 75); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.AddElement(gif); cellH1.Colspan = 9; tableH1.AddCell(cellH1); } //================3================================== if (HypSupSig.Text != "") { iTextSharp.text.Image SupGif = iTextSharp.text.Image.GetInstance(imagepath + HypSupSig.Text); cellH1 = new PdfPCell(new Phrase("Signature")); SupGif.ScaleToFit(150, 75); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.AddElement(SupGif); cellH1.Colspan = 6; tableH1.AddCell(cellH1); } //================3================================== cellH1 = new PdfPCell(new Phrase(txtRepresentativeSig.Text, contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_MIDDLE; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; // cellH1.Colspan = 6; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase(txtSupervisorSig.Text, contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_MIDDLE; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 6; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("\n", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_RIGHT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //================3================================== cellH1 = new PdfPCell(new Phrase("________________________________________________________________________________________________________________", contentFont5)); //cellH1.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase(". . . THIS SECTION MUST BE COMPLETED BY AUTHORIZING PROSECUTOR. . .", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_CENTER; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("REQUEST GRANTED []", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); //---------------------------------- cellH1 = new PdfPCell(new Phrase("REQUEST GRANTED []", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 4; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("REASONS(S):", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 3; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("__________________________________", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 4; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("REQUEST DECLINED []", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 4; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("REASONS(S):", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 3; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("__________________________________", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 4; tableH1.AddCell(cellH1); //------------------------------------------------- cellH1 = new PdfPCell(new Phrase("SIGNATURE required", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 3; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("________________________________________________________", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 8; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("TYPE name", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 2; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("_________________________________________________________________", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 7; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("Assistant State Attorney", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 2; tableH1.AddCell(cellH1); cellH1 = new PdfPCell(new Phrase("REMINDER TO ISSUING ASA: Notice to Defendant required when obtaining medical records via subpoena duces tecum.", contentFont5)); cellH1.HorizontalAlignment = Element.ALIGN_LEFT; cellH1.BorderWidthTop = 0; cellH1.BorderWidthLeft = 0; cellH1.BorderWidthRight = 0; cellH1.BorderWidthBottom = 0; cellH1.Colspan = 11; tableH1.AddCell(cellH1); Chunk c7 = new Chunk ("\n\n" + "ORIGINAL - STATE ATTORNEY'S OFFICE", contentFont4); Paragraph p7 = new Paragraph(); p7.Alignment = Element.ALIGN_CENTER; p7.IndentationLeft = 0f; p7.Add(c7); //Chunk c8 = new Chunk // ("Supervisor Signature (Required)" + "\n" + "______________________________", contentFont4); //Paragraph p8 = new Paragraph(); //p8.Alignment = Element.ALIGN_RIGHT; //p8.IndentationLeft = 280f; //p8.Add(c8); Doc.Add(headerimg); Doc.Add(tableH1); Doc.Add(p7); //Doc.Add(p8); Doc.NewPage(); System.Xml.XmlTextReader xmlReader = new System.Xml.XmlTextReader(new StringReader(html)); HtmlParser.Parse(Doc, xmlReader); Doc.Close(); }