private void AddWhatsNext(SectionBuilder sectionBuilder)
        {
            var paragraphBuilder = sectionBuilder.AddParagraph("What's next?");

            paragraphBuilder.SetMarginTop(42).SetFont(FNT11B);
            sectionBuilder.AddLine(PageWidth, 2, Stroke.Solid);
            var tableBuilder = sectionBuilder.AddTable();

            tableBuilder
            .SetWidth(XUnit.FromPercent(100))
            .SetBorder(Stroke.None)
            .AddColumnPercentToTable("", 50)
            .AddColumnPercent("", 50);
            int halfSize    = WhatsNextData.Count - WhatsNextData.Count / 2;
            var rowBuilder  = tableBuilder.AddRow();
            var cellBuilder = rowBuilder.AddCell();

            cellBuilder.SetPadding(0, 6, 4, 0).SetFont(FNT8);
            FillWhatNextHalf(0, halfSize, cellBuilder);
            cellBuilder = rowBuilder.AddCell();
            cellBuilder.SetPadding(4, 6, 0, 0).SetFont(FNT8);
            FillWhatNextHalf(halfSize, WhatsNextData.Count, cellBuilder);
            paragraphBuilder =
                sectionBuilder.AddParagraph("Have a good flight!");
            paragraphBuilder
            .SetAlignment(HorizontalAlignment.Center)
            .SetMarginTop(20)
            .SetMarginBottom(30)
            .SetFont(FNT17);
            sectionBuilder
            .AddLine(PageWidth, 0.5f, Stroke.Dashed).SetMarginBottom(24);
        }
Esempio n. 2
0
 private void BuildSignatures(SectionBuilder sectionBuilder,
                              Sign[] data)
 {
     for (int i = 0, l = data.Length; i < l; i++)
     {
         Sign sign             = data[i];
         var  paragraphBuilder = sectionBuilder.AddParagraph();
         if (i == 0)
         {
             paragraphBuilder.SetMarginTop(SIGNATURES_TOP_MARGIN);
         }
         if (i < 2)
         {
             paragraphBuilder
             .SetFont(HEADER_FONT)
             .AddTextToParagraph(
                 i == 0 ?
                 "LANDLORD(S) SIGNATURE" :
                 "TENANT(S) SIGNATURE"
                 )
             .SetMarginBottom(SIGNATURE_BOTTOM_MARGIN);
             paragraphBuilder = sectionBuilder.AddParagraph();
         }
         paragraphBuilder
         .AddTextToParagraph(sign.name + " ", HEADER_FONT, true)
         .AddTabulation(380, TabulationType.Left,
                        TabulationLeading.BottomLine);
         if (sign.value != null)
         {
             paragraphBuilder = sectionBuilder.AddParagraph()
                                .AddTextToParagraph(sign.value);
         }
         paragraphBuilder.SetMarginBottom(SIGNATURE_BOTTOM_MARGIN);
     }
 }
        private void AddFirstBlock(SectionBuilder sectionBuilder,
                                   string title, StringWithUrl stringWithUrl)
        {
            var paragraphBuilder = sectionBuilder.AddParagraph();

            paragraphBuilder.SetMarginBottom(17).SetFont(FNT20B).AddText(title);
            paragraphBuilder = sectionBuilder.AddParagraph();
            paragraphBuilder.SetFont(FNT11);
            foreach (Text text in stringWithUrl.Texts)
            {
                paragraphBuilder.AddText(text.Content);
            }
        }
