Class PDFEncoding

  • All 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.
    • Field Detail

      • STANDARD_ENCODING

        public static final java.lang.String STANDARD_ENCODING
        the name for the standard encoding scheme
        See Also:
        Constant Field Values
      • MAC_ROMAN_ENCODING

        public static final java.lang.String MAC_ROMAN_ENCODING
        the name for the Mac Roman encoding scheme
        See Also:
        Constant Field Values
      • MAC_EXPERT_ENCODING

        public static final java.lang.String MAC_EXPERT_ENCODING
        the name for the Mac Export encoding scheme
        See Also:
        Constant Field Values
      • WIN_ANSI_ENCODING

        public static final java.lang.String WIN_ANSI_ENCODING
        the name for the WinAnsi encoding scheme
        See Also:
        Constant Field Values
      • PDF_DOC_ENCODING

        public static final java.lang.String PDF_DOC_ENCODING
        the name for the PDF document encoding scheme
        See Also:
        Constant Field Values
    • Constructor Detail

      • PDFEncoding

        public PDFEncoding​(java.lang.String basename)
        Create a new /Encoding object.
        Parameters:
        basename - the name of the character encoding schema
    • Method Detail

      • isPredefinedEncoding

        public static boolean isPredefinedEncoding​(java.lang.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
      • createDifferencesBuilder

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

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