コード例 #1
0
        private void DrawReportFooter(PagingSetup pagingSetup, PdfDocument document,
                                      string userExportName, string userExportTo)
        {
            double signatureHeaderHeight    = pagingSetup.RegularLineHeight;
            double signatureContainerHeight = 100;
            double signatureContentName     = pagingSetup.RegularLineHeight;
            double footerGridHeight         = signatureHeaderHeight + signatureContainerHeight + signatureContentName;

            if (!ReportUtils.IsHeightInPage(pagingSetup, document, footerGridHeight))
            {
                ReportUtils.BreakPage(pagingSetup, document);
            }

            ReportUtils.DrawGridLine(new List <CellDisplay>()
            {
                new CellDisplay()
                {
                    Ratio = 50, DisplayText = "Người xuất mẫu", CellAlign = XStringFormats.Center, PaddingLeft = 10
                },
                new CellDisplay()
                {
                    Ratio = 50, DisplayText = "Người nhận mẫu", CellAlign = XStringFormats.Center, PaddingLeft = 10
                },
            }, pagingSetup, document, pagingSetup.GridHeaderFont, signatureHeaderHeight);

            ReportUtils.DrawGridLine(new List <CellDisplay>()
            {
                new CellDisplay()
                {
                    Ratio = 50, DisplayText = "", CellAlign = XStringFormats.Center, PaddingLeft = 10
                },
                new CellDisplay()
                {
                    Ratio = 50, DisplayText = "", CellAlign = XStringFormats.Center, PaddingLeft = 10
                },
            }, pagingSetup, document, pagingSetup.RegularFont, signatureContainerHeight);

            ReportUtils.DrawGridLine(new List <CellDisplay>()
            {
                new CellDisplay()
                {
                    Ratio = 50, DisplayText = userExportName, CellAlign = XStringFormats.Center, PaddingLeft = 10
                },
                new CellDisplay()
                {
                    Ratio = 50, DisplayText = userExportTo, CellAlign = XStringFormats.Center, PaddingLeft = 10
                },
            }, pagingSetup, document, pagingSetup.RegularFont, signatureContentName);
        }