public void WriteSignatures(PdfStructureElement tag) { if (this.Strategy.isIncludeFinalSignature == false) return; PdfStructureElement part = new PdfStructureElement(tag, new PdfName("Part")); content.BeginMarkedContentSequence(part); content.EndMarkedContentSequence(); helper.AddLine(2); helper.SetMargins(1f); SetWidths(signaturecolumns); SetColumns(); var ChiefGMO = helper.Portfolio.History[1].UpdatedBy; var BranchChief = helper.Portfolio.History[0].UpdatedBy; var DivisionDirector = helper.Portfolio.History[2].UpdatedBy; var NIEHSDirector = helper.Portfolio.History[3].UpdatedBy; var BranchChief_ApprovalDate = helper.Portfolio.History[0].UpdateDate.ToString("d"); var ChiefGMO_ApprovalDate = helper.Portfolio.History[0].UpdateDate.ToString("d"); var DivisionDirector_ApprovalDate = helper.Portfolio.History[0].UpdateDate.ToString("d"); var NIEHSDirector_ApprovalDate = helper.Portfolio.History[0].UpdateDate.ToString("d"); var TitleProxyOrDirector = helper.Portfolio.History[3].ValueOld.Contains("Pending NIEHS Director") ? "Director NIEHS" : "Deputy Director OER"; var table = new tTable(this, ""); table.ParentTag = part; table.ColumnCount = Columns.Length; var dict = new PdfDictionary(); // row 1 var cell = new tCell(0, "P", it.Element.ALIGN_LEFT, GrantFonts.BOLD, BranchChief ); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString(string.Format("Branch Chief {0}",BranchChief))); cell.Dictionary = dict; cell.fontSize = 6.0f; var row = new tRow(); row.Add(cell); cell = new tCell(1, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, BranchChief_ApprovalDate); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString(string.Format("Date {0}", ChiefGMO_ApprovalDate))); cell.Dictionary = dict; cell.fontSize = 6.0f; row.Add(cell); cell = new tCell(3, "P", it.Element.ALIGN_LEFT, GrantFonts.BOLD, ChiefGMO); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString(string.Format("Chief GMO {0}",ChiefGMO))); cell.Dictionary = dict; cell.fontSize = 6.0f; row.Add(cell); cell = new tCell(4, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL,ChiefGMO_ApprovalDate); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString(string.Format("Date {0}",BranchChief_ApprovalDate))); cell.Dictionary = dict; cell.fontSize = 6.0f; row.Add(cell); // 6, 7 cell = new tCell(6, "P", DivisionDirector); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString(string.Format("Division Director {0}",DivisionDirector))); cell.Dictionary = dict; cell.Font = GrantFonts.BOLD; cell.fontSize = 6.0f; row.Add(cell); cell = new tCell(7, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, DivisionDirector_ApprovalDate); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString(string.Format("Date {0}",DivisionDirector_ApprovalDate))); cell.Dictionary = dict; cell.fontSize = 6.0f; row.Add(cell); // 9, 10 cell = new tCell(9, "P", it.Element.ALIGN_LEFT, GrantFonts.BOLD, NIEHSDirector); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString(string.Format("{0} {1}",TitleProxyOrDirector, NIEHSDirector))); cell.Dictionary = dict; cell.fontSize = 6.0f; row.Add(cell); cell = new tCell(10, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, NIEHSDirector_ApprovalDate); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString(string.Format("Date {0}", NIEHSDirector_ApprovalDate))); cell.Dictionary = dict; cell.fontSize = 6.0f; row.Add(cell); table.Add(row); // row 2 row = new tRow(); cell = new tCell(); cell.MakeDoubleLine(0, 2); row.Add(cell); cell = new tCell(); cell.MakeDoubleLine(3, 2); row.Add(cell); cell = new tCell(); cell.MakeDoubleLine(6, 2); row.Add(cell); cell = new tCell(); cell.MakeDoubleLine(9, 2); row.Add(cell); table.Add(row); // row 3 row = new tRow(); cell = new tCell(0, "P", "Branch Chief"); cell.isSpoken = false; cell.fontSize = 6.0f; row.Add(cell); cell = new tCell(1, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, "Date"); cell.isSpoken = false; cell.fontSize = 6.0f; row.Add(cell); cell = new tCell(3, "P", "Chief GMO"); cell.isSpoken = false; cell.fontSize = 6.0f; row.Add(cell); cell = new tCell(4, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, "Date"); cell.isSpoken = false; cell.fontSize = 6.0f; row.Add(cell); // 6, 7 cell = new tCell(6, "P", "Division Director"); cell.isSpoken = false; cell.fontSize = 6.0f; row.Add(cell); cell = new tCell(7, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, "Date"); cell.isSpoken = false; cell.fontSize = 6.0f; row.Add(cell); // 9, 10 cell = new tCell(9, "P", TitleProxyOrDirector); cell.isSpoken = false; cell.fontSize = 6.0f; row.Add(cell); cell = new tCell(10, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, "Date"); cell.isSpoken = false; cell.fontSize = 6.0f; row.Add(cell); table.Add(row); table.Write(); }
public void WriteOERApprovalSignature(PdfStructureElement tag) { if (this.Strategy.isIncludeOERSignature == false) return; PdfStructureElement part = new PdfStructureElement(tag, new PdfName("Part")); content.BeginMarkedContentSequence(part); content.EndMarkedContentSequence(); helper.AddLine(2); helper.SetMargins(1f); SetWidths(signaturecolumns); SetColumns(); var table = new tTable(this, ""); table.ParentTag = part; table.ColumnCount = Columns.Length; var dict = new PdfDictionary(); // row 1 var cell = new tCell(0, "P", it.Element.ALIGN_LEFT, GrantFonts.BOLD, ""); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString("Deputy Director OER Approval")); cell.Dictionary = dict; cell.fontSize = 6.0f; var row = new tRow(); row.Add(cell); cell = new tCell(1, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, ""); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString("Date ")); cell.Dictionary = dict; cell.fontSize = 6.0f; row.Add(cell); table.Add(row); // row 2 row = new tRow(); cell = new tCell(); cell.MakeDoubleLine(0, 2); row.Add(cell); table.Add(row); // row 3 row = new tRow(); cell = new tCell(0, "P", "Deputy Director OER Approval"); cell.isSpoken = false; cell.fontSize = 6.0f; row.Add(cell); cell = new tCell(1, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, "Date"); cell.isSpoken = false; cell.fontSize = 6.0f; row.Add(cell); table.Add(row); table.Write(); }
public override void WriteSignatures(PdfStructureElement tag) { PdfStructureElement part = new PdfStructureElement(tag, new PdfName("Part")); content.BeginMarkedContentSequence(part); content.EndMarkedContentSequence(); helper.AddLine(2); helper.SetMargins(1f); SetWidths(fivecolumns); SetColumns(); CMWApprovalSignature pAdmin = helper.RFA.ApprovalSignatureBlock.ProgramOfficer; CMWApprovalSignature bChief = helper.RFA.ApprovalSignatureBlock.BranchChief; CMWApprovalSignature dirOEP = helper.RFA.ApprovalSignatureBlock.DirectorOEP; CMWApprovalSignature dirDER = helper.RFA.ApprovalSignatureBlock.DirectorDER; var table = new tTable(this, ""); table.ParentTag = part; table.ColumnCount = Columns.Length; var dict = new PdfDictionary(); // row 1 var cell = new tCell(0, "P", it.Element.ALIGN_LEFT, GrantFonts.BOLD, pAdmin.FullName); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString("Program Administrator " + pAdmin.FullName)); cell.Dictionary = dict; var row = new tRow(); row.Add(cell); cell = new tCell(1, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, pAdmin.ApprovalDate.ToString("d")); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString("Date " + pAdmin.ApprovalDate.ToString("d"))); cell.Dictionary = dict; row.Add(cell); cell = new tCell(3, "P", it.Element.ALIGN_LEFT, GrantFonts.BOLD, bChief.FullName); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString("Branch Chief " + bChief.FullName)); cell.Dictionary = dict; row.Add(cell); cell = new tCell(4, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, bChief.ApprovalDate.ToString("d")); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString("Date " + bChief.ApprovalDate.ToString("d"))); cell.Dictionary = dict; row.Add(cell); table.Add(row); // row 2 row = new tRow(); cell = new tCell(); cell.MakeDoubleLine(0, 2); row.Add(cell); cell = new tCell(); cell.MakeDoubleLine(3, 2); row.Add(cell); table.Add(row); // row 3 row = new tRow(); cell = new tCell(0, "P", "Program Administrator"); cell.isSpoken = false; row.Add(cell); cell = new tCell(1, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, "Date"); cell.isSpoken = false; row.Add(cell); cell = new tCell(3, "P", "Branch Chief"); cell.isSpoken = false; row.Add(cell); cell = new tCell(4, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, "Date"); cell.isSpoken = false; row.Add(cell); table.Add(row); // row 4 row = new tRow(); table.Add(row); // row 5 row = new tRow(); cell = new tCell(0, "P", dirOEP.FullName); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString("Director, Office of Extramural Policy " + dirOEP.FullName)); cell.Dictionary = dict; cell.Font = GrantFonts.BOLD; row.Add(cell); cell = new tCell(1, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, dirOEP.ApprovalDate.ToString("d")); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString("Date " + dirOEP.ApprovalDate.ToString("d"))); cell.Dictionary = dict; row.Add(cell); string dirDERFullName = (dirDER.IsProxy == false) ? dirDER.FullName : dirDER.FullName + @" for Director, Division of Extramural Research"; cell = new tCell(3, "P", it.Element.ALIGN_LEFT, GrantFonts.BOLD, dirDERFullName); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString("Director, Division of Extramural Research " + dirDERFullName)); cell.Dictionary = dict; row.Add(cell); cell = new tCell(4, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, dirDER.ApprovalDate.ToString("d")); dict = new PdfDictionary(); dict.Put(PdfName.ACTUALTEXT, new PdfString("Date " + dirDER.ApprovalDate.ToString("d"))); cell.Dictionary = dict; row.Add(cell); table.Add(row); // row 6 row = new tRow(); cell = new tCell(); cell.MakeDoubleLine(0, 2); row.Add(cell); cell = new tCell(); cell.MakeDoubleLine(3, 2); row.Add(cell); table.Add(row); // row 7 row = new tRow(); cell = new tCell(0, "P", "Director, Office of Extramural Policy"); cell.isSpoken = false; row.Add(cell); cell = new tCell(1, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, "Date"); cell.isSpoken = false; row.Add(cell); cell = new tCell(3, "P", "Director, Division of Extramural Research"); cell.isSpoken = false; row.Add(cell); cell = new tCell(4, "P", it.Element.ALIGN_LEFT, GrantFonts.NORMAL, "Date"); cell.isSpoken = false; row.Add(cell); table.Add(row); table.Write(); AddSignatureComment(part, dirDER); }