Esempio n. 4
0
        private void BuildTextsPages(SectionBuilder sectionBuilder)
        {
            var paragraphBuilder = sectionBuilder.AddParagraph();

            paragraphBuilder.SetFont(TEXT_FONT)
            .SetMarginBottom(PARAGRAPH_BOTTOM_MARGIN)
            .AddTextToParagraph("This agreement, dated December 9 2020, by and between a business entity known as ")
            .AddTextToParagraph(landlord.Name)
            .AddTextToParagraph(" of ")
            .AddTextToParagraph(landlord.MailAddress)
            .AddTextToParagraph(", hereinafter known as the “")
            .AddTextToParagraph(landlord.KnownAs)
            .AddTextToParagraph("”.");
            paragraphBuilder = sectionBuilder.AddParagraph();
            paragraphBuilder
            .SetFont(HEADER_FONT).SetMarginBottom(PARAGRAPH_BOTTOM_MARGIN)
            .AddTextToParagraph("AND");
            paragraphBuilder = sectionBuilder.AddParagraph();
            paragraphBuilder.SetFont(TEXT_FONT)
            .SetMarginBottom(PARAGRAPH_BOTTOM_MARGIN)
            .AddTextToParagraph("2 individuals known as ")
            .AddTextToParagraph(AsList(tenant, KnownAsField))
            .AddTextToParagraph(", hereinafter known as the “Tenant(s)”, agree to the following: ");
            InitDictionary();
            foreach (AgreementText article in agreementText)
            {
                paragraphBuilder = sectionBuilder.AddParagraph();
                paragraphBuilder.AddText(article.Header).SetFont(HEADER_FONT);
                paragraphBuilder.SetMarginBottom(PARAGRAPH_BOTTOM_MARGIN);
                int last = article.Text.Length - 1;
                if (last < 0)
                {
                    continue;
                }
                paragraphBuilder.SetFont(TEXT_FONT).AddText(" ");
                for (int i = 0; ; i++)
                {
                    paragraphBuilder.AddText(
                        SubsPlaceholders(article.Text[i]));
                    if (i == last)
                    {
                        break;
                    }
                    paragraphBuilder = sectionBuilder.AddParagraph()
                                       .SetFont(TEXT_FONT)
                                       .SetMarginBottom(PARAGRAPH_BOTTOM_MARGIN);
                }
            }
        }
Esempio n. 5
0
 private static SectionBuilder AddReceiptTitle(this SectionBuilder s)
 {
     s.AddImage(ImageUrl).SetScale(ScalingMode.OriginalSize).SetAlignment(HorizontalAlignment.Center);
     s.AddParagraph("Receipt").SetMargins(0, 20, 0, 10).SetFont(TitleFont).SetAlignment(HorizontalAlignment.Center);
     s.AddLine().SetColor(Color.FromRgba(106.0 / 255.0, 85.0 / 255.9, 189.0 / 255.0)).SetStroke(Stroke.Solid).SetWidth(2);
     return(s);
 }
        private void AddBlockTitle(SectionBuilder sectionBuilder, string title)
        {
            var paragraphBuilder = sectionBuilder.AddParagraph();

            paragraphBuilder
            .SetMarginTop(12).SetMarginBottom(4).SetFont(FNT12B).AddText(title);
        }
 private void BuildRouteInfo(SectionBuilder sectionBuilder)
 {
     sectionBuilder.AddParagraph("Route")
     .SetFont(FNT11_B).SetMarginTop(22);
     sectionBuilder.AddLine(PageWidth, 2f, Stroke.Solid);
     FillRouteInfoTable(sectionBuilder.AddTable());
 }
Esempio n. 8
0
 internal static SectionBuilder AddContractText(this SectionBuilder s)
 {
     foreach (var paragraph in ContractContent)
     {
         s.AddParagraph(paragraph).SetFont(DocumentFont).SetJustifyAlignment(true);
     }
     return(s);
 }
Esempio n. 9
0
 internal static SectionBuilder AddContractTitle(this SectionBuilder s)
 {
     s.AddParagraph("House Rental Contract")
     .SetAlignment(HorizontalAlignment.Center)
     .SetMargins(0, 0, 0, 20)
     .SetFont(TitleFont);
     return(s);
 }
        private void BuildAboutTrip(SectionBuilder sectionBuilder)
        {
            sectionBuilder.AddParagraph("About your trip")
            .SetFont(FNT11_B).SetMarginTop(14);
            var lineBuilder = sectionBuilder.AddLine(PageWidth, 2f, Stroke.Solid);

            lineBuilder.SetMarginBottom(10);
            BuildAboutList(sectionBuilder);
        }
        private void AddInfoTitle(SectionBuilder sectionBuilder)
        {
            var paragraphBuilder = sectionBuilder.AddParagraph();

            paragraphBuilder
            .SetMarginTop(17)
            .SetFont(FNT9)
            .AddTextToParagraph("If any of this following has changed since your last statement, please indicate…");
        }
Esempio n. 12
0
        public static void AddParagraph(SectionBuilder sectionBuilder, string text,
                                        FontBuilder paragrpaphFont, float bottomMagin = 0.0f)
        {
            var paragraphBuilder = sectionBuilder.AddParagraph();

            paragraphBuilder.AddTextToParagraph(text)
            .SetMarginBottom(bottomMagin)
            .SetFont(paragrpaphFont);
        }
