com.lowagie.text.pdf
public class PdfEncodings extends Object
Nested Class Summary | |
---|---|
static class | PdfEncodings.Cp437Conversion |
static class | PdfEncodings.SymbolConversion |
static class | PdfEncodings.SymbolTTConversion |
static class | PdfEncodings.WingdingsConversion |
Field Summary | |
---|---|
static HashMap | cmaps |
protected static int | CIDCHAR |
protected static int | CIDNONE |
protected static int | CIDRANGE |
static byte[][] | CRLF_CID_NEWLINE Assumes that '\\n' and '\\r\\n' are the newline sequences. |
static HashMap | extraEncodings |
static IntHashtable | pdfEncoding |
static char[] | pdfEncodingByteToChar |
static IntHashtable | winansi |
static char[] | winansiByteToChar |
Method Summary | |
---|---|
static void | addExtraEncoding(String name, ExtraEncoding enc) Adds an extra encoding. |
static void | breakLong(long n, int size, byte[] seqs) |
static void | clearCmap(String name) Clears the CJK cmaps from the cache. |
static String | convertCmap(String name, byte[] seq) Converts a byte array encoded as name
to a CID string. |
static String | convertCmap(String name, byte[] seq, int start, int length) Converts a byte array encoded as name
to a CID string. |
static byte[] | convertToBytes(String text, String encoding) Converts a String to a byte array according
to the font's encoding. |
static String | convertToString(byte[] bytes, String encoding) Converts a byte array to a String according
to the some encoding. |
static String | decodeSequence(byte[] seq, int start, int length, char[][] planes) |
static void | encodeSequence(int size, byte[] seqs, char cid, ArrayList planes) |
static void | encodeStream(InputStream in, ArrayList planes) |
static boolean | isPdfDocEncoding(String text) Checks is text only has PdfDocEncoding characters. |
static void | loadCmap(String name, byte[][] newline) Loads a CJK cmap to the cache with the option of associating
sequences to the newline. |
static char[][] | readCmap(String name, byte[][] newline) |
static void | readCmap(String name, ArrayList planes) |
Parameters: name the name of the encoding. The encoding recognition is case insensitive enc the conversion class
name
is the
empty string then all the cache is cleared. Calling this method
has no consequences other than the need to reload the cmap
if needed.Parameters: name the name of the cmap to clear or all the cmaps if the empty string
byte
array encoded as name
to a CID string. This is needed to reach some CJK characters
that don't exist in 16 bit Unicode.
The font to use this result must use the encoding "Identity-H"
or "Identity-V".
See ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/.Parameters: name the CJK encoding name seq the byte
array to be decoded
Returns: the CID string
byte
array encoded as name
to a CID string. This is needed to reach some CJK characters
that don't exist in 16 bit Unicode.
The font to use this result must use the encoding "Identity-H"
or "Identity-V".
See ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/adobe/.Parameters: name the CJK encoding name start the start offset in the data length the number of bytes to convert seq the byte
array to be decoded
Returns: the CID string
String
to a byte array according
to the font's encoding.Parameters: encoding the encoding text the String
to be converted
Returns: an array of byte
representing the conversion according to the font's encoding
String
according
to the some encoding.Parameters: bytes the bytes to convert encoding the encoding
Returns: the converted String
text
only has PdfDocEncoding characters.Parameters: text the String
to test
Returns: true
if only PdfDocEncoding characters are present
Parameters: name the CJK cmap name newline the sequences to be replaced bi a newline in the resulting CID. See CRLF_CID_NEWLINE