Package org.apache.fop.pdf
Class PDFCMap
java.lang.Object
org.apache.fop.pdf.PDFObject
org.apache.fop.pdf.AbstractPDFStream
org.apache.fop.pdf.PDFStream
org.apache.fop.pdf.PDFCMap
- All Implemented Interfaces:
PDFWritable
- Direct Known Subclasses:
PDFToUnicodeCMap
Class representing the CMap encodings.
CMaps are defined in the "Predefined CJK CMap names" table.
In section 5.6.4 of PDF reference 1.4.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object
base CMap (String or PDFStream)static final String
83pv-RKSJ-H Mac OS, JIS X 0208 character set with KanjiTalk6 extensions, Shift-JIS encoding, Script Manager code 1static final String
90ms-RKSJ-H Microsoft Code Page 932 (lfCharSet 0x80), JIS X 0208 character set with NEC and IBM extensionsstatic final String
90ms-RKSJ-V Vertical version of 90ms-RKSJ-Hstatic final String
90msp-RKSJ-H Same as 90ms-RKSJ-H, but replaces half-width Latin characters with proportional formsstatic final String
90msp-RKSJ-V Vertical version of 90msp-RKSJ-Hstatic final String
90pv-RKSJ-H Mac OS, JIS X 0208 character set with KanjiTalk7 extensions, Shift-JIS encoding, Script Manager code 1static final String
Add-RKSJ-H JIS X 0208 character set with Fujitsu FMR extensions, Shift-JIS encodingstatic final String
Add-RKSJ-V Vertical version of Add-RKSJ-Hstatic final String
B5pc-H Mac OS, Big Five character set, Big Five encoding, Script Manager code 2static final String
B5pc-V Vertical version of B5pc-Hstatic final String
CNS-EUC-H CNS 11643-1992 character set, EUC-TW encodingstatic final String
CNS-EUC-V Vertical version of CNS-EUC-Hstatic final String
ETen-B5-H Microsoft Code Page 950 (lfCharSet 0x88), Big Five character set with ETen extensionsstatic final String
ETen-B5-V Vertical version of ETen-B5-Hstatic final String
ETenms-B5-H Same as ETen-B5-H, but replaces half-width Latin characters with proportional formsstatic final String
ETenms-B5-V Vertical version of ETenms-B5-Hstatic final String
EUC-H JIS X 0208 character set, EUC-JP encodingstatic final String
EUC-V Vertical version of EUC-Hstatic final String
Ext-RKSJ-H JIS C 6226 (JIS78) character set with NEC extensions, Shift-JIS encodingstatic final String
Ext-RKSJ-V Vertical version of Ext-RKSJ-Hstatic final String
GB-EUC-H Microsoft Code Page 936 (lfCharSet 0x86), GB 2312-80 character set, EUC-CN encodingstatic final String
GB-EUC-V Vertical version of GB-EUC-Hstatic final String
GBK-EUC-H Microsoft Code Page 936 (lfCharSet 0x86), GBK character set, GBK encodingstatic final String
GBK-EUC-V Vertical version of GBK-EUC-Hstatic final String
GBK2K-H GB 18030-2000 character set, mixed 1-, 2-, and 4-byte encodingstatic final String
GBK2K-V Vertical version of GBK2K-Hstatic final String
GBKp-EUC-H Same as GBK-EUC-H, but replaces half-width Latin characters with proportional forms and maps character code 0x24 to a dollar sign ($) instead of a yuan symbolstatic final String
GBKp-EUC-V Vertical version of GBKp-EUC-Hstatic final String
GBpc-EUC-H Mac OS, GB 2312-80 character set, EUC-CN encoding, Script Manager code 19static final String
GBpc-EUC-V Vertical version of GBpc-EUC-Hstatic final String
H JIS X 0208 character set, ISO-2022-JP encodingstatic final String
HKscs-B5-H Hong Kong SCS, an extension to the Big Five character set and encodingstatic final String
HKscs-B5-V Vertical version of HKscs-B5-Hstatic final String
Identity-H The horizontal identity mapping for 2-byte CIDs; may be used with CIDFonts using any Registry, Ordering, and Supplement values.static final String
Identity-V Vertical version of Identity-H.static final String
KSC-EUC-H KS X 1001:1992 character set, EUC-KR encodingstatic final String
KSC-EUC-V Vertical version of KSC-EUC-Hstatic final String
KSCms-UHC-H Microsoft Code Page 949 (lfCharSet 0x81), KS X 1001:1992 character set plus 8822 additional hangul, Unified Hangul Code (UHC) encodingstatic final String
KSCms-UHC-HW-H Same as KSCms-UHC-H, but replaces proportional Latin characters with half-width formsstatic final String
KSCms-UHC-HW-V Vertical version of KSCms-UHC-HW-Hstatic final String
KSCms-UHC-V Vertical version of KSCms-UHC-Hstatic final String
KSCpc-EUC-H Mac OS, KS X 1001:1992 character set with Mac OS KH extensions, Script Manager Code 3static final String
UniCNS-UCS2-H Unicode (UCS-2) encoding for the Adobe-CNS1 character collectionstatic final String
UniCNS-UCS2-V Vertical version of UniCNS-UCS2-Hstatic final String
UniGB-UCS2-H Unicode (UCS-2) encoding for the Adobe-GB1 character collectionstatic final String
UniGB-UCS2-V Vertical version of UniGB-UCS2-Hstatic final String
UniJIS-UCS2-H Unicode (UCS-2) encoding for the Adobe-Japan1 character collectionstatic final String
UniJIS-UCS2-HW-H Same as UniJIS-UCS2-H, but replaces proportional Latin characters with half-width formsstatic final String
UniJIS-UCS2-HW-V Vertical version of UniJIS-UCS2-HW-Hstatic final String
UniJIS-UCS2-V Vertical version of UniJIS-UCS2-Hstatic final String
UniKS-UCS2-H Unicode (UCS-2) encoding for the Adobe-Korea1 character collectionstatic final String
UniKS-UCS2-V Vertical version of UniKS-UCS2-Hstatic final String
V Vertical version of Hprotected String
/CMapName attribute, one of the predefined constantsprotected PDFCIDSystemInfo
/CIDSystemInfo attributeprotected byte
font's writing directionstatic final byte
horizontal writing directionstatic final byte
vertical writing direction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CMapBuilder
createCMapBuilder
(Writer writer) Creates the CMapBuilder that will build the CMap's content.int
output
(OutputStream stream) Overload the base object method so we don't have to copy byte arrays around so much Write the PDF represention of this objectvoid
setUseCMap
(String base) set the base CMapvoid
setUseCMap
(PDFStream base) set the base CMapvoid
setWMode
(byte mode) set the writing directionMethods 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
-
Field Details
-
ENC_GB_EUC_H
GB-EUC-H Microsoft Code Page 936 (lfCharSet 0x86), GB 2312-80 character set, EUC-CN encoding- See Also:
-
ENC_GB_EUC_V
GB-EUC-V Vertical version of GB-EUC-H- See Also:
-
ENC_GBPC_EUC_H
GBpc-EUC-H Mac OS, GB 2312-80 character set, EUC-CN encoding, Script Manager code 19- See Also:
-
ENC_GBPC_EUC_V
GBpc-EUC-V Vertical version of GBpc-EUC-H- See Also:
-
ENC_GBK_EUC_H
GBK-EUC-H Microsoft Code Page 936 (lfCharSet 0x86), GBK character set, GBK encoding- See Also:
-
ENC_GBK_EUC_V
GBK-EUC-V Vertical version of GBK-EUC-H- See Also:
-
ENC_GBKP_EUC_H
GBKp-EUC-H Same as GBK-EUC-H, but replaces half-width Latin characters with proportional forms and maps character code 0x24 to a dollar sign ($) instead of a yuan symbol- See Also:
-
ENC_GBKP_EUC_V
GBKp-EUC-V Vertical version of GBKp-EUC-H- See Also:
-
ENC_GBK2K_H
GBK2K-H GB 18030-2000 character set, mixed 1-, 2-, and 4-byte encoding- See Also:
-
ENC_GBK2K_V
GBK2K-V Vertical version of GBK2K-H- See Also:
-
ENC_UNIGB_UCS2_H
UniGB-UCS2-H Unicode (UCS-2) encoding for the Adobe-GB1 character collection- See Also:
-
ENC_UNIGB_UCS2_V
UniGB-UCS2-V Vertical version of UniGB-UCS2-H- See Also:
-
ENC_B5PC_H
B5pc-H Mac OS, Big Five character set, Big Five encoding, Script Manager code 2- See Also:
-
ENC_B5PC_V
B5pc-V Vertical version of B5pc-H- See Also:
-
ENC_HKSCS_B5_H
HKscs-B5-H Hong Kong SCS, an extension to the Big Five character set and encoding- See Also:
-
ENC_HKSCS_B5_V
HKscs-B5-V Vertical version of HKscs-B5-H- See Also:
-
ENC_ETEN_B5_H
ETen-B5-H Microsoft Code Page 950 (lfCharSet 0x88), Big Five character set with ETen extensions- See Also:
-
ENC_ETEN_B5_V
ETen-B5-V Vertical version of ETen-B5-H- See Also:
-
ENC_ETENMS_B5_H
ETenms-B5-H Same as ETen-B5-H, but replaces half-width Latin characters with proportional forms- See Also:
-
ENC_ETENMS_B5_V
ETenms-B5-V Vertical version of ETenms-B5-H- See Also:
-
ENC_CNS_EUC_H
CNS-EUC-H CNS 11643-1992 character set, EUC-TW encoding- See Also:
-
ENC_CNS_EUC_V
CNS-EUC-V Vertical version of CNS-EUC-H- See Also:
-
ENC_UNICNS_UCS2_H
UniCNS-UCS2-H Unicode (UCS-2) encoding for the Adobe-CNS1 character collection- See Also:
-
ENC_UNICNS_UCS2_V
UniCNS-UCS2-V Vertical version of UniCNS-UCS2-H- See Also:
-
ENC_83PV_RKSJ_H
83pv-RKSJ-H Mac OS, JIS X 0208 character set with KanjiTalk6 extensions, Shift-JIS encoding, Script Manager code 1- See Also:
-
ENC_90MS_RKSJ_H
90ms-RKSJ-H Microsoft Code Page 932 (lfCharSet 0x80), JIS X 0208 character set with NEC and IBM extensions- See Also:
-
ENC_90MS_RKSJ_V
90ms-RKSJ-V Vertical version of 90ms-RKSJ-H- See Also:
-
ENC_90MSP_RKSJ_H
90msp-RKSJ-H Same as 90ms-RKSJ-H, but replaces half-width Latin characters with proportional forms- See Also:
-
ENC_90MSP_RKSJ_V
90msp-RKSJ-V Vertical version of 90msp-RKSJ-H- See Also:
-
ENC_90PV_RKSJ_H
90pv-RKSJ-H Mac OS, JIS X 0208 character set with KanjiTalk7 extensions, Shift-JIS encoding, Script Manager code 1- See Also:
-
ENC_ADD_RKSJ_H
Add-RKSJ-H JIS X 0208 character set with Fujitsu FMR extensions, Shift-JIS encoding- See Also:
-
ENC_ADD_RKSJ_V
Add-RKSJ-V Vertical version of Add-RKSJ-H- See Also:
-
ENC_EUC_H
EUC-H JIS X 0208 character set, EUC-JP encoding- See Also:
-
ENC_EUC_V
EUC-V Vertical version of EUC-H- See Also:
-
ENC_EXT_RKSJ_H
Ext-RKSJ-H JIS C 6226 (JIS78) character set with NEC extensions, Shift-JIS encoding- See Also:
-
ENC_EXT_RKSJ_V
Ext-RKSJ-V Vertical version of Ext-RKSJ-H- See Also:
-
ENC_H
H JIS X 0208 character set, ISO-2022-JP encoding- See Also:
-
ENC_V
V Vertical version of H- See Also:
-
ENC_UNIJIS_UCS2_H
UniJIS-UCS2-H Unicode (UCS-2) encoding for the Adobe-Japan1 character collection- See Also:
-
ENC_UNIJIS_UCS2_V
UniJIS-UCS2-V Vertical version of UniJIS-UCS2-H- See Also:
-
ENC_UNIJIS_UCS2_HW_H
UniJIS-UCS2-HW-H Same as UniJIS-UCS2-H, but replaces proportional Latin characters with half-width forms- See Also:
-
ENC_UNIJIS_UCS2_HW_V
UniJIS-UCS2-HW-V Vertical version of UniJIS-UCS2-HW-H- See Also:
-
ENC_KSC_EUC_H
KSC-EUC-H KS X 1001:1992 character set, EUC-KR encoding- See Also:
-
ENC_KSC_EUC_V
KSC-EUC-V Vertical version of KSC-EUC-H- See Also:
-
ENC_KSCMS_UHC_H
KSCms-UHC-H Microsoft Code Page 949 (lfCharSet 0x81), KS X 1001:1992 character set plus 8822 additional hangul, Unified Hangul Code (UHC) encoding- See Also:
-
ENC_KSCMS_UHC_V
KSCms-UHC-V Vertical version of KSCms-UHC-H- See Also:
-
ENC_KSCMS_UHC_HW_H
KSCms-UHC-HW-H Same as KSCms-UHC-H, but replaces proportional Latin characters with half-width forms- See Also:
-
ENC_KSCMS_UHC_HW_V
KSCms-UHC-HW-V Vertical version of KSCms-UHC-HW-H- See Also:
-
ENC_KSCPC_EUC_H
KSCpc-EUC-H Mac OS, KS X 1001:1992 character set with Mac OS KH extensions, Script Manager Code 3- See Also:
-
ENC_UNIKSC_UCS2_H
UniKS-UCS2-H Unicode (UCS-2) encoding for the Adobe-Korea1 character collection- See Also:
-
ENC_UNIKSC_UCS2_V
UniKS-UCS2-V Vertical version of UniKS-UCS2-H- See Also:
-
ENC_IDENTITY_H
Identity-H The horizontal identity mapping for 2-byte CIDs; may be used with CIDFonts using any Registry, Ordering, and Supplement values. It maps 2-byte character codes ranging from 0 to 65,535 to the same 2-byte CID value, interpreted high-order byte first.- See Also:
-
ENC_IDENTTITY_V
Identity-V Vertical version of Identity-H. The mapping is the same as for Identity-H.- See Also:
-
name
/CMapName attribute, one of the predefined constants -
sysInfo
/CIDSystemInfo attribute -
WMODE_HORIZONTAL
public static final byte WMODE_HORIZONTALhorizontal writing direction- See Also:
-
WMODE_VERTICAL
public static final byte WMODE_VERTICALvertical writing direction- See Also:
-
wMode
protected byte wModefont's writing direction -
base
base CMap (String or PDFStream)
-
-
Constructor Details
-
PDFCMap
create the /CMap object- Parameters:
name
- one the registered names (see Table 7.20 on p 215)sysInfo
- the attributes of the character collection of the CIDFont
-
-
Method Details
-
setWMode
public void setWMode(byte mode) set the writing direction- Parameters:
mode
- is eitherWMODE_HORIZONTAL
orWMODE_VERTICAL
-
setUseCMap
set the base CMap- Parameters:
base
- the name of the base CMap
-
setUseCMap
set the base CMap- Parameters:
base
- the stream to be used as base CMap
-
createCMapBuilder
Creates the CMapBuilder that will build the CMap's content.- Parameters:
writer
- a Writer to write the CMap's contents to- Returns:
- the newly created CMapBuilder
-
output
Overload the base object method so we don't have to copy byte arrays around so much Write the PDF represention of this object- Overrides:
output
in classPDFStream
- Parameters:
stream
- the stream to write the PDF to- Returns:
- the number of bytes written
- Throws:
IOException
- if there is an error writing to the stream
-