Tabnine Logo
Chunk.getContent
Code IndexAdd Tabnine to your IDE (free)

How to use
getContent
method
in
com.itextpdf.text.Chunk

Best Java code snippets using com.itextpdf.text.Chunk.getContent (Showing top 14 results out of 315)

origin: com.itextpdf/itextpdf

/**
 * Returns the content of this <CODE>Chunk</CODE>.
 *
 * @return a <CODE>String</CODE>
 */
@Override
public String toString() {
  return getContent();
}
origin: com.itextpdf/itextg

/**
 * Returns the content of this <CODE>Chunk</CODE>.
 *
 * @return a <CODE>String</CODE>
 */
@Override
public String toString() {
  return getContent();
}
origin: org.technbolts/gutenberg

private static Element discardNewline(Element sub) {
  if (sub instanceof Chunk) {
    Chunk c = (Chunk) sub;
    String content = c.getContent();
    if (content.endsWith("\n") && content.length() < 2) {
      return new Chunk(" ");
    }
  }
  return sub;
}
origin: fr.opensagres.xdocreport/fr.opensagres.xdocreport.itext5.extension

  @Override
  public String getContent()
  {
    return pageNumberChunk ? String.valueOf( ownerDocument.getPageNumber() ) : super.getContent();
  }
}
origin: com.itextpdf/itextpdf

/**
 * Constructs a <CODE>PdfOutline</CODE>.
 * <P>
 * This is the constructor for an <CODE>outline entry</CODE>.
 *
 * @param parent the parent of this outline item
 * @param action the <CODE>PdfAction</CODE> for this outline item
 * @param title the title of this outline item
 * @param open <CODE>true</CODE> if the children are visible
 */
public PdfOutline(PdfOutline parent, PdfAction action, Paragraph title, boolean open) {
  super();
  StringBuffer buf = new StringBuffer();
  for (Chunk chunk: title.getChunks()) {
    buf.append(chunk.getContent());
  }
  this.action = action;
  initOutline(parent, buf.toString(), open);
}
origin: com.itextpdf/itextpdf

/**
 * Constructs a <CODE>PdfOutline</CODE>.
 * <P>
 * This is the constructor for an <CODE>outline entry</CODE>.
 *
 * @param parent the parent of this outline item
 * @param destination the destination for this outline item
 * @param title the title of this outline item
 * @param open <CODE>true</CODE> if the children are visible
 */
public PdfOutline(PdfOutline parent, PdfDestination destination, Paragraph title, boolean open) {
  super();
  StringBuffer buf = new StringBuffer();
  for (Object element : title.getChunks()) {
    Chunk chunk = (Chunk) element;
    buf.append(chunk.getContent());
  }
  this.destination = destination;
  initOutline(parent, buf.toString(), open);
}
origin: com.itextpdf/itextg

/**
 * Constructs a <CODE>PdfOutline</CODE>.
 * <P>
 * This is the constructor for an <CODE>outline entry</CODE>.
 *
 * @param parent the parent of this outline item
 * @param action the <CODE>PdfAction</CODE> for this outline item
 * @param title the title of this outline item
 * @param open <CODE>true</CODE> if the children are visible
 */
public PdfOutline(PdfOutline parent, PdfAction action, Paragraph title, boolean open) {
  super();
  StringBuffer buf = new StringBuffer();
  for (Chunk chunk: title.getChunks()) {
    buf.append(chunk.getContent());
  }
  this.action = action;
  initOutline(parent, buf.toString(), open);
}
origin: com.itextpdf/itextg

/**
 * Constructs a <CODE>PdfOutline</CODE>.
 * <P>
 * This is the constructor for an <CODE>outline entry</CODE>.
 *
 * @param parent the parent of this outline item
 * @param destination the destination for this outline item
 * @param title the title of this outline item
 * @param open <CODE>true</CODE> if the children are visible
 */
public PdfOutline(PdfOutline parent, PdfDestination destination, Paragraph title, boolean open) {
  super();
  StringBuffer buf = new StringBuffer();
  for (Object element : title.getChunks()) {
    Chunk chunk = (Chunk) element;
    buf.append(chunk.getContent());
  }
  this.destination = destination;
  initOutline(parent, buf.toString(), open);
}
origin: com.itextpdf/itextpdf

value = chunk.getContent();
    attributes.put(Chunk.GENERICTAG, chunk.getContent());
origin: com.itextpdf/itextg

value = chunk.getContent();
    attributes.put(Chunk.GENERICTAG, chunk.getContent());
origin: com.itextpdf/itextpdf

/**
 * Gets the width of the Chunk in points.
 *
 * @return a width in points
 */
public float getWidthPoint() {
  if (getImage() != null) {
    return getImage().getScaledWidth();
  }
  return font.getCalculatedBaseFont(true).getWidthPoint(getContent(),
      font.getCalculatedSize())
      * getHorizontalScaling();
}
origin: com.itextpdf/itextg

/**
 * Gets the width of the Chunk in points.
 *
 * @return a width in points
 */
public float getWidthPoint() {
  if (getImage() != null) {
    return getImage().getScaledWidth();
  }
  return font.getCalculatedBaseFont(true).getWidthPoint(getContent(),
      font.getCalculatedSize())
      * getHorizontalScaling();
}
origin: com.itextpdf/itextg

String c = chunk.getContent();
if (font != null && !font.isStandardFont()) {
  f = font.difference(chunk.getFont());
        && (f == null
        || f.compareTo(previous.getFont()) == 0)
        && !"".equals(previous.getContent().trim())
        && !"".equals(c.trim())) {
      previous.append(c);
origin: com.itextpdf/itextpdf

String c = chunk.getContent();
if (font != null && !font.isStandardFont()) {
  f = font.difference(chunk.getFont());
        && (f == null
        || f.compareTo(previous.getFont()) == 0)
        && !"".equals(previous.getContent().trim())
        && !"".equals(c.trim())) {
      previous.append(c);
com.itextpdf.textChunkgetContent

Javadoc

Returns the content of this Chunk.

Popular methods of Chunk

  • <init>
    Constructs a chunk of text with a certain content and a certain Font.
  • setBackground
    Sets the color and the size of the background Chunk.
  • getWidthPoint
    Gets the width of the Chunk in points.
  • setGenericTag
    Sets the generic tag Chunk. The text for this tag can be retrieved with PdfPageEvent.
  • getFont
    Gets the font of this Chunk.
  • setFont
    Sets the font of this Chunk.
  • setLocalDestination
    Sets a local destination for this Chunk.
  • setTextRise
    Sets the text displacement relative to the baseline. Positive values rise the text, negative values
  • append
    appends some text to this Chunk.
  • createTabspace
  • createWhitespace
  • getAccessibleAttribute
  • createWhitespace,
  • getAccessibleAttribute,
  • getAccessibleAttributes,
  • getAttributes,
  • getHorizontalScaling,
  • getHyphenation,
  • getId,
  • getImage,
  • getRole

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • compareTo (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now