org.apache.fop.pdf
Class PDFEncoding

java.lang.Object
  extended byorg.apache.fop.pdf.PDFObject
      extended byorg.apache.fop.pdf.PDFEncoding

public class PDFEncoding
extends PDFObject

class representing an /Encoding object. A small object expressing the base encoding name and the differences from the base encoding. The three base encodings are given by their name. Encodings are specified on page 213 and onwards of the PDF 1.3 spec.


Field Summary
protected  String basename
          the name for the base encoding.
protected  HashMap differences
          the differences from the base encoding
static String MacExpertEncoding
          the name for the standard encoding scheme
static String MacRomanEncoding
          the name for the standard encoding scheme
static String WinAnsiEncoding
          the name for the standard encoding scheme
 
Fields inherited from class org.apache.fop.pdf.PDFObject
generation, number
 
Constructor Summary
PDFEncoding(int number, String basename)
          create the /Encoding object
 
Method Summary
 void addDifferences(int code, ArrayList sequence)
          add differences to the encoding
 byte[] toPDF()
          produce the PDF representation for the object
 
Methods inherited from class org.apache.fop.pdf.PDFObject
getNumber, output, referencePDF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MacRomanEncoding

public static final String MacRomanEncoding
the name for the standard encoding scheme

See Also:
Constant Field Values

MacExpertEncoding

public static final String MacExpertEncoding
the name for the standard encoding scheme

See Also:
Constant Field Values

WinAnsiEncoding

public static final String WinAnsiEncoding
the name for the standard encoding scheme

See Also:
Constant Field Values

basename

protected String basename
the name for the base encoding. One of the three base encoding scheme names or the default font's base encoding if null.


differences

protected HashMap differences
the differences from the base encoding

Constructor Detail

PDFEncoding

public PDFEncoding(int number,
                   String basename)
create the /Encoding object

Parameters:
number - the object's number
basename - the name of the character encoding schema
Method Detail

addDifferences

public void addDifferences(int code,
                           ArrayList sequence)
add differences to the encoding

Parameters:
code - the first index of the sequence to be changed
sequence - the sequence of glyph names (as String)

toPDF

public byte[] toPDF()
produce the PDF representation for the object

Returns:
the PDF


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.