/** * Outputs the lines to the document. It is equivalent to <CODE>go(false)</CODE>. * * @return returns the result of the operation. It can be <CODE>NO_MORE_TEXT</CODE> * and/or <CODE>NO_MORE_COLUMN</CODE> * @throws DocumentException on error */ public int go() throws DocumentException { return go(false); }
/** * Outputs the lines to the document. It is equivalent to <CODE>go(false)</CODE>. * * @return returns the result of the operation. It can be <CODE>NO_MORE_TEXT</CODE> * and/or <CODE>NO_MORE_COLUMN</CODE> * @throws DocumentException on error */ public int go() throws DocumentException { return go(false); }
/** * Outputs the lines to the document. It is equivalent to <CODE>go(false)</CODE>. * * @return returns the result of the operation. It can be <CODE>NO_MORE_TEXT</CODE> * and/or <CODE>NO_MORE_COLUMN</CODE> * @throws DocumentException on error */ public int go() throws DocumentException { return go(false); }
private void simulateText() { int res = 0; try { res = text.go( true ); } catch ( DocumentException e ) { throw new ODFConverterException( e ); } if ( ColumnText.hasMoreText( res ) ) { // text does not fit into current column // split it to a new column columnBreak(); } }
private void simulateText() { int res = 0; try { res = text.go( true ); } catch ( DocumentException e ) { throw new XWPFConverterException( e ); } if ( ColumnText.hasMoreText( res ) ) { // text does not fit into current column // split it to a new column columnBreak(); } }
private void simulateText() { int res = 0; try { res = text.go( true ); } catch ( DocumentException e ) { throw new XWPFConverterException( e ); } if ( ColumnText.hasMoreText( res ) ) { // text does not fit into current column // split it to a new column columnBreak(); } }
private void simulateText() { int res = 0; try { res = text.go( true ); } catch ( DocumentException e ) { throw new ODFConverterException( e ); } if ( ColumnText.hasMoreText( res ) ) { // text does not fit into current column // split it to a new column columnBreak(); } }
ct.setRunDirection(runDirection); try { ct.go();
ct.setRunDirection(runDirection); try { ct.go();
protected void drawComplexText( final RenderableComplexText node, final Graphics2D g2 ) { try { final Phrase p = createPhrase( node ); final ColumnConfig cc = createColumnText( node ); final PdfGraphics2D pg2 = (PdfGraphics2D) getGraphics(); final PdfContentByte cb = pg2.getRawContentByte(); ColumnText ct = cc.reconfigure( cb, p ); ct.setText( p ); if ( ct.go( false ) == ColumnText.NO_MORE_COLUMN ) { throw new InvalidReportStateException( "iText signaled an error when printing text. Failing to prevent silent data-loss: Width=" + ct.getFilledWidth() ); } } catch ( DocumentException e ) { throw new InvalidReportStateException( e ); } }
ct.setSimpleColumn(ph, rect.getLeft(), rect.getBottom(), rect.getRight(), rect.getTop(), maxFontSize, Element.ALIGN_LEFT); ct.setRunDirection(runDirection); status = ct.go(true); if ((status & ColumnText.NO_MORE_TEXT) != 0) return maxFontSize; ct.setSimpleColumn(new Phrase(text, font), rect.getLeft(), rect.getBottom(), rect.getRight(), rect.getTop(), size, Element.ALIGN_LEFT); ct.setRunDirection(runDirection); status = ct.go(true); if ((status & ColumnText.NO_MORE_TEXT) != 0) { if (max - min < size * precision)
/** * Consumes part of the content of the cell. * @param height the hight of the part that has to be consumed * @since 2.1.6 */ void consumeHeight(float height) { float rightLimit = getRight() - getEffectivePaddingRight(); float leftLimit = getLeft() + getEffectivePaddingLeft(); float bry = height - getEffectivePaddingTop() - getEffectivePaddingBottom(); if (getRotation() != 90 && getRotation() != 270) { column.setSimpleColumn(leftLimit, bry + 0.001f, rightLimit, 0); } else { column.setSimpleColumn(0, leftLimit, bry + 0.001f, rightLimit); } try { column.go(true); } catch (DocumentException e) { // do nothing } }
/** * Consumes part of the content of the cell. * @param height the hight of the part that has to be consumed * @since 2.1.6 */ void consumeHeight(float height) { float rightLimit = getRight() - getEffectivePaddingRight(); float leftLimit = getLeft() + getEffectivePaddingLeft(); float bry = height - getEffectivePaddingTop() - getEffectivePaddingBottom(); if (getRotation() != 90 && getRotation() != 270) { column.setSimpleColumn(leftLimit, bry + 0.001f, rightLimit, 0); } else { column.setSimpleColumn(0, leftLimit, bry + 0.001f, rightLimit); } try { column.go(true); } catch (DocumentException e) { // do nothing } }
/** * Consumes part of the content of the cell. * @param height the hight of the part that has to be consumed * @since 2.1.6 */ void consumeHeight(float height) { float rightLimit = getRight() - getEffectivePaddingRight(); float leftLimit = getLeft() + getEffectivePaddingLeft(); float bry = height - getEffectivePaddingTop() - getEffectivePaddingBottom(); if (getRotation() != 90 && getRotation() != 270) { column.setSimpleColumn(leftLimit, bry + 0.001f, rightLimit, 0); } else { column.setSimpleColumn(0, leftLimit, bry + 0.001f, rightLimit); } try { column.go(true); } catch (DocumentException e) { // do nothing } }
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(); }
while (true) { ct.setSimpleColumn(indentLeft(), indentBottom(), indentRight(), indentTop() - currentHeight); int status = ct.go(); if ((status & ColumnText.NO_MORE_TEXT) != 0) { text.moveText(0, ct.getYLine() - indentTop() + currentHeight);
while (true) { ct.setSimpleColumn(indentLeft(), indentBottom(), indentRight(), indentTop() - currentHeight); int status = ct.go(); if ((status & ColumnText.NO_MORE_TEXT) != 0) { text.moveText(0, ct.getYLine() - indentTop() + currentHeight);
while (true) { ct.setSimpleColumn(indentLeft(), indentBottom(), indentRight(), indentTop() - currentHeight); int status = ct.go(); if ((status & ColumnText.NO_MORE_TEXT) != 0) { text.moveText(0, ct.getYLine() - indentTop() + currentHeight);
ct.go(true); } catch (DocumentException e) { throw new ExceptionConverter(e);
ct.go(true); } catch (DocumentException e) { throw new ExceptionConverter(e);