org.apache.fop.pdf

## Class PDFToUnicodeCMap

- java.lang.Object
- - org.apache.fop.pdf.PDFObject
  - - org.apache.fop.pdf.AbstractPDFStream
    - - org.apache.fop.pdf.PDFStream
      - - org.apache.fop.pdf.PDFCMap
        - - org.apache.fop.pdf.PDFToUnicodeCMap

- All Implemented Interfaces:
    PDFWritable

      public class PDFToUnicodeCMap
      extends PDFCMap

  Class representing ToUnicode CMaps. Here are some documentation resources:
  - PDF Reference, Second Edition, Section 5.6.4, for general information about CMaps in PDF Files.
  - PDF Reference, Second Edition, Section 5.9, for specific information about ToUnicodeCMaps in PDF Files.
  - Adobe Technical Note #5411, "ToUnicode Mapping File Tutorial".

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected char[]` | `unicodeCharMap` The array of Unicode characters ordered by character code (maps from character code to Unicode code point).

    - ### Fields inherited from class org.apache.fop.pdf.PDFCMap

      `base, ENC_83PV_RKSJ_H, ENC_90MS_RKSJ_H, ENC_90MS_RKSJ_V, ENC_90MSP_RKSJ_H, ENC_90MSP_RKSJ_V, ENC_90PV_RKSJ_H, ENC_ADD_RKSJ_H, ENC_ADD_RKSJ_V, ENC_B5PC_H, ENC_B5PC_V, ENC_CNS_EUC_H, ENC_CNS_EUC_V, ENC_ETEN_B5_H, ENC_ETEN_B5_V, ENC_ETENMS_B5_H, ENC_ETENMS_B5_V, ENC_EUC_H, ENC_EUC_V, ENC_EXT_RKSJ_H, ENC_EXT_RKSJ_V, ENC_GB_EUC_H, ENC_GB_EUC_V, ENC_GBK_EUC_H, ENC_GBK_EUC_V, ENC_GBK2K_H, ENC_GBK2K_V, ENC_GBKP_EUC_H, ENC_GBKP_EUC_V, ENC_GBPC_EUC_H, ENC_GBPC_EUC_V, ENC_H, ENC_HKSCS_B5_H, ENC_HKSCS_B5_V, ENC_IDENTITY_H, ENC_IDENTTITY_V, ENC_KSC_EUC_H, ENC_KSC_EUC_V, ENC_KSCMS_UHC_H, ENC_KSCMS_UHC_HW_H, ENC_KSCMS_UHC_HW_V, ENC_KSCMS_UHC_V, ENC_KSCPC_EUC_H, ENC_UNICNS_UCS2_H, ENC_UNICNS_UCS2_V, ENC_UNIGB_UCS2_H, ENC_UNIGB_UCS2_V, ENC_UNIJIS_UCS2_H, ENC_UNIJIS_UCS2_HW_H, ENC_UNIJIS_UCS2_HW_V, ENC_UNIJIS_UCS2_V, ENC_UNIKSC_UCS2_H, ENC_UNIKSC_UCS2_V, ENC_V, name, sysInfo, wMode, WMODE_HORIZONTAL, WMODE_VERTICAL`

    - ### Fields inherited from class org.apache.fop.pdf.PDFStream

      `data`

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

      `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PDFToUnicodeCMap(char[] unicodeCharMap, String name, PDFCIDSystemInfo sysInfo, boolean singleByte, EventBroadcaster eventBroadcaster)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected CMapBuilder` | `createCMapBuilder(Writer writer)` Creates the CMapBuilder that will build the CMap's content.

    - ### Methods inherited from class org.apache.fop.pdf.PDFCMap

      `output, setUseCMap, setUseCMap, setWMode`

    - ### Methods inherited from class org.apache.fop.pdf.PDFStream

      `add, add, getBufferOutputStream, getBufferWriter, getDataLength, getSizeHint, outputRawStreamData, setData, streamHashCode`

    - ### Methods inherited from class org.apache.fop.pdf.AbstractPDFStream

      `encodeAndWriteStream, encodeStream, get, getChildren, getDefaultFilterName, getDictionary, getFilterList, multipleFiltersAllowed, outputStreamData, populateStreamDict, prepareImplicitFilters, put, registerChildren, setDocument, setupFilterList`

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

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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### unicodeCharMap

          protected char[] unicodeCharMap

      The array of Unicode characters ordered by character code (maps from character code to Unicode code point).

  - ### Constructor Detail

    - #### PDFToUnicodeCMap

          public PDFToUnicodeCMap(char[] unicodeCharMap,
                                  String name,
                                  PDFCIDSystemInfo sysInfo,
                                  boolean singleByte,
                                  EventBroadcaster eventBroadcaster)

      Constructor.
      Parameters:
        `unicodeCharMap` - An array of Unicode characters ordered by character code (maps from character code to Unicode code point)
        `name` - One of the registered names found in Table 5.14 in PDF Reference, Second Edition.
        `sysInfo` - The attributes of the character collection of the CIDFont.
        `singleByte` - true for single-byte, false for double-byte
        `eventBroadcaster` - Event broadcaster. May be null.

  - ### Method Detail

    - #### createCMapBuilder

          protected CMapBuilder createCMapBuilder(Writer writer)

      Creates the CMapBuilder that will build the CMap's content.
      Overrides:
        `createCMapBuilder` in class `PDFCMap`
      Parameters:
        `writer` - a Writer to write the CMap's contents to
      Returns:
        the newly created CMapBuilder

Copyright © 2023 Apache Software Foundation. All rights reserved.