org.apache.fop.pdf
Class PDFText
- PDFWritable
This class represents a simple number object. It also contains contains some
utility methods for outputting numbers to PDF.
static byte[] | escapeByteArray(byte[] data) - Escape a byte array for output to PDF (Used for encrypted strings)
|
static String | escapeString(String s) - Escaped a String as described in section 4.4 in the PDF 1.3 specs.
|
static void | escapeStringChar(char c, StringBuffer target) - Escapes a character conforming to the rules established in the PostScript
Language Reference (Search for "Literal Text Strings").
|
static String | escapeText(String text) - Escape text (see 4.4.1 in PDF 1.3 specs)
|
static String | escapeText(String text, boolean forceHexMode) - Escape text (see 4.4.1 in PDF 1.3 specs)
|
String | getText() - Returns the text.
|
void | setText(String text) - Sets the text.
|
static String | toHex(byte[] data) - Converts a byte array to a Hexadecimal String (3.2.3 in PDF 1.4 specs)
|
static String | toHex(byte[] data, boolean brackets) - Converts a byte array to a Hexadecimal String (3.2.3 in PDF 1.4 specs)
|
protected String | toPDFString() -
|
static byte[] | toUTF16(String text) - Converts a String to UTF-16 (big endian).
|
static String | toUnicodeHex(char c) - Convert a char to a multibyte hex representation
|
encode , encodeBinaryToHexString , encodeString , encodeText , formatDateTime , formatDateTime , formatObject , getDocument , getDocumentSafely , getGeneration , getObjectID , getObjectNumber , getParent , hasObjectNumber , makeReference , output , outputInline , referencePDF , setDocument , setObjectNumber , setParent , toPDF , toPDFString |
escapeByteArray
public static final byte[] escapeByteArray(byte[] data)
Escape a byte array for output to PDF (Used for encrypted strings)
escapeString
public static final String escapeString(String s)
Escaped a String as described in section 4.4 in the PDF 1.3 specs.
- String the escaped String
escapeStringChar
public static final void escapeStringChar(char c,
StringBuffer target)
Escapes a character conforming to the rules established in the PostScript
Language Reference (Search for "Literal Text Strings").
c
- character to escapetarget
- target StringBuffer to write the escaped character to
escapeText
public static final String escapeText(String text)
Escape text (see 4.4.1 in PDF 1.3 specs)
text
- the text to encode
escapeText
public static final String escapeText(String text,
boolean forceHexMode)
Escape text (see 4.4.1 in PDF 1.3 specs)
text
- the text to encodeforceHexMode
- true if the output should follow the hex encoding rules
getText
public String getText()
Returns the text.
setText
public void setText(String text)
Sets the text.
toHex
public static final String toHex(byte[] data)
Converts a byte array to a Hexadecimal String (3.2.3 in PDF 1.4 specs)
data
- the data to encode
- String the resulting string
toHex
public static final String toHex(byte[] data,
boolean brackets)
Converts a byte array to a Hexadecimal String (3.2.3 in PDF 1.4 specs)
data
- the data to encodebrackets
- true if enclosing brackets should be included
- String the resulting string
toUTF16
public static final byte[] toUTF16(String text)
Converts a String to UTF-16 (big endian).
toUnicodeHex
public static final String toUnicodeHex(char c)
Convert a char to a multibyte hex representation
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.