internal static void BuildHeaderWithBar(RepeatingAreaBuilder builder, float pageWidth) { var tableBuilder = builder.AddTable(); tableBuilder .SetBorder(Stroke.None) .SetWidth(XUnit.FromPercent(100)) .AddColumnPercentToTable("", 50) .AddColumnPercentToTable("", 50); var rowBuilder = tableBuilder.AddRow(); rowBuilder.AddCell() .AddImage(Path.Combine("images", "ra-logo-2x.png"), XSize.FromHeight(120)); rowBuilder.AddCell() .SetHorizontalAlignment(HorizontalAlignment.Right) .AddImage(Path.Combine("images", "ra-barcode.png"), XSize.FromHeight(120)); builder.AddParagraph() .SetAlignment(HorizontalAlignment.Right) .SetUrlStyle( StyleBuilder.New() .SetFont(URL_FONT)) .AddUrlToParagraph("http://www.bestlandlords.com/billing"); builder.AddLine(pageWidth, 1.5f, Stroke.Solid, Color.Gray) .SetMarginTop(5); }
public static void AddParagraph(RepeatingAreaBuilder builder, string text, FontBuilder paragrpaphFont, float bottomMagin = 0.0f) { var paragraphBuilder = builder.AddParagraph(); paragraphBuilder.AddTextToParagraph(text) .SetMarginBottom(bottomMagin) .SetFont(paragrpaphFont); }
private void BuildFooter(RepeatingAreaBuilder footerBuilder) { var paragraphBuilder = footerBuilder.AddParagraph(); paragraphBuilder .SetAlignment(HorizontalAlignment.Right) .SetFont(FNT7) .AddTextToParagraph("1nnnnn-XX-XXX-00"); }
private static SectionBuilder AddFooter(this SectionBuilder s) { RepeatingAreaBuilder footer = s.AddFooterToBothPages(160); footer .AddLine() .SetColor(Color.FromRgba(106.0 / 255.0, 85.0 / 255.0, 189.0 / 255.0)) .SetStroke(Stroke.Solid) .SetWidth(2); footer .AddParagraph() .SetMargins(0, 20, 0, 10) .AddText("Your Home Provider") .SetFont(BoldFont); footer .AddParagraph() .SetMargins(0, 0, 0, 0) .SetFont(FooterFont) .AddTextToParagraph("Your Home Provider, Inc.") .AddTabSymbol() .AddUrlToParagraph("*****@*****.**") .AddTabulation(280); footer .AddParagraph() .SetMargins(0, 0, 0, 0) .SetFont(FooterFont) .AddTextToParagraph("200 John Doe Street") .AddTabSymbol() .AddUrlToParagraph("https://yourhomeprovider.com") .AddTabulation(280); footer .AddParagraph() .SetMargins(0, 0, 0, 0) .SetFont(FooterFont) .AddText(new[] { "Santa Barbara, CA 000001", "United States" }); footer .AddParagraph() .SetMargins(0, 0, 0, 0) .SetFont(FooterFont) .AddText("*VAT / GST paid directly by Your Home Provider, Inc., where applicable"); return(s); }
internal static void BuildFooter(RepeatingAreaBuilder builder) { ParagraphBuilder paragraphBuilder = builder .AddParagraph(); paragraphBuilder .SetAlignment(HorizontalAlignment.Right) .AddTextToParagraph(" ", PAGE_NUMBER_FONT, true) .AddTextToParagraph("Page ", PAGE_NUMBER_FONT) .AddPageNumber().SetFont(PAGE_NUMBER_FONT); }
private static SectionBuilder AddRightArea(this SectionBuilder s) { RepeatingAreaBuilder rightAreaBuilder = s.AddRptAreaRightToBothPages(200f); rightAreaBuilder .AddLine() .SetWidth(2f); rightAreaBuilder .AddParagraph() .SetMarginTop(10f) .AddText(" Contact") .SetFontSize(16f); rightAreaBuilder .AddParagraph() .SetMarginTop(7f) .SetFontSize(14f) .AddTextToParagraph("+1-202-555-0163 ") .AddText("(Mobile)") .SetFontColor(Color.Gray); rightAreaBuilder .AddParagraph() .SetFontSize(14f) .AddTextToParagraph("*****@*****.**"); rightAreaBuilder .AddParagraph() .SetMarginTop(10f) .SetFontSize(14f) .SetTextOverflowAction(TextOverflowAction.Ellipsis) .AddUrlToParagraph("https://www.linkedin.com/in/williamhgates", "www.linkedin.com/in/williamhgates") .AddText(" (LinkedIn)") .SetFontColor(Color.Gray); rightAreaBuilder .AddParagraph() .SetFontSize(14f) .SetTextOverflowAction(TextOverflowAction.Ellipsis) .AddUrlToParagraph("https://www.gatesnotes.com/", "www.gatesnotes.com") .AddText(" (Site)") .SetFontColor(Color.Gray); return(s); }
public static void AddNumberedListToParagraph(RepeatingAreaBuilder builder, string[] items, FontBuilder font, int leftMargin) { foreach (String text in items) { var paragraphBuilder = builder.AddParagraph(); paragraphBuilder .SetMarginLeft(leftMargin) .SetFont(font) .SetListNumbered(NumerationStyle.Arabic) .AddTextToParagraph(text); } }