|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.pdf.object.PDFObject
org.foray.pdf.object.PDFTextString
public class PDFTextString
A PDF Text String, as defined in PDF Reference, 2nd Edition, Section 3.8.1.
Text-strings are used in such PDF concepts as bookmarks, text annotations,
etc., which do not have control over fonts, layout, etc.
For string objects used in PDF content streams, see PDFString
.
PDFString
Field Summary | |
---|---|
static char |
INVALID_PDF_DOC_ENCODING
This char is returned when a Unicode character cannot be encoded using the PDFDocEncoding. |
Fields inherited from class org.foray.pdf.object.PDFObject |
---|
EOL, MSG_EOL, XREF_EOL |
Constructor Summary | |
---|---|
PDFTextString(PDFDocument doc,
CharSequence string)
Constructor. |
Method Summary | |
---|---|
boolean |
isEmpty()
Indicates whether this String has any content. |
String |
toPDF()
Generates the PDF text necessary to represent the object, returning it as a String. |
static char |
unicodeToPDFDocEncoding(char unicodeChar)
Converts a Unicode character to its PDFDocEncoding equivalent, if possible. |
static String |
unicodeToPDFDocEncoding(CharSequence unicodeString)
Converts a String from Unicode to PDFDocEncoding, if possible. |
Methods inherited from class org.foray.pdf.object.PDFObject |
---|
bufferToByteArray, byteArrayToStream, getCharsPerLine, getGeneration, getLogger, getNumber, getPDFDocument, output, pdfID, pdfReference, setNumber, stringToByteArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char INVALID_PDF_DOC_ENCODING
Constructor Detail |
---|
public PDFTextString(PDFDocument doc, CharSequence string)
doc
- The parent PDF document.string
- The encapsulated String.Method Detail |
---|
public String toPDF()
public static String unicodeToPDFDocEncoding(CharSequence unicodeString)
unicodeString
- The String
to be converted.
public static char unicodeToPDFDocEncoding(char unicodeChar)
unicodeChar
- The Unicode character to be converted.
public boolean isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |