如何在itextpdf中动态生成多个表作为Json Data需求

时间:2019-05-21 11:04:15

标签: kotlin itext pdfptable

在itextpdf中生成了多个表。下面给出了Json格式:

{
    "status": 1,
    "challan": [
        {
            "Cmp_Name": "ABC",
            "Partyid": "18",
            "ChallanNo": "-",
            "PartyName": "PURCHASE MH",
            "FirmName": "PURCHASE MH",
            "ChallanDate": "-",
            "ChallanAmount": "0.0",
            "RecieveDate": "2019-03-15 00:00:00",
            "RecieveAmount": "4000.0",
            "DiscountAmount": "0.0",
            "TDSAmount": "0.0",
            "Bank": "AXIS BANK",
            "ChequeNo": null,
            "ChequeDate": null
        },
        {
            "Cmp_Name": "ABC",
            "Partyid": "17",
            "ChallanNo": "20",
            "PartyName": "PURCHASE GJ",
            "FirmName": "PURCHASE GJ",
            "ChallanDate": "3/11/2019",
            "ChallanAmount": "1391.0",
            "RecieveDate": "2019-03-15 00:00:00",
            "RecieveAmount": "1391.0",
            "DiscountAmount": "0.0",
            "TDSAmount": "0.0",
            "Bank": "AXIS BANK",
            "ChequeNo": "321456",
            "ChequeDate": "2019-03-15 00:00:00"
        },
        {
            "Cmp_Name": "ABC",
            "Partyid": "17",
            "ChallanNo": "20",
            "PartyName": "Dharama",
            "FirmName": "Dharama",
            "ChallanDate": "3/11/2019",
            "ChallanAmount": "1391.0",
            "RecieveDate": "2019-03-15 00:00:00",
            "RecieveAmount": "1391.0",
            "DiscountAmount": "0.0",
            "TDSAmount": "0.0",
            "Bank": "AXIS BANK",
            "ChequeNo": "321456",
            "ChequeDate": "2019-03-15 00:00:00"
        },
        {
            "Cmp_Name": "ABC",
            "Partyid": "17",
            "ChallanNo": "20",
            "PartyName": "Dharama",
            "FirmName": "Dharama",
            "ChallanDate": "3/11/2019",
            "ChallanAmount": "1391.0",
            "RecieveDate": "2019-03-15 00:00:00",
            "RecieveAmount": "1391.0",
            "DiscountAmount": "0.0",
            "TDSAmount": "0.0",
            "Bank": "AXIS BANK",
            "ChequeNo": "321456",
            "ChequeDate": "2019-03-15 00:00:00"
        }
    ]
}

Json格式PartyName上方,当Partyname值更改所有JsonObject数据后,PartyName相同值JSONObject数据显示在一个表中时显示在另一个表格中。

PartyName的值与所有JsonObject数据相同,并在一个表中显示,并且根据PartyName值动态生成值更改。

JSON上方的两个PartyName格式不同,因此,两个表在itextPdf中创建。如何创建?

如何生成多个表itextpdf

0 个答案:

没有答案