org.apache.fop.pdf

Class PDFEncoding

Implemented Interfaces:
PDFWritable

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

static String
MAC_EXPERT_ENCODING
the name for the standard encoding scheme
static String
MAC_ROMAN_ENCODING
the name for the standard encoding scheme
static String
WIN_ANSI_ENCODING
the name for the standard encoding scheme
protected String
basename
the name for the base encoding.
protected Map
differences
the differences from the base encoding

Fields inherited from class org.apache.fop.pdf.PDFObject

DATE_FORMAT, log

Constructor Summary

PDFEncoding(String basename)
create the /Encoding object

Method Summary

void
addDifferences(int code, List sequence)
add differences to the encoding
String
toPDFString()

Methods inherited from class org.apache.fop.pdf.PDFObject

encode, encodeString, encodeText, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, hasObjectNumber, makeReference, output, referencePDF, setDocument, setObjectNumber, toInlinePDFString, toPDF, toPDFString

Field Details

MAC_EXPERT_ENCODING

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

MAC_ROMAN_ENCODING

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

WIN_ANSI_ENCODING

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

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 Map differences
the differences from the base encoding

Constructor Details

PDFEncoding

public PDFEncoding(String basename)
create the /Encoding object
Parameters:
basename - the name of the character encoding schema

Method Details

addDifferences

public void addDifferences(int code,
                           List 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)

toPDFString

public String toPDFString()
Overrides:
toPDFString in interface PDFObject

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.