Codota Logo
PdfContentByte.endText
Code IndexAdd Codota to your IDE (free)

How to use
endText
method
in
com.itextpdf.text.pdf.PdfContentByte

Best Java code snippets using com.itextpdf.text.pdf.PdfContentByte.endText (Showing top 20 results out of 315)

  • Common ways to obtain PdfContentByte
private void myMethod () {
PdfContentByte p =
  • Codota IconPdfWriter writer;writer.getDirectContent()
  • Codota IconPdfStamper pdfStamper;pdfStamper.getOverContent(pageNum)
  • Codota IconPdfStamper pdfStamper;pdfStamper.getUnderContent(pageNum)
  • Smart code suggestions by Codota
}
origin: com.itextpdf/itextpdf

/**
 * Modify the current clipping path by intersecting it with the current path, using the
 * even-odd rule to determine which regions lie inside the clipping path.
 */
public void eoClip() {
  if (inText && isTagged()) {
    endText();
  }
  content.append("W*").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Modify the current clipping path by intersecting it with the current path, using the
 * nonzero winding number rule to determine which regions lie inside the clipping
 * path.
 */
public void clip() {
  if (inText && isTagged()) {
    endText();
  }
  content.append("W").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Modify the current clipping path by intersecting it with the current path, using the
 * even-odd rule to determine which regions lie inside the clipping path.
 */
public void eoClip() {
  if (inText && isTagged()) {
    endText();
  }
  content.append("W*").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Modify the current clipping path by intersecting it with the current path, using the
 * nonzero winding number rule to determine which regions lie inside the clipping
 * path.
 */
public void clip() {
  if (inText && isTagged()) {
    endText();
  }
  content.append("W").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Saves the graphic state. <CODE>saveState</CODE> and
 * <CODE>restoreState</CODE> must be balanced.
 */
public void saveState() {
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_CANVAS, "q");
  if (inText && isTagged()) {
    endText();
  }
  content.append("q").append_i(separator);
  stateList.add(new GraphicState(state));
}
origin: com.itextpdf/itextpdf

/**
 * Saves the graphic state. <CODE>saveState</CODE> and
 * <CODE>restoreState</CODE> must be balanced.
 */
public void saveState() {
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_CANVAS, "q");
  if (inText && isTagged()) {
    endText();
  }
  content.append("q").append_i(separator);
  stateList.add(new GraphicState(state));
}
origin: com.itextpdf/itextpdf

/**
 * Restores the graphic state. <CODE>saveState</CODE> and
 * <CODE>restoreState</CODE> must be balanced.
 */
public void restoreState() {
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_CANVAS, "Q");
  if (inText && isTagged()) {
    endText();
  }
  content.append("Q").append_i(separator);
  int idx = stateList.size() - 1;
  if (idx < 0)
    throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("unbalanced.save.restore.state.operators"));
  state.restore(stateList.get(idx));
  stateList.remove(idx);
}
origin: com.itextpdf/itextpdf

/**
 * Ends the path without filling or stroking it.
 */
public void newPath() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  content.append("n").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Ends the path without filling or stroking it.
 */
public void newPath() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  content.append("n").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Closes the current subpath by appending a straight line segment from the current point
 * to the starting point of the subpath.
 */
public void closePath() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  content.append("h").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Closes the current subpath by appending a straight line segment from the current point
 * to the starting point of the subpath.
 */
public void closePath() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  content.append("h").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Fills the path, using the even-odd rule to determine the region to fill.
 */
public void eoFill() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorFill);
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState);
  content.append("f*").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Fills the path, using the non-zero winding number rule to determine the region to fill.
 */
public void fill() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorFill);
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState);
  content.append("f").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Closes the path and strokes it.
 */
public void closePathStroke() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorStroke);
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState);
  content.append("s").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Strokes the path.
 */
public void stroke() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorStroke);
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState);
  content.append("S").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Fills the path, using the even-odd rule to determine the region to fill.
 */
public void eoFill() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorFill);
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState);
  content.append("f*").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Closes the path, fills it using the even-odd rule to determine the region to fill and strokes it.
 */
public void closePathEoFillStroke() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorFill);
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorStroke);
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState);
  content.append("b*").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Closes the path, fills it using the non-zero winding number rule to determine the region to fill and strokes it.
 */
public void closePathFillStroke() {
  if (inText) {
    if (isTagged()) {
      endText();
    } else {
      throw new IllegalPdfSyntaxException(MessageLocalization.getComposedMessage("path.construction.operator.inside.text.object"));
    }
  }
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorFill);
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_COLOR, state.colorStroke);
  PdfWriter.checkPdfIsoConformance(writer, PdfIsoKeys.PDFISOKEY_GSTATE, state.extGState);
  content.append("b").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Adds a PostScript XObject to this content.
 *
 * @param psobject the object
 */
public void addPSXObject(final PdfPSXObject psobject) {
  if (inText && isTagged()) {
    endText();
  }
  checkWriter();
  PdfName name = writer.addDirectTemplateSimple(psobject, null);
  PageResources prs = getPageResources();
  name = prs.addXObject(name, psobject.getIndirectReference());
  content.append(name.getBytes()).append(" Do").append_i(separator);
}
origin: com.itextpdf/itextpdf

/** Concatenates a transformation to the current transformation
 * matrix.
 * @param af the transformation
 */
public void transform(final AffineTransform af) {
  if (inText && isTagged()) {
    endText();
  }
  double matrix[] = new double[6];
  af.getMatrix(matrix);
  state.CTM.concatenate(af);
  content.append(matrix[0]).append(' ').append(matrix[1]).append(' ').append(matrix[2]).append(' ');
  content.append(matrix[3]).append(' ').append(matrix[4]).append(' ').append(matrix[5]).append(" cm").append_i(separator);
}
com.itextpdf.text.pdfPdfContentByteendText

Javadoc

Ends the writing of text and makes the current font invalid.

Popular methods of PdfContentByte

  • addTemplate
    adds a template with the given matrix.
  • createTemplate
  • beginText
    Starts the writing of text.
  • lineTo
    Appends a straight line segment from the current point (x, y). The new current point is (x, y).
  • moveTo
    Move the current point (x, y), omitting any connecting line segment.
  • restoreState
    Restores the graphic state. saveState andrestoreState must be balanced.
  • saveState
    Saves the graphic state. saveState andrestoreState must be balanced.
  • setFontAndSize
    Set the font and the size for the subsequent text writing.
  • setLineWidth
    Changes the line width. The line width specifies the thickness of the line used to stroke a path and
  • stroke
    Strokes the path.
  • addImage
    Adds an Image to the page. The Image must have absolute positioning. The image can be placed inline.
  • setTextMatrix
    Changes the text matrix.
  • addImage,
  • setTextMatrix,
  • showText,
  • fill,
  • rectangle,
  • setColorFill,
  • setColorStroke,
  • setGState,
  • beginLayer

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now