本文整理汇总了C#中iTextSharp.AddCell方法的典型用法代码示例。如果您正苦于以下问题:C# iTextSharp.AddCell方法的具体用法?C# iTextSharp.AddCell怎么用?C# iTextSharp.AddCell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iTextSharp
的用法示例。
在下文中一共展示了iTextSharp.AddCell方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddNewCell
// adiciona uma célula com o texto organizado em várias linhas diferentes
protected void AddNewCell(iTextSharp.text.Table table, List<string> paragraphs, iTextSharp.text.Font font)
{
Cell cell = new Cell();
foreach (string paragraph in paragraphs)
{
iTextSharp.text.Chunk chunk = new iTextSharp.text.Chunk(ConvertNewLines(paragraph), font);
Paragraph p = new Paragraph(10, chunk);
cell.Add(p);
}
cell.VerticalAlignment = Element.ALIGN_TOP;
cell.HorizontalAlignment = Element.ALIGN_LEFT;
table.AddCell(cell);
}
示例2: SetContactInfo
protected static void SetContactInfo(Misc.sp_052_displayConfirmationRow row, iTextSharp.text.Table tblMain)
{
Phrase ph = new Phrase();
ph.Add(GetTextPhrase("--- Header Information ---\n", true, 14));
ph.Add(GetTextPhrase("Confirmation Number:", true));
ph.Add(GetTextPhrase(row.ConfirmationID+ "\n" , false));
ph.Add(GetTextPhrase("UtilityName:", true));
ph.Add(GetTextPhrase(row.UtilityName + "\n", false));
tblMain.AddCell(ph);
ph = new Phrase();
ph.Add(GetTextPhrase("--- Rebate Summary ---\n", true, 14));
ph.Add(GetTextPhrase("IncentiveName: ", true));
ph.Add(GetTextPhrase(row.IncentiveName + "\n", false));
ph.Add(GetTextPhrase("Summary: ", true));
ph.Add(GetTextPhrase(row.Summary + "\n" , false));
tblMain.AddCell(ph);
ph = new Phrase();
ph.Add(GetTextPhrase("--- Item Purchased ---\n", true, 14));
ph.Add(GetTextPhrase("CategoryLabel:", true));
ph.Add(GetTextPhrase(row.CategoryLabel + "\n", false));
ph.Add(GetTextPhrase("BrandName: ", true));
ph.Add(GetTextPhrase(row.BrandName + "\n" , false));
ph.Add(GetTextPhrase("RatingModelNumber: ", true));
ph.Add(GetTextPhrase(row.RatingModelNumber + "\n", false));
tblMain.AddCell(ph);
ph = new Phrase();
ph.Add(GetTextPhrase("--- My Information ---\n", true, 14));
ph.Add(GetTextPhrase("First Name:", true));
ph.Add(GetTextPhrase(row.FName + "\n" , false));
ph.Add(GetTextPhrase("Last Name: ", true));
ph.Add(GetTextPhrase(row.LName + "\n", false));
ph.Add(GetTextPhrase("Street: ", true));
ph.Add(GetTextPhrase(row.Street + "\n" , false));
ph.Add(GetTextPhrase("Apartment: ", true));
ph.Add(GetTextPhrase(row.Apartment + "\n", false));
ph.Add(GetTextPhrase("City: ", true));
ph.Add(GetTextPhrase(row.City + "\n" , false));
ph.Add(GetTextPhrase("State: ", true));
ph.Add(GetTextPhrase(row.State + "\n", false));
ph.Add(GetTextPhrase("Zip: ", true));
ph.Add(GetTextPhrase(row.ZIP + "\n" , false));
ph.Add(GetTextPhrase("Logon Email: ", true));
ph.Add(GetTextPhrase(row.logonEmail + "\n", false));
ph.Add(GetTextPhrase("UtilityAccountNumber: \n", true));
ph.Add(GetTextPhrase(row.UtilityAccountNumber + "\n" , false));
tblMain.AddCell(ph);
//Utility Bill Payer, if other than me
ph = new Phrase();
ph.Add(GetTextPhrase("--- Utility Bill Payer --- \n", true,14));
ph.Add(GetTextPhrase(row.B_FName + "\n", false));
ph.Add(GetTextPhrase(row.B_LName + "\n", false));
ph.Add(GetTextPhrase(row.B_Street + "\n", false));
ph.Add(GetTextPhrase(row.B_Apartment + "\n", false));
ph.Add(GetTextPhrase(row.B_City + "\n", false));
ph.Add(GetTextPhrase(row.B_ZIP + "\n", false));
ph.Add(GetTextPhrase(row.B_Phone + "\n", false));
ph.Add(GetTextPhrase(row.B_email + "\n", false));
tblMain.AddCell(ph);
ph = new Phrase();
ph.Add(GetTextPhrase("--- Mail Rebate To --- \n", true, 14));
ph.Add(GetTextPhrase(row.ContactFName + "\n", false));
ph.Add(GetTextPhrase(row.ContactLName + "\n", false));
ph.Add(GetTextPhrase(row.ContactDept + "\n", false));
ph.Add(GetTextPhrase(row.ContactStreet + "\n", false));
ph.Add(GetTextPhrase(row.ContactCity + "\n", false));
ph.Add(GetTextPhrase(row.ContactState + "\n", false));
ph.Add(GetTextPhrase(row.ContactZip + "\n", false));
ph.Add(GetTextPhrase(row.ContactPhone + "\n", false));
ph.Add(GetTextPhrase(row.ContactWebsite + "\n", false));
tblMain.AddCell(ph);
}
示例3: SetTitle
protected static void SetTitle(Misc.sp_052_displayConfirmationRow row, iTextSharp.text.Table tblMain)
{
Cell CellTitle = new Cell();
CellTitle.Colspan = 2;
CellTitle.Add(GetTitlePhrase("Rebate Form (Confirmation ID " + row.ConfirmationID + ") \n\n"));
CellTitle.HorizontalAlignment = Element.ALIGN_CENTER;
tblMain.AddCell(CellTitle);
}