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);
        }
        private void AddBalanceCalc(RepeatingAreaBuilder builder)
        {
            var tableBuilder = builder.AddTable();

            tableBuilder
            .SetWidth(XUnit.FromPercent(90))
            .SetBorder(Stroke.Solid, Color.Black, 0.5f)
            .SetAltRowStyleBackColor(Color.White)
            .AddColumnPercentToTable("", 20)
            .AddColumnPercentToTable("", 60)
            .AddColumnPercentToTable("", 20)
            .SetAlignment(HorizontalAlignment.Right);
            var rowBuilder = tableBuilder.AddRow();

            foreach (string head in new string[] {
                "Number",
                "Items Outstanding",
                "Amount"
            })
            {
                rowBuilder
                .AddCell(head).ApplyStyle(
                    StyleBuilder.New()
                    .SetBorderStroke(Stroke.None)
                    .SetFont(FNT7B)
                    .SetHorizontalAlignment(
                        HorizontalAlignment.Center)
                    );
            }
            for (int i = 0; i < 26; i++)
            {
                rowBuilder = tableBuilder.AddRow();
                rowBuilder.AddCellToRow(" ").AddCellToRow(" ").AddCellToRow(" ");
            }
            rowBuilder = tableBuilder.AddRow();
            var cellBuilder = rowBuilder
                              .AddCell("Total amount  $");

            cellBuilder
            .ApplyStyle(
                StyleBuilder.New()
                .SetBorderStroke(Stroke.None)
                .SetFont(FNT7B)
                .SetHorizontalAlignment(
                    HorizontalAlignment.Right)
                .SetVerticalAlignment(
                    VerticalAlignment.Bottom)
                )
            .SetColSpan(2)
            .SetPadding(0, 0, 4, 0);
            rowBuilder
            .AddCellToRow(" ");
        }
        private void AddInstuctionAboutSUBTRACT(RepeatingAreaBuilder builder)
        {
            AddInstructionTitle(builder, 6, "SUBTRACT");
            var tableBuilder = builder.AddTable();

            ConfigureDescriptionFormTable(tableBuilder);
            var rowBuilder = tableBuilder.AddRow();

            rowBuilder
            .AddCellToRow(FillInstructionAnyWithdrawals)
            .AddCellToRow(AddAnyWithdrawalsForm);
        }
        private void AddInstuctionAboutADD(RepeatingAreaBuilder builder)
        {
            AddInstructionTitle(builder, 6, "ADD");
            var tableBuilder = builder.AddTable();

            ConfigureDescriptionFormTable(tableBuilder);
            var rowBuilder = tableBuilder.AddRow();

            rowBuilder
            .AddCellToRow(FillInstructionAnyDeposits)
            .AddCellToRow(AddAnyDepositsForm);
        }
        private void AddInstuctionAboutENTER(RepeatingAreaBuilder builder)
        {
            AddInstructionTitle(builder, 19.2f, "ENTER");
            var tableBuilder = builder.AddTable();

            ConfigureDescriptionFormTable(tableBuilder);
            var rowBuilder = tableBuilder.AddRow();

            rowBuilder
            .AddCellToRow(FillEndingBalanceENTER)
            .AddCellToRow(AddEndingBalanceForm);
        }
        internal static void BuildFooterBar(RepeatingAreaBuilder builder, float barImageHeight)
        {
            var tableBuilder = builder.AddTable();

            tableBuilder
            .SetBorder(Stroke.None)
            .SetWidth(XUnit.FromPercent(100))
            .AddColumnPercentToTable("", 40)
            .AddColumnPercentToTable("", 42)
            .AddColumnPercentToTable("", 10)
            .AddColumnPercentToTable("", 8);
            var rowBuilder = tableBuilder.AddRow();

            rowBuilder.SetVerticalAlignment(VerticalAlignment.Bottom);
            rowBuilder.AddCell()
            .SetPadding(40, 0, 0, 0)
            .SetFont(FNT11)
            .SetHorizontalAlignment(HorizontalAlignment.Right)
            .AddParagraph()
            .SetAlignment(HorizontalAlignment.Left)
            .AddTextToParagraph("Initials ", INITALS_FONT,
                                true)
            .AddTabulation(140, TabulationType.Left,
                           TabulationLeading.BottomLine);
            rowBuilder
            .AddCell()
            .SetHorizontalAlignment(HorizontalAlignment.Right)
            .SetPadding(0, 0, 5, 0)
            .AddParagraph()
            .SetUrlStyle(
                StyleBuilder.New()
                .SetFontColor(Color.Red)
                .SetFont(URL_FONT))
            .AddUrlToParagraph("http://www.bestlandlords.com/billing");
            rowBuilder
            .AddCell()
            .AddImage(Path.Combine("images", "ra-barcode.png"),
                      XSize.FromHeight(barImageHeight));
            rowBuilder.AddCell().AddParagraph()
            .SetAlignment(HorizontalAlignment.Right)
            .AddTextToParagraph(" ", PAGE_NUMBER_FONT, true)
            .AddTextToParagraph("Page ", PAGE_NUMBER_FONT)
            .AddPageNumber().SetFont(PAGE_NUMBER_FONT);
        }
        private void BuildHeader(RepeatingAreaBuilder builder)
        {
            var tableBuilder = builder.AddTable();

            tableBuilder
            .SetWidth(XUnit.FromPercent(50))
            .SetBorder(Stroke.None)
            .AddColumnPercentToTable("", 25).AddColumnPercent("", 75);
            var rowBuilder  = tableBuilder.AddRow();
            var cellBuilder = rowBuilder.AddCell();

            cellBuilder.AddImage(Path.Combine("images", "AT_Logo_2x.png"),
                                 XSize.FromHeight(80));
            cellBuilder = rowBuilder.AddCell()
                          .SetVerticalAlignment(VerticalAlignment.Center)
                          .SetPadding(17, 0, 0, 0);
            cellBuilder
            .AddParagraph(TicketData.Company + " company").SetFont(FNT20B);
            cellBuilder
            .AddParagraph("E-ticket").SetFont(FNT20);
        }