PoDoFo  1.0.0-dev
PdfPredefinedEncoding.h
1 
7 #ifndef PDF_SIMPLE_ENCODING_H
8 #define PDF_SIMPLE_ENCODING_H
9 
10 #include "PdfEncodingMap.h"
11 
12 namespace PoDoFo
13 {
26  class PODOFO_API PdfPredefinedEncoding : public PdfBuiltInEncoding
27  {
28  friend class PdfWinAnsiEncoding;
29  friend class PdfMacRomanEncoding;
30  friend class PdfMacExpertEncoding;
31 
32  private:
33  PdfPredefinedEncoding(const PdfName& name);
34 
35  PdfPredefinedEncodingType GetPredefinedEncodingType() const override;
36 
37  protected:
38  void getExportObject(PdfIndirectObjectList& objects, PdfName& name, PdfObject*& obj) const override;
39  };
40 
52  class PODOFO_API PdfWinAnsiEncoding final : public PdfPredefinedEncoding
53  {
54  friend class PdfEncodingMapFactory;
55  friend class PdfWin1250Encoding;
56  friend class PdfIso88592Encoding;
57 
58  private:
60 
61  protected:
62  const char32_t* GetToUnicodeTable() const override;
63 
64  private:
65  static const char32_t s_cEncoding[256]; // conversion table from WinAnsiEncoding to UTF16
66 
67  };
68 
72  class PODOFO_API PdfMacRomanEncoding final : public PdfPredefinedEncoding
73  {
74  friend class PdfEncodingMapFactory;
75 
76  private:
78 
79  protected:
80  const char32_t* GetToUnicodeTable() const override;
81 
82  private:
83  static const char32_t s_cEncoding[256]; // conversion table from MacRomanEncoding to UTF16
84  };
85 
89  class PODOFO_API PdfMacExpertEncoding final : public PdfPredefinedEncoding
90  {
91  friend class PdfEncodingMapFactory;
92 
93  private:
95 
96  protected:
97  const char32_t* GetToUnicodeTable() const override;
98 
99  private:
100  static const char32_t s_cEncoding[256]; // conversion table from MacExpertEncoding to UTF16
101  };
102 
106  class PODOFO_API PdfStandardEncoding final : public PdfBuiltInEncoding
107  {
108  friend class PdfEncodingMapFactory;
109 
110  private:
112 
113  protected:
114  const char32_t* GetToUnicodeTable() const override;
115 
116  private:
117  static const char32_t s_cEncoding[256]; // conversion table from StandardEncoding to UTF16
118  };
119 
123  class PODOFO_API PdfSymbolEncoding final : public PdfBuiltInEncoding
124  {
125  friend class PdfEncodingMapFactory;
126 
127  private:
129 
130  protected:
131  const char32_t* GetToUnicodeTable() const override;
132 
133  private:
134  static const char32_t s_cEncoding[256]; // conversion table from SymbolEncoding to UTF16
135  };
136 
140  class PODOFO_API PdfZapfDingbatsEncoding final : public PdfBuiltInEncoding
141  {
142  friend class PdfEncodingMapFactory;
143 
144  private:
146 
147  protected:
148  const char32_t* GetToUnicodeTable() const override;
149 
150  private:
151  static const char32_t s_cEncoding[256]; // conversion table from ZapfDingbatsEncoding to UTF16
152  };
153 }
154 
155 #endif // PDF_SIMPLE_ENCODING_H
A common base class for built-in encodings which are known by name.
Definition: PdfEncodingMap.h:270
This factory creates a PdfEncodingMap.
Definition: PdfEncodingMapFactory.h:18
A list of PdfObjects that constitutes the indirect object list of the document The PdfParser will rea...
Definition: PdfIndirectObjectList.h:30
MacExpertEncoding.
Definition: PdfPredefinedEncoding.h:90
MacRomanEncoding.
Definition: PdfPredefinedEncoding.h:73
This class represents a PdfName.
Definition: PdfName.h:24
This class represents a PDF indirect Object in memory.
Definition: PdfObject.h:35
A common base class for Pdf defined predefined encodings which are known by name.
Definition: PdfPredefinedEncoding.h:27
StandardEncoding.
Definition: PdfPredefinedEncoding.h:107
Symbol Encoding.
Definition: PdfPredefinedEncoding.h:124
The WinAnsiEncoding is the default encoding in PoDoFo for contents on PDF pages.
Definition: PdfPredefinedEncoding.h:53
ZapfDingbats encoding.
Definition: PdfPredefinedEncoding.h:141
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition: basetypes.h:16
PdfPredefinedEncodingType
Definition: PdfDeclarations.h:120