I am using iText 2.1.7 version. I am trying to set the rowspan for on of the PdfCell.
Below is the code:
PdfCell cell = new PdfPCell(new Phrase("ABC",fontMethod));
cell.setRowspan(2);
But it says cannot find symbol cell.setRowspan(2);
You assign a PdfPCell
instance to a PdfCell
variable. Those types are completely different (look for the center P
). This cannot work.
If you assigned the PdfPCell
instance to a PdfPCell
variable, setRowspan
should work as it has been introduced in iText 2.1.6, ie before your 2.1.7:
PdfPCell cell = new PdfPCell(new Phrase("ABC",fontMethod));
cell.setRowspan(2);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.