Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
public class: PdfEncodings [javadoc | source]
java.lang.Object
   com.lowagie.text.pdf.PdfEncodings
Supports fast encodings for winansi and PDFDocEncoding. Supports conversions from CJK encodings to CID. Supports custom encodings.
Field Summary
protected static final  int CIDNONE     
protected static final  int CIDRANGE     
protected static final  int CIDCHAR     
static final  char[] winansiByteToChar     
static final  char[] pdfEncodingByteToChar     
static final  IntHashtable winansi     
static final  IntHashtable pdfEncoding     
static  HashMap extraEncodings     
static final  HashMap cmaps     
public static final  byte[][] CRLF_CID_NEWLINE    Assumes that '\\n' and '\\r\\n' are the newline sequences. It may not work for all CJK encodings. To be used with loadCmap(). 
Method from com.lowagie.text.pdf.PdfEncodings Summary:
addExtraEncoding,   breakLong,   clearCmap,   convertCmap,   convertCmap,   convertToBytes,   convertToBytes,   convertToString,   decodeSequence,   encodeSequence,   encodeStream,   isPdfDocEncoding,   loadCmap,   readCmap,   readCmap
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.PdfEncodings Detail:
 public static  void addExtraEncoding(String name,
    ExtraEncoding enc) 
    Adds an extra encoding.
 static  void breakLong(long n,
    int size,
    byte[] seqs) 
 public static  void clearCmap(String name) 
    Clears the CJK cmaps from the cache. If 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.
 public static String convertCmap(String name,
    byte[] seq) 
    Converts a 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/.
 public static String convertCmap(String name,
    byte[] seq,
    int start,
    int length) 
    Converts a 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/.
 public static final byte[] convertToBytes(String text,
    String encoding) 
    Converts a String to a byte array according to the font's encoding.
 public static final byte[] convertToBytes(char char1,
    String encoding) 
    Converts a String to a byte array according to the font's encoding.
 public static final 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) throws IOException 
 public static boolean isPdfDocEncoding(String text) 
    Checks is text only has PdfDocEncoding characters.
 public 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) throws IOException 
 static  void readCmap(String name,
    ArrayList planes) throws IOException