I want to write this.
Last night i dreamt of San Pedro.
How can I write this with 1 PdfPCell
Thank you. That helped me a lot. Can't we do this by creating an array of Parapraph objects?
Paragraph myParagraph = new Paragraph(3)
myParagraph.add(new Paragraph(......));
myParagraph.add(new Paragraph(......));
myParagraph.add(new Paragraph(......));
Now will there be new lines if i print out myParagraph???
Or can I also use Paragraph to print out
Last night I dreamt of San Pedro
com.lowagie.text.pdf.PdfPTable table = new PdfPTable(columns);
PdfPTable local = new PdfPTable(1);
PdfPCell ind = new PdfPCell(new Phrase("" + index + "."));
ind.setBorderColor(frameColor);
ind.setHorizontalAlignment(indexAlign);
PdfPCell img = new PdfPCell();
img.addElement(image);
img.setHorizontalAlignment(Element.ALIGN_CENTER);
img.setBorderColor(frameColor);
PdfPCell txt = new PdfPCell(new Paragraph(text, font));
PdfPCell txt1 = new PdfPCell(new Paragraph(...));
PdfPCell txt2 = new PdfPCell(new Paragraph(...));
PdfPCell txt3 = new PdfPCell(new Paragraph(...));
txt.setBorderColor(frameColor);
local.addCell(ind);
local.addCell(img);
local.addCell(txt);
local.addCell(txt1);
local.addCell(txt2);
local.addCell(txt3);
table.addCell(local);
//
Paragraph myParagraph = new Paragraph(3);
myParagraph.add(new Paragraph("aaaaaaaaa", font));
myParagraph.add(new Paragraph("bbbbbbbbb", font));
myParagraph.add(new Paragraph("cccccccccccc", font));
PdfPCell myCell = new PdfPCell(myParagraph);
myCell.setBorderColor(frameColor);
local.addCell(myCell);
//
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.