Esempio n. 13
0
        private static SectionBuilder AddReceiptText(this SectionBuilder s)
        {
            ParagraphBuilder p = s.AddParagraph()
                                 .SetMargins(0, 20, 0, 10)
                                 .SetFont(DocumentFont);

            p.AddText(ReceiptText);
            p.AddUrl("*****@*****.**");
            return(s);
        }
        private void BuildCut(SectionBuilder sectionBuilder)
        {
            var paragraphBuilder = sectionBuilder.AddParagraph();

            paragraphBuilder
            .SetAlignment(HorizontalAlignment.Center)
            .SetFont(FNT9B).SetMarginTop(20)
            .AddTextToParagraph("Please retain statement for your records");
            sectionBuilder.AddLine(PageWidth, 0.5f, Stroke.Dashed);
        }
        private void AddBlockText(SectionBuilder sectionBuilder,
                                  StringWithUrl stringWithUrl, FontBuilder font, float topMargin = 0f)
        {
            var paragraphBuilder =
                sectionBuilder.AddParagraph().SetFont(font).SetMarginTop(topMargin);

            foreach (Text text in stringWithUrl.Texts)
            {
                paragraphBuilder
                .AddText(text.Content);
            }
        }
 private void AddBlockList(SectionBuilder sectionBuilder, StringWithUrl[] listWithUrls)
 {
     foreach (StringWithUrl item in listWithUrls)
     {
         var paragraphBuilder = sectionBuilder.AddParagraph();
         paragraphBuilder
         .SetMarginLeft(12).SetFont(FNT11).SetListBulleted(ListBullet.Bullet);
         foreach (Text text in item.Texts)
         {
             AddTextOrUrl(paragraphBuilder, text);
         }
     }
 }
 private void BuildAboutList(SectionBuilder sectionBuilder)
 {
     foreach (String text in TripData)
     {
         var paragraphBuilder = sectionBuilder.AddParagraph();
         paragraphBuilder
         .SetMarginLeft(8)
         .SetFont(FNT9)
         .SetListBulleted()
         .AddTextToParagraph(
             text.Replace("{company.name}", TicketData.Company));
     }
 }
Esempio n. 18
0
        private void AddServiceFeeSummaryParagrpaph(SectionBuilder sectionBuilder)
        {
            AddParagraph(sectionBuilder, "Monthly service fee summary", FNT7_9B, 4.8f);
            var paragraphBuilder = sectionBuilder.AddParagraph();

            paragraphBuilder
            .SetUrlStyle(
                StyleBuilder.New()
                .SetFont(FNT7_2URL)
                .SetBorder(0, Stroke.None, Color.White)
                )
            .SetFont(FNT7_2)
            .AddTextToParagraph(
                "For a complete list of fees and detailed account information, please see the " +
                statementInfo.BankName +
                " Fee and Information Schedule and Account Agreement applicable to your account or talk to a banker. Go to "
                )
            .AddUrlToParagraph("https://" +
                               statementInfo.Online +
                               "/feefaq", statementInfo.Online + "/feefaq")
            .AddTextToParagraph(
                " to find answers to common questions about the monthly service fee on your account.");
        }
