/** * Construct a MultiColumnText container of the specified height. * If height is <CODE>AUTOMATIC</CODE>, fill complete pages until done. * If a specific height is used, it may span one or more pages. * * @param height */ public MultiColumnText(float height) { columnDefs = new ArrayList(); desiredHeight = height; top = AUTOMATIC; // canvas will be set later columnText = new ColumnText(null); totalHeight = 0f; }
/** * Construct a MultiColumnText container of the specified height * starting at the specified Y position. * * @param height * @param top */ public MultiColumnText(float top, float height) { columnDefs = new ArrayList(); desiredHeight = height; this.top = top; nextY = top; // canvas will be set later columnText = new ColumnText(null); totalHeight = 0f; }
/** * Construct a MultiColumnText container of the specified height. * If height is <CODE>AUTOMATIC</CODE>, fill complete pages until done. * If a specific height is used, it may span one or more pages. * * @param height */ public MultiColumnText(float height) { columnDefs = new ArrayList(); desiredHeight = height; top = AUTOMATIC; // canvas will be set later columnText = new ColumnText(null); totalHeight = 0f; }
/** * Construct a MultiColumnText container of the specified height. * If height is <CODE>AUTOMATIC</CODE>, fill complete pages until done. * If a specific height is used, it may span one or more pages. * * @param height */ public MultiColumnText(float height) { columnDefs = new ArrayList(); desiredHeight = height; top = AUTOMATIC; // canvas will be set later columnText = new ColumnText(null); totalHeight = 0f; }
/** * Construct a MultiColumnText container of the specified height * starting at the specified Y position. * * @param height * @param top */ public MultiColumnText(float top, float height) { columnDefs = new ArrayList(); desiredHeight = height; this.top = top; nextY = top; // canvas will be set later columnText = new ColumnText(null); totalHeight = 0f; }
/** * Construct a MultiColumnText container of the specified height * starting at the specified Y position. * * @param height * @param top */ public MultiColumnText(float top, float height) { columnDefs = new ArrayList(); desiredHeight = height; this.top = top; nextY = top; // canvas will be set later columnText = new ColumnText(null); totalHeight = 0f; }
public static ColumnText createColumnText() { ColumnText text = new ColumnText( null ); // make iText first line alignment compatible with open office text.setAdjustFirstLine( false ); return text; }
public static ColumnText createColumnText() { ColumnText text = new ColumnText( null ); // make iText first line alignment compatible with open office text.setAdjustFirstLine( false ); return text; }
public static ColumnText createColumnText() { ColumnText text = new ColumnText( null ); // make iText first line alignment compatible with open office text.setAdjustFirstLine( false ); return text; }
/** * Creates an independent duplicated of the instance <CODE>org</CODE>. * * @param org the original <CODE>ColumnText</CODE> * @return the duplicated */ public static ColumnText duplicate(ColumnText org) { ColumnText ct = new ColumnText(null); ct.setACopy(org); return ct; }
/** * Creates an independent duplicated of the instance <CODE>org</CODE>. * * @param org the original <CODE>ColumnText</CODE> * @return the duplicated */ public static ColumnText duplicate(ColumnText org) { ColumnText ct = new ColumnText(null); ct.setACopy(org); return ct; }
/** * Creates an independent duplicated of the instance <CODE>org</CODE>. * * @param org the original <CODE>ColumnText</CODE> * @return the duplicated */ public static ColumnText duplicate(ColumnText org) { ColumnText ct = new ColumnText(null); ct.setACopy(org); return ct; }
public static ColumnText createColumnText() { ColumnText text = new ColumnText( null ); // make iText first line alignment compatible with open office text.setAdjustFirstLine( false ); return text; }
/** * Gets the width that the line will occupy after writing. * Only the width of the first line is returned. * * @param phrase the <CODE>Phrase</CODE> containing the line * @param runDirection the run direction * @param arabicOptions the options for the arabic shaping * @return the width of the line */ public static float getWidth(Phrase phrase, int runDirection, int arabicOptions) { ColumnText ct = new ColumnText(null); ct.addText(phrase); ct.addWaitingPhrase(); PdfLine line = ct.bidiLine.processLine(0, 20000, Element.ALIGN_LEFT, runDirection, arabicOptions); if (line == null) return 0; else return 20000 - line.widthLeft(); }
/** * Gets the width that the line will occupy after writing. * Only the width of the first line is returned. * * @param phrase the <CODE>Phrase</CODE> containing the line * @param runDirection the run direction * @param arabicOptions the options for the arabic shaping * @return the width of the line */ public static float getWidth(Phrase phrase, int runDirection, int arabicOptions) { ColumnText ct = new ColumnText(null); ct.addText(phrase); ct.addWaitingPhrase(); PdfLine line = ct.bidiLine.processLine(0, 20000, Element.ALIGN_LEFT, runDirection, arabicOptions); if (line == null) return 0; else return 20000 - line.widthLeft(); }
/** * Gets the width that the line will occupy after writing. * Only the width of the first line is returned. * * @param phrase the <CODE>Phrase</CODE> containing the line * @param runDirection the run direction * @param arabicOptions the options for the arabic shaping * @return the width of the line */ public static float getWidth(Phrase phrase, int runDirection, int arabicOptions) { ColumnText ct = new ColumnText(null); ct.addText(phrase); ct.addWaitingPhrase(); PdfLine line = ct.bidiLine.processLine(0, 20000, Element.ALIGN_LEFT, runDirection, arabicOptions); if (line == null) return 0; else return 20000 - line.widthLeft(); }
public ColumnText reconfigure( PdfContentByte cb, Phrase p ) { float filledWidth = ColumnText.getWidth( p, runDirection, 0 ) + 0.5f; ColumnText ct = new ColumnText( cb ); ct.setRunDirection( runDirection ); if ( alignment == Element.ALIGN_LEFT ) { ct.setSimpleColumn( llx, lly, llx + filledWidth, ury, leading, alignment ); } else if ( alignment == Element.ALIGN_RIGHT ) { ct.setSimpleColumn( urx - filledWidth, lly, urx, ury, leading, alignment ); } else if ( alignment == Element.ALIGN_CENTER ) { float delta = ( ( urx - llx ) - filledWidth ) / 2; ct.setSimpleColumn( urx + delta, lly, urx - delta, ury, leading, alignment ); } else { ct.setSimpleColumn( llx, lly, urx, ury, leading, alignment ); } return ct; } }
protected void writePageAnchor(int pageIndex) throws DocumentException { Map pdfFontAttrs = getDefaultPdfFontAttributes(); Chunk chunk; if (pdfFontAttrs == null) { chunk = new Chunk(" "); } else { Font pdfFont = getFont(pdfFontAttrs, getLocale()); chunk = new Chunk(" ", pdfFont); } chunk.setLocalDestination(JR_PAGE_ANCHOR_PREFIX + reportIndex + "_" + (pageIndex + 1)); tagHelper.startPageAnchor(); ColumnText colText = new ColumnText(pdfContentByte); colText.setSimpleColumn( new Phrase(chunk), 0, jasperPrint.getPageHeight(), 1, 1, 0, Element.ALIGN_LEFT ); colText.go(); tagHelper.endPageAnchor(); }
ColumnText ct = new ColumnText(writer.getDirectContent());
ColumnText ct = new ColumnText(writer.getDirectContent());