- Direct Known Subclasses:
PdfDate
PdfString-class is the PDF-equivalent of a JAVA-String-object.
A string is a sequence of characters delimited by parenthesis. If a string is too long to be conveniently placed on a
single line, it may be split across multiple lines by using the backslash character (\) at the end of a line to
indicate that the string continues on the following line. Within a string, the backslash character is used as an
escape to specify unbalanced parenthesis, non-printing ASCII characters, and the backslash character itself. Use of
the \ddd escape sequence is the preferred way to represent characters outside the printable ASCII character
set.
This object is described in the 'Portable Document Format Reference Manual version 1.7' section 3.2.3 (page
53-56).
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructs an emptyPdfString-object.PdfString(byte[] bytes) Deprecated.Constructs aPdfString-object.Deprecated.Constructs aPdfString-object containing a string in the standard encodingTEXT_PDFDOCENCODING.Deprecated.Constructs aPdfString-object containing a string in the specified encoding. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytes()Deprecated.Gets the presentation of this object in a byte arrayDeprecated.Gets the encoding of this string.byte[]Deprecated.char[]Deprecated.return the characters in our value without any translation.booleanDeprecated.setHexWriting(boolean hexWriting) Deprecated.voidtoPdf(PdfWriter writer, OutputStream os) Deprecated.Writes the PDF representation of thisPdfStringas an array ofbyteto the specifiedOutputStream.toString()Deprecated.Returns theStringvalue of thisPdfString-object.Deprecated.Returns the UnicodeStringvalue of thisPdfString-object.Methods inherited from class com.lowagie.text.pdf.PdfObject
canBeInObjStm, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
-
Field Details
-
value
Deprecated.The value of this object. -
originalValue
Deprecated. -
encoding
Deprecated.The encoding. -
objNum
protected int objNumDeprecated. -
objGen
protected int objGenDeprecated. -
hexWriting
protected boolean hexWritingDeprecated.
-
-
Constructor Details
-
PdfString
public PdfString()Deprecated.Constructs an emptyPdfString-object. -
PdfString
Deprecated.Constructs aPdfString-object containing a string in the standard encodingTEXT_PDFDOCENCODING.- Parameters:
value- the content of the string
-
PdfString
Deprecated.Constructs aPdfString-object containing a string in the specified encoding.- Parameters:
value- the content of the stringencoding- an encoding
-
PdfString
public PdfString(byte[] bytes) Deprecated.Constructs aPdfString-object.- Parameters:
bytes- an array ofbyte
-
-
Method Details
-
toPdf
Deprecated.Writes the PDF representation of thisPdfStringas an array ofbyteto the specifiedOutputStream.- Overrides:
toPdfin classPdfObject- Parameters:
writer- for backwards compatibilityos- TheOutputStreamto write the bytes to.- Throws:
IOException- on error
-
toString
Deprecated.Returns theStringvalue of thisPdfString-object. -
getBytes
public byte[] getBytes()Deprecated.Description copied from class:PdfObjectGets the presentation of this object in a byte array -
toUnicodeString
Deprecated.Returns the UnicodeStringvalue of thisPdfString-object.- Returns:
- A
String
-
getEncoding
Deprecated.Gets the encoding of this string.- Returns:
- a
String
-
getOriginalBytes
public byte[] getOriginalBytes()Deprecated.- Returns:
- The original bytes used to create this PDF string, or the bytes of our current value if the original bytes are missing.
-
getOriginalChars
public char[] getOriginalChars()Deprecated.return the characters in our value without any translation. This allows a string to be built that holds 2-byte or one-byte character codes, as needed for processing by fonts when extracting text.Intended for use when no encoding transformations are desired.
- Returns:
- The code points in this font as chars.
-
isHexWriting
public boolean isHexWriting()Deprecated. -
setHexWriting
Deprecated.
-