无法在页脚itextsharp中显示完整的平板电脑

时间:2018-07-09 17:13:16

标签: c# .net pdf itext

我写了下面的代码在页尾打印页脚,但是问题是,当它被打印时,仅打印表格的前两个行。不知道是什么问题。

Snap of rows which are only printed.

public override void OnEndPage(PdfWriter writer, Document document)
    {


        base.OnEndPage(writer, document);
        PdfPTable table = new PdfPTable(4);
        table.TotalWidth = 550f;
        table.LockedWidth = false;
        PdfPCell header = new PdfPCell(new Phrase("                                                        Warranty                             "));
        header.Colspan = 4;
        table.AddCell(header);
        PdfPCell bottom = new PdfPCell(new Phrase("I, Mr. UMER FAROOQ, Being a person resident in Pakistan and Carrying on Bussiness under name of Yaseen Enterprises, Mohallah Ikhlas Khail, Bhakkar being a Wholeseller and Distributer of Drugs and Reliying upon warranty of Manufacturer/his Authorized agent do hereby give this warranty that drugs described in this invoice do not contravene in any way the provision of section 23 of Drugs Act 1976. \n\nNote: FOR DATED ITEM WE MUST BE INFORMED 120 DAYS PRIOR TO EXPIRY "));
        bottom.Colspan = 3;
        table.AddCell(bottom);
        PdfPTable nested1 = new PdfPTable(1);
        nested1.AddCell(new Phrase("Net Payable: " + 1000 + " RS"));
        nested1.AddCell("  Signature  ");
        nested1.AddCell("           ");
        PdfPCell nesthousing1 = new PdfPCell(nested1);
        nesthousing1.Padding = 0f;
        table.AddCell(nesthousing1);
        PdfPCell footer = new PdfPCell(new Phrase("Software Developed By Jahanzaib"));
        footer.Colspan = 4;
        table.AddCell(footer);
        table.WriteSelectedRows(0, -1, 150, document.Bottom, writer.DirectContent);


    }

0 个答案:

没有答案