Codota Logo
PdfString.length
Code IndexAdd Codota to your IDE (free)

How to use
length
method
in
com.itextpdf.text.pdf.PdfString

Best Java code snippets using com.itextpdf.text.pdf.PdfString.length (Showing top 2 results out of 315)

  • Common ways to obtain PdfString
private void myMethod () {
PdfString p =
  • Codota IconString value;new PdfString(value)
  • Codota IconString value;String encoding;new PdfString(value, encoding)
  • Smart code suggestions by Codota
}
origin: com.itextpdf/itextg

/**
 * Provides detail useful if a listener needs access to the position of each individual glyph in the text render operation
 * @return  A list of {@link TextRenderInfo} objects that represent each glyph used in the draw operation. The next effect is if there was a separate Tj opertion for each character in the rendered string
 * @since   5.3.3
 */
public List<TextRenderInfo> getCharacterRenderInfos(){
  List<TextRenderInfo> rslt = new ArrayList<TextRenderInfo>(string.length());
  PdfString[] strings = splitString(string);
  float totalWidth = 0;
  for (int i = 0; i < strings.length; i++) {
    float[] widthAndWordSpacing = getWidthAndWordSpacing(strings[i], true);
    TextRenderInfo subInfo = new TextRenderInfo(this, strings[i], totalWidth);
    rslt.add(subInfo);
    totalWidth += (widthAndWordSpacing[0] * gs.fontSize + gs.characterSpacing + widthAndWordSpacing[1]) * gs.horizontalScaling;
  }
  for (TextRenderInfo tri : rslt)
    tri.getUnscaledWidth();
  return rslt;
}
origin: com.itextpdf/itextpdf

/**
 * Provides detail useful if a listener needs access to the position of each individual glyph in the text render operation
 * @return  A list of {@link TextRenderInfo} objects that represent each glyph used in the draw operation. The next effect is if there was a separate Tj opertion for each character in the rendered string
 * @since   5.3.3
 */
public List<TextRenderInfo> getCharacterRenderInfos(){
  List<TextRenderInfo> rslt = new ArrayList<TextRenderInfo>(string.length());
  PdfString[] strings = splitString(string);
  float totalWidth = 0;
  for (int i = 0; i < strings.length; i++) {
    float[] widthAndWordSpacing = getWidthAndWordSpacing(strings[i], true);
    TextRenderInfo subInfo = new TextRenderInfo(this, strings[i], totalWidth);
    rslt.add(subInfo);
    totalWidth += (widthAndWordSpacing[0] * gs.fontSize + gs.characterSpacing + widthAndWordSpacing[1]) * gs.horizontalScaling;
  }
  for (TextRenderInfo tri : rslt)
    tri.getUnscaledWidth();
  return rslt;
}
com.itextpdf.text.pdfPdfStringlength

Popular methods of PdfString

  • <init>
    Constructs a PdfString-object.
  • toString
    Returns the String value of this PdfString-object.
  • getBytes
  • getOriginalBytes
  • toUnicodeString
    Returns the Unicode String value of thisPdfString-object.
  • decrypt
    Decrypt an encrypted PdfString
  • getEncoding
    Gets the encoding of this string.
  • isHexWriting
  • setHexWriting
  • setObjNum

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JOptionPane (javax.swing)
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