org.apache.fop.pdf
Class PDFEncoding
java.lang.Object
|
+--org.apache.fop.pdf.PDFObject
|
+--org.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 in section 5.5.5 of the PDF 1.4 spec.
Field Summary |
protected java.lang.String |
basename
the name for the base encoding. |
protected java.util.Map |
differences
the differences from the base encoding |
static java.lang.String |
MAC_EXPERT_ENCODING
the name for the standard encoding scheme |
static java.lang.String |
MAC_ROMAN_ENCODING
the name for the standard encoding scheme |
static java.lang.String |
WIN_ANSI_ENCODING
the name for the standard encoding scheme |
Constructor Summary |
PDFEncoding(java.lang.String basename)
create the /Encoding object |
Method Summary |
void |
addDifferences(int code,
java.util.List sequence)
add differences to the encoding |
java.lang.String |
toPDFString()
This method returns a String representation of the PDF object. |
Methods inherited from class org.apache.fop.pdf.PDFObject |
encode, encodeString, encodeText, formatDateTime, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, hasObjectNumber, output, referencePDF, setDocument, setObjectNumber, toPDF |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAC_ROMAN_ENCODING
public static final java.lang.String MAC_ROMAN_ENCODING
- the name for the standard encoding scheme
MAC_EXPERT_ENCODING
public static final java.lang.String MAC_EXPERT_ENCODING
- the name for the standard encoding scheme
WIN_ANSI_ENCODING
public static final java.lang.String WIN_ANSI_ENCODING
- the name for the standard encoding scheme
basename
protected java.lang.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 java.util.Map differences
- the differences from the base encoding
PDFEncoding
public PDFEncoding(java.lang.String basename)
- create the /Encoding object
- Parameters:
basename
- the name of the character encoding schema
addDifferences
public void addDifferences(int code,
java.util.List sequence)
- add differences to the encoding
- Parameters:
code
- the first index of the sequence to be changedsequence
- the sequence of glyph names (as String)
toPDFString
public java.lang.String toPDFString()
- Description copied from class:
PDFObject
- This method returns a String representation of the PDF object. The result
is normally converted/encoded to a byte array by toPDF(). Only use
this method to implement the serialization if the object can be fully
represented as text. If the PDF representation of the object contains
binary content use toPDF() or output(OutputStream) instead.
- Overrides:
toPDFString
in class PDFObject
- See Also:
PDFObject.toPDFString()
Copyright 1999-2006 The Apache Software Foundation. All Rights Reserved.