OpenPDF icon indicating copy to clipboard operation
OpenPDF copied to clipboard

The content of the innermost element of multiple nested elements is missing

Open CSi-CJ opened this issue 3 years ago • 0 comments

Describe the issue:

I wrapped a Paragraph outside the PdfPTable(innerTable), and then put the Paragraph into another PdfPTable cell, the content of the innerTable is missing

To Reproduce:

PdfPTable table = new PdfPTable(2); PdfPTable innerTable = new PdfPTable(1); innerTable.addCell(new Paragraph("1111111111111111111111")); Paragraph pra = new Paragraph(); pra.add(innerTable); table.addCell(new PdfPCell(new Paragraph("222222222222"))); table.addCell(pra); document.add(table);

Expected Behavior:

The innerTable content will be displayed in the first row and second column of the outer table image

Actual Behavior:

The innerTable content is missing image

How should I change my code to get the expected result?

CSi-CJ avatar Dec 12 '22 02:12 CSi-CJ