Codota Logo
PdfString.<init>
Code IndexAdd Codota to your IDE (free)

How to use
com.itextpdf.text.pdf.PdfString
constructor

Best Java code snippets using com.itextpdf.text.pdf.PdfString.<init> (Showing top 20 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/itextpdf

/**
 * A Hide action hides or shows an annotation.
 * @param name
 * @param hide
 * @return A Hide Action
 */
public static PdfAction createHide(String name, boolean hide) {
  return createHide(new PdfString(name), hide);
}
origin: com.itextpdf/itextpdf

/** Sets the field value as a string.
 * @param field the fully qualified field name
 * @param value the value
 * @return <CODE>true</CODE> if the value was inserted,
 * <CODE>false</CODE> if the name is incompatible with
 * an existing field
 */
public boolean setFieldAsString(String field, String value) {
  return setField(field, new PdfString(value, PdfObject.TEXT_UNICODE));
}
origin: com.itextpdf/itextpdf

/**
 * The "user name" is the text shown as a tool.
 * @param s user name.
 */
public void setUserName(String s) {
  put(PdfName.TU, new PdfString(s, PdfObject.TEXT_UNICODE));
}
origin: com.itextpdf/itextpdf

/**
 * If this dictionary refers to a child that is a file attachment added to a page,
 * you need to specify the name of the page (or use setFileAttachmentPage to specify the page number).
 * Once you have specified the page, you still need to specify the attachment using another method.
 * @param name    the named destination referring to the page with the file attachment.
 */
public void setFileAttachmentPagename(String name) {
  put(PdfName.P, new PdfString(name, null));
}

origin: com.itextpdf/itextpdf

/**
 * Adds the subject to the document.
 *
 * @param    subject        the subject of the document
 */
void addSubject(final String subject) {
  put(PdfName.SUBJECT, new PdfString(subject, PdfObject.TEXT_UNICODE));
}
origin: com.itextpdf/itextg

/**
 * The mapping name is the name this field uses when submitting form data.
 * @param s
 */
public void setMappingName(String s) {
  put(PdfName.TM, new PdfString(s, PdfObject.TEXT_UNICODE));
}
origin: com.itextpdf/itextg

/**
 * Sets the alternative information for the image.
 *
 * @param alt
 *            the alternative information
 */
public void setAlt(final String alt) {
  this.alt = alt;
  setAccessibleAttribute(PdfName.ALT, new PdfString(alt));
}
origin: com.itextpdf/itextg

/**
 * Sets the name of this layer.
 * @param name the name of this layer
 */
public void setName(String name) {
  put(PdfName.NAME, new PdfString(name, PdfObject.TEXT_UNICODE));
}
origin: com.itextpdf/itextg

/**
 * Sets the name of the annotation.
 * With this name the annotation can be identified among
 * all the annotations on a page (it has to be unique).
 */
public void setName(String name) {
  put(PdfName.NM, new PdfString(name));
}
origin: com.itextpdf/itextpdf

/**
 * Adds some keywords to the document.
 *
 * @param    keywords        the keywords of the document
 */
void addKeywords(final String keywords) {
  put(PdfName.KEYWORDS, new PdfString(keywords, PdfObject.TEXT_UNICODE));
}
origin: com.itextpdf/itextpdf

/**
 * Adds the title of the document.
 *
 * @param    title        the title of the document
 */
void addTitle(final String title) {
  put(PdfName.TITLE, new PdfString(title, PdfObject.TEXT_UNICODE));
}
origin: com.itextpdf/itextpdf

/**
 * Sets the alternative information for the image.
 *
 * @param alt
 *            the alternative information
 */
public void setAlt(final String alt) {
  this.alt = alt;
  setAccessibleAttribute(PdfName.ALT, new PdfString(alt));
}
origin: com.itextpdf/itextpdf

/**
 * Sets the textual expansion of the abbreviation or acronym.
 * It is highly recommend to set textuual expansion when generating PDF/UA documents.
 * @param value
 */
public void setTextExpansion(String value) {
  setAccessibleAttribute(PdfName.E, new PdfString(value));
}
origin: com.itextpdf/itextpdf

protected static PdfArray processOptions(String options[][]) {
  PdfArray array = new PdfArray();
  for (int k = 0; k < options.length; ++k) {
    String subOption[] = options[k];
    PdfArray ar2 = new PdfArray(new PdfString(subOption[0], PdfObject.TEXT_UNICODE));
    ar2.add(new PdfString(subOption[1], PdfObject.TEXT_UNICODE));
    array.add(ar2);
  }
  return array;
}
origin: com.itextpdf/itextpdf

/**
 * Constructs a new <CODE>PdfAction</CODE> of Subtype GoToR.
 * @param filename the file name to go to
 * @param name the named destination to go to
 */
public PdfAction(String filename, String name) {
  put(PdfName.S, PdfName.GOTOR);
  put(PdfName.F, new PdfString(filename));
  put(PdfName.D, new PdfString(name));
}
origin: com.itextpdf/itextpdf

/**
 * Sets the file name (the key /F) string as an hex representation
 * to support multi byte file names. The name must have the slash and
 * backslash escaped according to the file specification rules
 * @param fileName the file name as a byte array
 */    
public void setMultiByteFileName(byte fileName[]) {
  put(PdfName.F, new PdfString(fileName).setHexWriting(true));
}

origin: com.itextpdf/itextg

public void setDefaultAppearanceString(PdfContentByte cb) {
  byte b[] = cb.getInternalBuffer().toByteArray();
  int len = b.length;
  for (int k = 0; k < len; ++k) {
    if (b[k] == '\n')
      b[k] = 32;
  }
  put(PdfName.DA, new PdfString(b));
}
origin: com.itextpdf/itextpdf

public void setDefaultAppearanceString(PdfContentByte cb) {
  byte b[] = cb.getInternalBuffer().toByteArray();
  int len = b.length;
  for (int k = 0; k < len; ++k) {
    if (b[k] == '\n')
      b[k] = 32;
  }
  put(PdfName.DA, new PdfString(b));
}
origin: com.itextpdf/itextpdf

/**
 * Constructs a new <CODE>PdfAction</CODE> of Subtype GoToR.
 * @param filename the file name to go to
 * @param page the page destination to go to
 */
public PdfAction(String filename, int page) {
  put(PdfName.S, PdfName.GOTOR);
  put(PdfName.F, new PdfString(filename));
  put(PdfName.D, new PdfLiteral("[" + (page - 1) + " /FitH 10000]"));
}
origin: com.itextpdf/itextpdf

PdfRendition(String file, PdfFileSpecification fs, String mimeType) throws IOException{
  put(PdfName.S, new PdfName("MR"));
  put(PdfName.N, new PdfString("Rendition for "+file));
  put(PdfName.C, new PdfMediaClipData(file, fs, mimeType));
}
com.itextpdf.text.pdfPdfString<init>

Javadoc

Constructs an empty PdfString-object.

Popular methods of PdfString

  • 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
  • length
  • setHexWriting
  • setObjNum

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Table (org.hibernate.mapping)
    A relational table
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