org.apache.fop.pdf

Class PDFEncoding

Implemented Interfaces:
PDFWritable

public class PDFEncoding
extends PDFDictionary

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.

Nested Class Summary

class
PDFEncoding.DifferencesBuilder
Builder class for constructing the Differences array.

Field Summary

static String
MAC_EXPERT_ENCODING
the name for the Mac Export encoding scheme
static String
MAC_ROMAN_ENCODING
the name for the Mac Roman encoding scheme
static String
PDF_DOC_ENCODING
the name for the PDF document encoding scheme
static String
STANDARD_ENCODING
the name for the standard encoding scheme
static String
WIN_ANSI_ENCODING
the name for the WinAnsi encoding scheme

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

entries, order

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

DATE_FORMAT, log

Constructor Summary

PDFEncoding(String basename)
Create a new /Encoding object.

Method Summary

PDFEncoding.DifferencesBuilder
createDifferencesBuilder()
Creates and returns a new DifferencesBuilder instance for constructing the Differences array.
static boolean
isPredefinedEncoding(String name)
Indicates whether a given encoding is one of the predefined encodings.
void
setDifferences(PDFArray differences)
Sets the Differences value.

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

get, output, put, put, writeDictionary

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

encode, encodeBinaryToHexString, encodeString, encodeText, formatDateTime, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setParent, toPDF, toPDFString

Field Details

MAC_EXPERT_ENCODING

public static final String MAC_EXPERT_ENCODING
the name for the Mac Export encoding scheme

MAC_ROMAN_ENCODING

public static final String MAC_ROMAN_ENCODING
the name for the Mac Roman encoding scheme

PDF_DOC_ENCODING

public static final String PDF_DOC_ENCODING
the name for the PDF document encoding scheme

STANDARD_ENCODING

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

WIN_ANSI_ENCODING

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

Constructor Details

PDFEncoding

public PDFEncoding(String basename)
Create a new /Encoding object.
Parameters:
basename - the name of the character encoding schema

Method Details

createDifferencesBuilder

public PDFEncoding.DifferencesBuilder createDifferencesBuilder()
Creates and returns a new DifferencesBuilder instance for constructing the Differences array.
Returns:
the DifferencesBuilder

isPredefinedEncoding

public static boolean isPredefinedEncoding(String name)
Indicates whether a given encoding is one of the predefined encodings.
Parameters:
name - the encoding name (ex. "StandardEncoding")
Returns:
true if it is a predefined encoding

setDifferences

public void setDifferences(PDFArray differences)
Sets the Differences value.
Parameters:
differences - the differences.

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