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

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

Best Java code snippets using com.itextpdf.text.pdf.PdfContentByte.checkState (Showing top 10 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

public void showTextGid(final String gids) {
  checkState();
  if (!inText && isTagged()) {
    beginText(true);
  }
  if (state.fontDetails == null)
    throw new NullPointerException(MessageLocalization.getComposedMessage("font.and.size.must.be.set.before.writing.any.text"));
  Object[] objs = state.fontDetails.convertToBytesGid(gids);
  StringUtils.escapeString((byte[]) objs[0], content);
  state.tx += ((Integer)objs[2]).intValue() * 0.001f * state.size;
  content.append("Tj").append_i(separator);
}
origin: com.itextpdf/itextg

public void showTextGid(final String gids) {
  checkState();
  if (!inText && isTagged()) {
    beginText(true);
  }
  if (state.fontDetails == null)
    throw new NullPointerException(MessageLocalization.getComposedMessage("font.and.size.must.be.set.before.writing.any.text"));
  Object[] objs = state.fontDetails.convertToBytesGid(gids);
  StringUtils.escapeString((byte[]) objs[0], content);
  state.tx += ((Integer)objs[2]).intValue() * 0.001f * state.size;
  content.append("Tj").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Shows the <CODE>text</CODE>.
 *
 * @param text the text to write
 */
public void showText(final String text) {
  checkState();
  if (!inText && isTagged()) {
    beginText(true);
  }
  showText2(text);
  updateTx(text, 0);
  content.append("Tj").append_i(separator);
}
origin: com.itextpdf/itextpdf

/**
 * Moves to the next line and shows <CODE>text</CODE>.
 *
 * @param text the text to write
 */
public void newlineShowText(final String text) {
  checkState();
  if (!inText && isTagged()) {
    beginText(true);
  }
  state.yTLM -= state.leading;
  showText2(text);
  content.append("'").append_i(separator);
  state.tx = state.xTLM;
  updateTx(text, 0);
}
origin: com.itextpdf/itextg

/**
 * Shows the <CODE>text</CODE>.
 *
 * @param text the text to write
 */
public void showText(final String text) {
  checkState();
  if (!inText && isTagged()) {
    beginText(true);
  }
  showText2(text);
  updateTx(text, 0);
  content.append("Tj").append_i(separator);
}
origin: com.itextpdf/itextg

/**
 * Moves to the next line and shows <CODE>text</CODE>.
 *
 * @param text the text to write
 */
public void newlineShowText(final String text) {
  checkState();
  if (!inText && isTagged()) {
    beginText(true);
  }
  state.yTLM -= state.leading;
  showText2(text);
  content.append("'").append_i(separator);
  state.tx = state.xTLM;
  updateTx(text, 0);
}
origin: com.itextpdf/itextpdf

checkState();
if (!inText && isTagged()) {
  beginText(true);
origin: com.itextpdf/itextg

checkState();
if (!inText && isTagged()) {
  beginText(true);
origin: com.itextpdf/itextpdf

/**
 * Moves to the next line and shows text string, using the given values of the character and word spacing parameters.
 *
 * @param       wordSpacing     a parameter
 * @param       charSpacing     a parameter
 * @param text the text to write
 */
public void newlineShowText(final float wordSpacing, final float charSpacing, final String text) {
  checkState();
  if (!inText && isTagged()) {
    beginText(true);
  }
  state.yTLM -= state.leading;
  content.append(wordSpacing).append(' ').append(charSpacing);
  showText2(text);
  content.append("\"").append_i(separator);
  // The " operator sets charSpace and wordSpace into graphics state
  // (cfr PDF reference v1.6, table 5.6)
  state.charSpace = charSpacing;
  state.wordSpace = wordSpacing;
  state.tx = state.xTLM;
  updateTx(text, 0);
}
origin: com.itextpdf/itextg

/**
 * Moves to the next line and shows text string, using the given values of the character and word spacing parameters.
 *
 * @param       wordSpacing     a parameter
 * @param       charSpacing     a parameter
 * @param text the text to write
 */
public void newlineShowText(final float wordSpacing, final float charSpacing, final String text) {
  checkState();
  if (!inText && isTagged()) {
    beginText(true);
  }
  state.yTLM -= state.leading;
  content.append(wordSpacing).append(' ').append(charSpacing);
  showText2(text);
  content.append("\"").append_i(separator);
  // The " operator sets charSpace and wordSpace into graphics state
  // (cfr PDF reference v1.6, table 5.6)
  state.charSpace = charSpacing;
  state.wordSpace = wordSpacing;
  state.tx = state.xTLM;
  updateTx(text, 0);
}
com.itextpdf.text.pdfPdfContentBytecheckState

Popular methods of PdfContentByte

  • addTemplate
    adds a template with the given matrix.
  • createTemplate
  • beginText
    Starts the writing of text.
  • endText
    Ends the writing of text and makes the current font invalid.
  • 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.
  • stroke,
  • addImage,
  • setTextMatrix,
  • showText,
  • fill,
  • rectangle,
  • setColorFill,
  • setColorStroke,
  • setGState,
  • beginLayer

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
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