Package org.apache.fop.pdf
Class PDFEncoding
java.lang.Object
org.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFDictionary
org.apache.fop.pdf.PDFEncoding
- All Implemented Interfaces:
PDFWritable
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
Nested ClassesModifier and TypeClassDescriptionclassBuilder class for constructing the Differences array. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe name for the Mac Export encoding schemestatic final Stringthe name for the Mac Roman encoding schemestatic final Stringthe name for the PDF document encoding schemeprivate static final Setthe set of predefined encodings that can be assumed present in a PDF viewerstatic final Stringthe name for the standard encoding schemestatic final Stringthe name for the WinAnsi encoding schemeFields inherited from class org.apache.fop.pdf.PDFDictionary
entries, order -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates and returns a new DifferencesBuilder instance for constructing the Differences array.(package private) static ObjectcreatePDFEncoding(SingleByteEncoding encoding, String fontName) Creates a PDFEncoding instance from a CodePointMapping instance.(package private) static booleanhasStandardEncoding(String encodingName) Indicates whether the given encoding type is that of standard encodingstatic booleanisPredefinedEncoding(String name) Indicates whether a given encoding is one of the predefined encodings.voidsetDifferences(PDFArray differences) Sets the Differences value.Methods inherited from class org.apache.fop.pdf.PDFDictionary
containsKey, get, getChildren, getChildren, keySet, output, put, put, remove, writeDictionaryMethods inherited from class org.apache.fop.pdf.PDFObject
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDF, toPDFString
-
Field Details
-
STANDARD_ENCODING
the name for the standard encoding scheme- See Also:
-
MAC_ROMAN_ENCODING
the name for the Mac Roman encoding scheme- See Also:
-
MAC_EXPERT_ENCODING
the name for the Mac Export encoding scheme- See Also:
-
WIN_ANSI_ENCODING
the name for the WinAnsi encoding scheme- See Also:
-
PDF_DOC_ENCODING
the name for the PDF document encoding scheme- See Also:
-
PREDEFINED_ENCODINGS
the set of predefined encodings that can be assumed present in a PDF viewer
-
-
Constructor Details
-
PDFEncoding
Create a new /Encoding object.- Parameters:
basename- the name of the character encoding schema
-
-
Method Details
-
createPDFEncoding
Creates a PDFEncoding instance from a CodePointMapping instance.- Parameters:
encoding- the code point mapping (encoding)fontName- ...- Returns:
- the PDF Encoding dictionary (or a String with the predefined encoding)
-
isPredefinedEncoding
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
-
hasStandardEncoding
Indicates whether the given encoding type is that of standard encoding- Parameters:
name- The encoding name- Returns:
- Returns true if it is of type standard encoding
-
createDifferencesBuilder
Creates and returns a new DifferencesBuilder instance for constructing the Differences array.- Returns:
- the DifferencesBuilder
-
setDifferences
Sets the Differences value.- Parameters:
differences- the differences.
-