PoDoFo 0.9.6
|
#include <PdfEncoding.h>
Public Member Functions | |
bool | operator== (const PdfEncoding &rhs) const |
bool | operator< (const PdfEncoding &rhs) const |
virtual void | AddToDictionary (PdfDictionary &rDictionary) const =0 |
virtual PdfString | ConvertToUnicode (const PdfString &rEncodedString, const PdfFont *pFont) const |
virtual PdfRefCountedBuffer | ConvertToEncoding (const PdfString &rString, const PdfFont *pFont) const |
int | GetFirstChar () const |
int | GetLastChar () const |
const_iterator | begin () const |
const_iterator | end () const |
virtual pdf_utf16be | GetCharCode (int nIndex) const =0 |
Protected Member Functions | |
PdfEncoding (int nFirstChar, int nLastChar, PdfObject *=NULL) | |
virtual const PdfName & | GetID () const =0 |
Protected Attributes | |
bool | m_bToUnicodeIsLoaded |
If true, ToUnicode has been parsed. | |
A PdfEncoding is in PdfFont to transform a text string into a representation so that it can be displayed in a PDF file.
PdfEncoding can also be used to convert strings from a PDF file back into a PdfString.
|
protected |
Create a new PdfEncoding.
nFirstChar | the first supported character code (either a byte value in the current encoding or a Unicode value) |
nLastChar | the last supported character code, must be larger than nFirstChar (either a byte value in the current encoding or a Unicode value) |
|
pure virtual |
Add this encoding object to a dictionary usually be adding an /Encoding key in font dictionaries.
rDictionary | add the encoding to this dictionary |
Implemented in PoDoFo::PdfSimpleEncoding, PoDoFo::PdfWinAnsiEncoding, PoDoFo::PdfDifferenceEncoding, and PoDoFo::PdfIdentityEncoding.
|
inline |
Iterate over all Unicode character points in this encoding, beginning with the first.
|
virtual |
Convert a Unicode PdfString to a string encoded with this encoding.
rString | a Unicode PdfString. |
pFont | the font for which this string is converted |
Reimplemented in PoDoFo::PdfSimpleEncoding, PoDoFo::PdfDifferenceEncoding, and PoDoFo::PdfIdentityEncoding.
|
virtual |
Convert a string that is encoded with this encoding to a Unicode PdfString.
rEncodedString | a string encoded by this encoding. Usually this string was read from a content stream. |
pFont | the font for which this string is converted |
Reimplemented in PoDoFo::PdfSimpleEncoding, PoDoFo::PdfDifferenceEncoding, and PoDoFo::PdfIdentityEncoding.
|
inline |
Iterate over all Unicode character points in this encoding, beginning with the first.
|
pure virtual |
Get the Unicode character code for this encoding at the position nIndex. nIndex is a position between GetFirstChar() and GetLastChar()
nIndex | character code at position index |
Will throw an exception if nIndex is out of range.
Implemented in PoDoFo::PdfSimpleEncoding, PoDoFo::PdfDifferenceEncoding, and PoDoFo::PdfIdentityEncoding.
|
inline |
|
protectedpure virtual |
Get a unique ID for this encoding which can used for comparisons!
Implemented in PoDoFo::PdfSimpleEncoding, PoDoFo::PdfWin1250Encoding, PoDoFo::PdfIso88592Encoding, PoDoFo::PdfDifferenceEncoding, and PoDoFo::PdfIdentityEncoding.
|
inline |
|
inline |
Comparison operator.
rhs | the PdfEncoding to which this encoding should be compared |
|
inline |
Comparison operator.
rhs | the PdfEncoding to which this encoding should be compared |