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); }
internal static void BuildHeader(RepeatingAreaBuilder builder, float pageWidth) { builder .AddImage(Path.Combine("images", "ra-logo-2x.png"), XSize.FromHeight(60)); builder.AddLine(pageWidth, 1.5f, Stroke.Solid, Color.Gray) .SetMarginTop(5); }
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); }
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); }