/** * Sets the <CODE>Phrase</CODE> for this cell. * * @param phrase the <CODE>Phrase</CODE> */ public void setPhrase(Phrase phrase) { table = null; image = null; column.setText(this.phrase = phrase); }
/** * Setter for property image. * * @param image New value of property image. */ public void setImage(Image image) { column.setText(null); table = null; this.image = image; }
/** * Setter for property image. * * @param image New value of property image. */ public void setImage(Image image) { column.setText(null); table = null; this.image = image; }
/** * Sets the <CODE>Phrase</CODE> for this cell. * * @param phrase the <CODE>Phrase</CODE> */ public void setPhrase(Phrase phrase) { table = null; image = null; column.setText(this.phrase = phrase); }
// read the file PdfReader fondo = new PdfReader("listaPrecios.pdf"); PdfStamper stamper = new PdfStamper( fondo, response.getOutputStream()); PdfContentByte content = stamper.getOverContent(1); // add text ColumnText ct = new ColumnText( content ); // this are the coordinates where you want to add text // if the text does not fit inside it will be cropped ct.setSimpleColumn(50,500,500,50); ct.setText(new Phrase(str, titulo1)); ct.go();
ColumnText ct = new ColumnText(writer.getDirectContent()); ct.setSimpleColumn(left,bottom,right,top); ct.setText(new Phrase("String")); ct.go();
void setTable(PdfPTable table) { this.table = table; column.setText(null); image = null; if (table != null) { table.setExtendLastRow(verticalAlignment == Element.ALIGN_TOP); column.addElement(table); table.setWidthPercentage(100); } }
void setTable(PdfPTable table) { this.table = table; column.setText(null); image = null; if (table != null) { table.setExtendLastRow(verticalAlignment == Element.ALIGN_TOP); column.addElement(table); table.setWidthPercentage(100); } }
/** * Adds an iText element to the cell. * * @param element */ public void addElement(Element element) { if (table != null) { table = null; column.setText(null); } if (element instanceof PdfPTable) { ((PdfPTable) element).setSplitLate(false); } else if (element instanceof PdfDiv) { for (Element divChildElement : ((PdfDiv) element).getContent()) { if (divChildElement instanceof PdfPTable) { ((PdfPTable) divChildElement).setSplitLate(false); } } } column.addElement(element); }
/** * Adds an iText element to the cell. * * @param element */ public void addElement(Element element) { if (table != null) { table = null; column.setText(null); } if (element instanceof PdfPTable) { ((PdfPTable) element).setSplitLate(false); } else if (element instanceof PdfDiv) { for (Element divChildElement : ((PdfDiv) element).getContent()) { if (divChildElement instanceof PdfPTable) { ((PdfPTable) divChildElement).setSplitLate(false); } } } column.addElement(element); }