java.lang.Object
com.lowagie.text.pdf.PdfEncodings
Deprecated.
Supports fast encodings for winansi and PDFDocEncoding. Supports conversions from CJK encodings to CID. Supports
custom encodings.
- Author:
- Paulo Soares (psoares@consiste.pt)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intDeprecated.protected static final intDeprecated.protected static final intDeprecated.static final byte[][]Deprecated.Assumes that '\\n' and '\\r\\n' are the newline sequences. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddExtraEncoding(String name, ExtraEncoding enc) Deprecated.Adds an extra encoding.static voidDeprecated.Clears the CJK cmaps from the cache.static StringconvertCmap(String name, byte[] seq) Deprecated.Converts abytearray encoded asnameto a CID string.static StringconvertCmap(String name, byte[] seq, int start, int length) Deprecated.Converts abytearray encoded asnameto a CID string.static final byte[]convertToBytes(char char1, String encoding) Deprecated.Converts aStringto abytearray according to the font's encoding.static final byte[]convertToBytes(String text, String encoding) Deprecated.Converts aStringto abytearray according to the font's encoding.static final StringconvertToString(byte[] bytes, String encoding) Deprecated.Converts abytearray to aStringaccording to the some encoding.static booleanisPdfDocEncoding(String text) Deprecated.Checks istextonly has PdfDocEncoding characters.static voidDeprecated.Loads a CJK cmap to the cache with the option of associating sequences to the newline.
-
Field Details
-
CRLF_CID_NEWLINE
public static final byte[][] CRLF_CID_NEWLINEDeprecated.Assumes that '\\n' and '\\r\\n' are the newline sequences. It may not work for all CJK encodings. To be used with loadCmap(). -
CIDNONE
protected static final int CIDNONEDeprecated.- See Also:
-
CIDRANGE
protected static final int CIDRANGEDeprecated.- See Also:
-
CIDCHAR
protected static final int CIDCHARDeprecated.- See Also:
-
-
Constructor Details
-
PdfEncodings
public PdfEncodings()Deprecated.
-
-
Method Details
-
convertToBytes
Deprecated.Converts aStringto abytearray according to the font's encoding.- Parameters:
text- theStringto be convertedencoding- the encoding- Returns:
- an array of
byterepresenting the conversion according to the font's encoding
-
convertToBytes
Deprecated.Converts aStringto abytearray according to the font's encoding.- Parameters:
char1- thecharto be convertedencoding- the encoding- Returns:
- an array of
byterepresenting the conversion according to the font's encoding
-
convertToString
Deprecated.Converts abytearray to aStringaccording to the some encoding.- Parameters:
bytes- the bytes to convertencoding- the encoding- Returns:
- the converted
String
-
isPdfDocEncoding
Deprecated.Checks istextonly has PdfDocEncoding characters.- Parameters:
text- theStringto test- Returns:
trueif only PdfDocEncoding characters are present
-
clearCmap
Deprecated.Clears the CJK cmaps from the cache. Ifnameis 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
-
loadCmap
Deprecated.Loads a CJK cmap to the cache with the option of associating sequences to the newline.- Parameters:
name- the CJK cmap namenewline- the sequences to be replaced by a newline in the resulting CID. SeeCRLF_CID_NEWLINE
-
convertCmap
Deprecated.Converts abytearray encoded asnameto 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 nameseq- thebytearray to be decoded- Returns:
- the CID string
-
convertCmap
Deprecated.Converts abytearray encoded asnameto 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 nameseq- thebytearray to be decodedstart- the start offset in the datalength- the number of bytes to convert- Returns:
- the CID string
-
addExtraEncoding
Deprecated.Adds an extra encoding.- Parameters:
name- the name of the encoding. The encoding recognition is case insensitiveenc- the conversion class
-