Esempio n. 19
0
        internal static SectionBuilder AddSignatures(this SectionBuilder s)
        {
            foreach (var paragraph in LastPageContent)
            {
                s.AddParagraph(paragraph).SetFont(DocumentFont).SetJustifyAlignment(true);
            }

            s.AddParagraph()
            .SetMargins(0, 40, 0, 0)
            .AddTabSymbol().AddTabulationInPercent(20, TabulationType.Right, TabulationLeading.BottomLine)
            .AddTabSymbol().AddTabSymbol().AddTabulationInPercent(60, TabulationType.Left).AddTabulationInPercent(100, TabulationType.Right, TabulationLeading.BottomLine);
            s.AddParagraph()
            .AddTabSymbol().AddTextToParagraph("(Date)").AddTabulationInPercent(10, TabulationType.Center)
            .AddTabSymbol().AddTextToParagraph("(Renter)").AddTabulationInPercent(80, TabulationType.Center);
            s.AddParagraph(" ");
            s.AddParagraph()
            .AddTabSymbol().AddTabulationInPercent(20, TabulationType.Right, TabulationLeading.BottomLine)
            .AddTabSymbol().AddTabSymbol().AddTabulationInPercent(60, TabulationType.Left).AddTabulationInPercent(100, TabulationType.Right, TabulationLeading.BottomLine);
            s.AddParagraph()
            .AddTabSymbol().AddTextToParagraph("(Date)").AddTabulationInPercent(10, TabulationType.Center)
            .AddTabSymbol().AddTextToParagraph("(Landlord)").AddTabulationInPercent(80, TabulationType.Center);

            return(s);
        }
        public static DocumentBuilder AddAfterschoolAgreement(this DocumentBuilder builder)
        {
            var            imageDir    = Path.Combine(Directory.GetCurrentDirectory(), "Content", "Images", "AfterschoolAgreement");
            var            checkboxUrl = Path.Combine(imageDir, "Checkbox.png");
            var            logoUrl     = Path.Combine(imageDir, "SchoolLogo.jpg");
            SectionBuilder section     = builder.AddSection()
                                         .SetSize(PaperSize.Letter)
                                         .SetOrientation(PageOrientation.Portrait);

            // HEADER BLOCK
            section.AddTable()
            .SetContentRowStyleBorder(borderBuilder => borderBuilder.SetStroke(Stroke.None))
            .AddColumnToTable("", 52)
            .AddColumnToTable("", XUnit.FromPercent(40))
            .AddColumnToTable("", XUnit.FromPercent(60))
            .AddRow()
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Left)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .AddImageToCell(logoUrl, 65, 45, ScalingMode.UserDefined)
            .ToRow()
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Center)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .SetFontSize(12)
            .AddParagraph("AFTERSCHOOL")
            .SetBold()
            .ToCell()
            .AddParagraphToCell("BANK DRAFT FORM")
            .ToRow()
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Center)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .AddParagraphToCell("REGISTRATION PACKET  PG. 4 of 4")
            .SetBackColor(Color.Black)
            .SetFont(Fonts.Courier(12).SetColor(Color.White).SetBold())
            .ToTable();

            // TITLE BLOCK
            section.AddParagraph("BEST SCHOOL of Twin Peaks ")
            .SetMarginTop(5)
            .SetBold()
            .SetFontColor(Color.Gray)
            .SetFontSize(12)
            .AddText("Afterschool ")
            .SetFontColor(Color.Black)
            .ToParagraph()
            .AddTextToParagraph("Agreement ACH/CC Automatic Payment Option");

            // STEP 1 BLOCK
            section.AddParagraph("STEP #1")
            .SetBackColor(Color.FromRgba(0.3f, 0.3f, 0.3f))
            .SetFont(Fonts.Courier(16).SetColor(Color.White).SetBold());
            section.AddParagraph()
            .SetMarginLeft(0)
            .SetBorderWidth(0)
            .SetFontSize(4)
            .AddTabSymbol()
            .AddTabulationInPercent(100, TabulationType.Right, TabulationLeading.BottomLine);
            section.AddParagraph()
            .SetFontSize(6)
            .AddTextToParagraph("CHILD'S FIRST NAME")
            .AddTabSymbol()
            .AddTextToParagraph("MIDDLE INITIAL")
            .AddTabSymbol()
            .AddTextToParagraph("LAST NAME")
            .AddTabulationInPercent(35, TabulationType.Left)
            .AddTabulationInPercent(65, TabulationType.Left);
            section.AddParagraph()
            .SetMarginLeft(0)
            .SetMarginTop(15)
            .SetBorderWidth(0)
            .SetFontSize(6)
            .AddTabSymbol()
            .AddTabulationInPercent(100, TabulationType.Right, TabulationLeading.BottomLine);
            section.AddParagraph()
            .SetFontSize(6)
            .AddTextToParagraph("PHONE NUMBER (DAY)")
            .AddTabSymbol()
            .AddTextToParagraph("PHONE NUMBER (EVENING)")
            .AddTabulationInPercent(65, TabulationType.Left);
            section.AddParagraph()
            .SetMarginLeft(0)
            .SetMarginTop(15)
            .SetBorderWidth(0)
            .SetFontSize(6)
            .AddTabSymbol()
            .AddTabulationInPercent(100, TabulationType.Right, TabulationLeading.BottomLine);
            section.AddParagraph()
            .SetFontSize(6)
            .AddTextToParagraph("CHILD'S SCHOOL")
            .AddTabSymbol()
            .AddTextToParagraph("CHILD'S ADDRESS")
            .AddTabSymbol()
            .AddTextToParagraph("CITY")
            .AddTabSymbol()
            .AddTextToParagraph("STATE")
            .AddTabSymbol()
            .AddTextToParagraph("ZIP")
            .AddTabulationInPercent(35, TabulationType.Left)
            .AddTabulationInPercent(65, TabulationType.Left)
            .AddTabulationInPercent(77, TabulationType.Left)
            .AddTabulationInPercent(90, TabulationType.Left);
            section.AddParagraph()
            .SetFontSize(6)
            .SetMarginLeft(0)
            .SetMarginTop(15)
            .SetMarginBottom(3)
            .SetBorderWidth(0)
            .AddTabSymbol()
            .AddTabulationInPercent(100, TabulationType.Right, TabulationLeading.BottomLine);

            // STEP 2 AND 3 BLOCKS
            TableBuilder step2And3Table = section.AddTable()
                                          .SetContentRowStyleBorder(borderBuilder => borderBuilder.SetStroke(Stroke.None))
                                          .AddColumnToTable("", XUnit.FromPercent(49))
                                          .AddColumnToTable("", XUnit.FromPercent(2))
                                          .AddColumnToTable("", XUnit.FromPercent(49));

            step2And3Table
            .AddRow()
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Left)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .AddParagraphToCell("STEP #2")
            .SetPadding(2, 0, 0, 0)
            .SetBackColor(Color.FromRgba(0.3f, 0.3f, 0.3f))
            .SetFont(Fonts.Courier(16).SetColor(Color.White).SetBold())
            .ToRow()
            .AddCellToRow()
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Left)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .AddParagraphToCell("STEP #3")
            .SetPadding(2, 0, 0, 0)
            .SetBackColor(Color.FromRgba(0.3f, 0.3f, 0.3f))
            .SetFont(Fonts.Courier(16).SetColor(Color.White).SetBold());
            step2And3Table
            .AddRow()
            .AddCell()
            .SetBorder(Stroke.Solid, Color.Black, StyleSheet.DefaultBorderWidth)
            .SetHorizontalAlignment(HorizontalAlignment.Center)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .AddParagraphToCell("Begin Draft Date:")
            .AddParagraphToCell("_______ / _______ / _______")
            .ToRow()
            .AddCellToRow()
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Center)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .AddTable()
            .SetHeaderRowStyleBackColor(Color.Gray)
            .AddColumnToTable("", XUnit.FromPercent(70))
            .AddColumnToTable("", XUnit.FromPercent(30))
            .AddRow()
            .AddCell("DRAFT DATES")
            .SetBackColor(Color.Gray)
            .SetFontColor(Color.White)
            .ToRow()
            .AddCell("AMOUNT")
            .SetBackColor(Color.Gray)
            .SetFontColor(Color.White)
            .ToTable()
            .AddRow()
            .SetVerticalAlignment(VerticalAlignment.Bottom)
            .AddCell("Monthly on the 1st")
            .SetFontSize(10)
            .ToRow()
            .AddCell("$")
            .SetBold()
            .ToTable()
            .AddRow()
            .SetVerticalAlignment(VerticalAlignment.Bottom)
            .AddCell("Semi-Monthly on the 1st & 15th")
            .SetFontSize(10)
            .ToRow()
            .AddCell("$")
            .SetBold()
            .ToTable()
            .SetMarginBottom(5);

            // STEP 4 BLOCK
            section.AddParagraph("STEP #4")
            .SetBackColor(Color.FromRgba(0.3f, 0.3f, 0.3f))
            .SetFont(Fonts.Courier(16).SetColor(Color.White).SetBold());
            section.AddTable()
            .SetMarginTop(2)
            .SetContentRowStyleBorder(borderBuilder => borderBuilder.SetStroke(Stroke.None))
            .AddColumnToTable("", XUnit.FromPercent(49))
            .AddColumnToTable("", XUnit.FromPercent(2))
            .AddColumnToTable("", XUnit.FromPercent(49))
            .AddRow()
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Left)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .SetPadding(2, 0, 0, 0)
            .AddParagraph("")
            .AddInlineImageToParagraph(checkboxUrl, 11, 11, ScalingMode.UserDefined)
            .AddTextToParagraph(" OPTION 1: CREDIT/DEBIT CARD")
            .ToCell()
            .SetBackColor(Color.Gray)
            .SetFont(Fonts.Courier(14).SetColor(Color.White).SetBold())
            .ToRow()
            .AddCellToRow()
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Left)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .SetPadding(2, 0, 0, 0)
            .AddParagraph("")
            .AddInlineImageToParagraph(checkboxUrl, 11, 11, ScalingMode.UserDefined)
            .AddTextToParagraph(" OPTION 2: BANK DRAFT")
            .ToCell()
            .SetBackColor(Color.Gray)
            .SetFont(Fonts.Courier(14).SetColor(Color.White).SetBold())
            .ToTable()
            .AddRow()
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Center)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .SetFont(Fonts.Courier(6))
            .AddTable()
            .SetContentRowStyleFont(Fonts.Courier(6))
            .SetDefaultAltRowStyle()
            .AddColumnToTable("", XUnit.FromPercent(65))
            .AddColumnToTable("", XUnit.FromPercent(35))
            .AddRow()
            .AddCell()
            .SetColSpan(2)
            .SetFontSize(8)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .AddParagraph("Check one:  ")
            .AddInlineImageToParagraph(checkboxUrl, 8, 8, ScalingMode.UserDefined)
            .AddTextToParagraph(" Visa  ")
            .AddInlineImageToParagraph(checkboxUrl, 8, 8, ScalingMode.UserDefined)
            .AddTextToParagraph(" Mastercard  ")
            .AddInlineImageToParagraph(checkboxUrl, 8, 8, ScalingMode.UserDefined)
            .AddTextToParagraph(" Discover  ")
            .AddInlineImageToParagraph(checkboxUrl, 8, 8, ScalingMode.UserDefined)
            .AddTextToParagraph(" AmEx")
            .ToTable()
            .AddRow()
            .AddCell("CREDIT/DEBIT CARD #")
            .AddParagraph("FILL HERE")
            .SetFontColor(Color.White)
            .SetFontSize(16)
            .ToRow()
            .AddCell("EXP. DATE")
            .AddParagraph("FILL HERE")
            .SetFontColor(Color.White)
            .SetFontSize(16)
            .ToTable()
            .AddRow()
            .AddCell("CARDHOLDER NAME")
            .AddParagraph("FILL HERE")
            .SetFontColor(Color.White)
            .SetFontSize(16)
            .ToRow()
            .AddCell("CVV")
            .AddParagraph("FILL HERE")
            .SetFontColor(Color.White)
            .SetFontSize(16)
            .ToTable()
            .ToCell()
            .ToRow()
            .AddCellToRow()
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Center)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .SetFontSize(6)
            .AddTable()
            .SetContentRowStyleFont(Fonts.Courier(6))
            .SetDefaultAltRowStyle()
            .AddColumnToTable("", XUnit.FromPercent(60))
            .AddColumnToTable("", XUnit.FromPercent(40))
            .AddRow()
            .AddCell("ACCOUNT HOLDER NAME")
            .AddParagraph("FILL HERE")
            .SetFontColor(Color.White)
            .SetFontSize(16)
            .ToRow()
            .AddCell("BANK NAME")
            .AddParagraph("FILL HERE")
            .SetFontColor(Color.White)
            .SetFontSize(16)
            .ToTable()
            .AddRow()
            .AddCell("ROUTING/TRANSIT #")
            .AddParagraph("FILL HERE")
            .SetFontColor(Color.White)
            .SetFontSize(16)
            .ToRow()
            .AddCell("BANK ACCOUNT #")
            .AddParagraph("FILL HERE")
            .SetFontColor(Color.White)
            .SetFontSize(16)
            .ToTable();

            // INFORMATION BLOCK
            section.AddParagraph("AUTOMATED CLEARINGHOUSE(ACH) DRAFTS ARE REQUIRED TO HAVE A VOIDED CHECK. DEBIT CARDS ARE NOT ACCEPTED. MUST BE ACH OR CREDIT CARDS ONLY.")
            .SetMarginTop(10)
            .SetBold()
            .SetFontSize(8);
            section.AddParagraph("Only 1 Form of Draft Payment can be entered per person.")
            .SetListBulleted()
            .SetFontSize(8);
            section.AddParagraph("Children enrolled in Summer Camp may have a larger draft amount on May 15 & Aug 1.")
            .SetListBulleted()
            .SetFontSize(8);
            section.AddParagraphToSection()
            .AddParagraph("I understand that this transfer will occur monthly on the 1st. First draft begins Aug. 1.")
            .SetListNumbered(NumerationStyle.Arabic, 0, 0)
            .SetFontSize(8);
            section.AddParagraph("I understand that should I choose to change a Bank Account I must provide a school with at least a 2 week notice.")
            .SetListNumbered(NumerationStyle.Arabic, 0, 0)
            .SetFontSize(8);
            section.AddParagraph("I understand that the information above will be used to transfer payment from my account.")
            .SetListNumbered(NumerationStyle.Arabic, 0, 0)
            .SetFontSize(8);
            section.AddParagraph("I understand that if my payment is returned for non-sufficient funds I will be charged a $30 fee.")
            .SetListNumbered(NumerationStyle.Arabic, 0, 0)
            .SetFontSize(8);
            section.AddParagraph("BEST SCHOOL only accepts Visa, MasterCard, Discover, and American Express.")
            .SetListNumbered(NumerationStyle.Arabic, 0, 0)
            .SetFontSize(8);
            section.AddParagraph("I understand that after three returned items, I will be ineligible to use the automatic payment option.")
            .SetListNumbered(NumerationStyle.Arabic, 0, 0)
            .SetFontSize(8);
            section.AddParagraph("ACCOUNT HOLDER ACKNOWLEDGMENT")
            .SetMarginTop(5)
            .SetBold();
            section.AddParagraph()
            .SetMarginTop(8)
            .SetMarginLeft(0)
            .SetBorderWidth(0)
            .AddTabSymbol().AddTabulationInPercent(50, TabulationType.Right, TabulationLeading.BottomLine)
            .AddTabSymbol().AddTabSymbol()
            .AddTabulationInPercent(70, TabulationType.Left)
            .AddTabulationInPercent(100, TabulationType.Right, TabulationLeading.BottomLine);
            section.AddParagraph()
            .SetMarginTop(0)
            .SetFontSize(10)
            .AddTabSymbol().AddTextToParagraph("Account Holder Signature")
            .AddTabulationInPercent(25, TabulationType.Center)
            .AddTabSymbol()
            .AddTextToParagraph("Date")
            .AddTabulationInPercent(85, TabulationType.Center);

            // STAPLE BLOCK
            TableBuilder pleaseStapleHereTable = section.AddTable()
                                                 .SetAlignment(HorizontalAlignment.Center)
                                                 .SetWidth(XUnit.FromPercent(80))
                                                 .SetMarginTop(5)
                                                 .SetBorderStroke(Stroke.Dotted)
                                                 .AddColumnToTable("", XUnit.FromPercent(10))
                                                 .AddColumnToTable("", XUnit.FromPercent(80))
                                                 .AddColumnToTable("", XUnit.FromPercent(10));

            pleaseStapleHereTable.AddRow()
            .SetHorizontalAlignment(HorizontalAlignment.Center)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .AddCell()
            .SetBorderStroke(Stroke.Dotted, Stroke.Dotted, Stroke.None, Stroke.Dotted)
            .SetFontSize(6)
            .AddParagraphToCell("Please").AddParagraphToCell("Staple").AddParagraphToCell("Here")
            .ToRow()
            .AddCell()
            .SetBorderStroke(Stroke.None, Stroke.Dotted, Stroke.None, Stroke.Dotted)
            .SetPadding(0, 68, 0, 64)
            .SetVerticalAlignment(VerticalAlignment.Center)
            .AddParagraph("STAPLE VOIDED CHECK HERE").SetBold().SetFontSize(24)
            .ToRow()
            .AddCell()
            .SetBorderStroke(Stroke.None, Stroke.Dotted, Stroke.Dotted, Stroke.Dotted)
            .SetFontSize(6).AddParagraphToCell("Please").AddParagraphToCell("Staple").AddParagraphToCell("Here")
            .ToSection()
            .SetMargins(20, 20, 20, 0);
            return(builder);
        }
        internal static SectionBuilder AddMainDocumentFlow(this SectionBuilder s)
        {
            s.AddLine()
            .SetWidth(2f);
            s.AddImage(BillGatesPath, ScalingMode.OriginalSize)
            .SetMarginLeft(1.5f)
            .SetMarginTop(7f);
            s.AddParagraph("Bill Gates").SetMarginTop(6.5f).SetFontSize(28f);
            s.AddParagraph("Co-chair, Bill & Melinda Gates Foundation").SetFontSize(14f).SetMarginTop(5f);
            s.AddParagraph("Seattle").SetFontSize(14f).SetFontColor(Color.Gray);

            s.AddParagraph("Summary").SetFontSize(18f).SetMarginTop(20f);
            s.AddParagraph(
                "Co-chair of the Bill & Melinda Gates Foundation. Microsoft Co-founder. Voracious reader. Avid traveler. Active blogger.")
            .SetFontSize(14f)
            .SetMarginTop(10f);

            s.AddLine(40f).SetColor(Color.Gray).SetMarginTop(20f);

            s.AddParagraph("Experience").SetFontSize(18f).SetMarginTop(10f);
            s.AddParagraph("Bill & Melinda Gates Foundation").SetFontSize(14f).SetMarginTop(15f);
            s.AddParagraph("Co-chair").SetFontSize(12f);
            s.AddParagraph("2000 - Present (20 years)").SetFontSize(12f);
            s.AddParagraph("Microsoft").SetFontSize(14f).SetMarginTop(20f);
            s.AddParagraph("Co-founder").SetFontSize(12f);
            s.AddParagraph("1975 - Present (45 years)").SetFontSize(12f);

            s.AddLine(40f).SetColor(Color.Gray).SetMarginTop(20f);

            s.AddParagraph("Education").SetFontSize(18f).SetMarginTop(10f);
            s.AddParagraph("Harvard University").SetFontSize(14f).SetMarginTop(15f);
            s.AddParagraph(" · (1973 - 1975)").SetFontSize(12f);
            s.AddParagraph("Lakeside School, Seattle").SetFontSize(14f).SetMarginTop(20f);

            return(s);
        }
        internal void Build(SectionBuilder sectionBuilder, TestDetailsData testData)
        {
            var resultColor = Color.FromHtml("#417505");

            if (testData.ClinicalInfo == "INDETERMINATE" || testData.ClinicalInfo == "INSUFFICIENT")
            {
                resultColor = Color.FromHtml("#F5A623");
            }
            else if (testData.ClinicalInfo == "DETECTED" || testData.ClinicalInfo == "HIGH")
            {
                resultColor = Color.Red;
            }

            sectionBuilder
            .AddParagraph("General Comments & Additional Information")
            .SetMarginTop(14)
            .SetFont(FNT9B)
            .SetFontColor(blueGreen)
            .AddTabSymbol()
            .AddTabulationInPercent(51)
            .AddText("Ordered Items")
            .ToSection()
            .AddParagraph("Clinical Info:")
            .SetFont(FNT9B)
            .AddTabSymbol()
            .AddTabulationInPercent(10)
            .AddText(testData.ClinicalInfo)
            .SetFontColor(resultColor)
            .ToParagraph()
            .AddTabSymbol()
            .AddTabulationInPercent(51)
            .AddText(testData.OrderedItems)
            .SetFont(FNT9)
            .ToSection()
            .AddTable()
            .SetMarginTop(11)
            .SetBorderWidth(0, 0, 0, 1)
            .SetBorderColor(blueGreen)
            .SetWidth(XUnit.FromPercent(100))
            .AddColumnPercentToTable("TESTS", 22)
            .AddColumnPercentToTable("RESULT", 22)
            .AddColumnPercentToTable("FLAG", 12)
            .AddColumnPercentToTable("UNITS", 9)
            .AddColumnPercentToTable("REFERENCE INTERVAL", 29)
            .AddColumnPercentToTable("LAB", 6)
            .SetHeaderRowStyleBackColor(blueGreen)
            .SetHeaderRowStyleHorizontalAlignment(HorizontalAlignment.Center)
            .SetHeaderRowStyleFont(FNT10.SetColor(Color.White))
            .AddRow()
            .SetFont(FNT11)
            .SetHorizontalAlignment(HorizontalAlignment.Center)
            .AddCellToRow(testData.Tests)
            .AddCellToRow(testData.Result)
            .AddCellToRow(testData.Flag)
            .AddCellToRow(testData.Units)
            .AddCellToRow(testData.ReferenceInterval)
            .AddCellToRow(testData.Lab)
            .ToSection()
            .AddParagraph()
            .SetMarginTop(12)
            .SetFont(FNT11)
            .SetLineSpacing(1)
            .AddTextToParagraph(testData.Description)
            .ToSection()
            .AddLine(PageWidth, 1)
            .SetMarginTop(17)
            .ToSection()
            .AddParagraph(labInfoData.Index)
            .SetFont(FNT9)
            .SetMarginLeft(30)
            .SetLineSpacing(0.8f)
            .AddTabSymbol()
            .AddTabulationInPercent(5)
            .AddText(labInfoData.Code)
            .ToParagraph()
            .AddTabSymbol()
            .AddTabulationInPercent(12)
            .AddText(labInfoData.Name)
            .ToParagraph()
            .AddTabSymbol()
            .AddTabulationInPercent(61)
            .AddText(labInfoData.Director)
            .ToSection()
            .AddParagraph(labInfoData.Address)
            .SetFont(FNT9)
            .SetMarginLeft(91.5f)
            .ToSection()
            .AddLine(PageWidth, 1)
            .ToSection()
            .AddParagraph("For inquiries, the physician may contact branch: " +
                          labInfoData.BranchPhone + " Lab: " + labInfoData.LabPhone)
            .SetFont(FNT7)
            .SetMarginTop(3)
            .SetAlignment(HorizontalAlignment.Right);
        }