|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itextpdf.text.pdf.PdfEncodings
public class PdfEncodings
Supports fast encodings for winansi and PDFDocEncoding. Supports conversions from CJK encodings to CID. Supports custom encodings.
| Constructor Summary | |
|---|---|
PdfEncodings()
|
|
| Method Summary | |
|---|---|
static void |
addExtraEncoding(java.lang.String name,
ExtraEncoding enc)
Adds an extra encoding. |
static byte[] |
convertToBytes(char char1,
java.lang.String encoding)
Converts a String to a byte array according
to the font's encoding. |
static byte[] |
convertToBytes(java.lang.String text,
java.lang.String encoding)
Converts a String to a byte array according
to the font's encoding. |
static java.lang.String |
convertToString(byte[] bytes,
java.lang.String encoding)
Converts a byte array to a String according
to the some encoding. |
static boolean |
isPdfDocEncoding(java.lang.String text)
Checks is text only has PdfDocEncoding characters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PdfEncodings()
| Method Detail |
|---|
public static final byte[] convertToBytes(java.lang.String text,
java.lang.String encoding)
String to a byte array according
to the font's encoding.
encoding - the encodingtext - the String to be converted
byte representing the conversion according to the font's encoding
public static final byte[] convertToBytes(char char1,
java.lang.String encoding)
String to a byte array according
to the font's encoding.
encoding - the encodingchar1 - the char to be converted
byte representing the conversion according to the font's encoding
public static final java.lang.String convertToString(byte[] bytes,
java.lang.String encoding)
String according
to the some encoding.
bytes - the bytes to convertencoding - the encoding
Stringpublic static boolean isPdfDocEncoding(java.lang.String text)
text only has PdfDocEncoding characters.
text - the String to test
true if only PdfDocEncoding characters are present
public static void addExtraEncoding(java.lang.String name,
ExtraEncoding enc)
name - the name of the encoding. The encoding recognition is case insensitiveenc - the conversion class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||