#include <PdfIdentityEncoding.h>
Public Member Functions | |
PdfIdentityEncoding (int nFirstChar=0, int nLastChar=0xffff, bool bAutoDelete=true, PdfObject *pToUnicode=NULL) | |
virtual void | AddToDictionary (PdfDictionary &rDictionary) const |
virtual PdfString | ConvertToUnicode (const PdfString &rEncodedString, const PdfFont *pFont) const |
virtual PdfRefCountedBuffer | ConvertToEncoding (const PdfString &rString, const PdfFont *pFont) const |
virtual bool | IsAutoDelete () const |
virtual bool | IsSingleByteEncoding () const |
virtual pdf_utf16be | GetCharCode (int nIndex) const |
Protected Member Functions | |
virtual const PdfName & | GetID () const |
PoDoFo::PdfIdentityEncoding::PdfIdentityEncoding | ( | int | nFirstChar = 0 , |
|
int | nLastChar = 0xffff , |
|||
bool | bAutoDelete = true , |
|||
PdfObject * | pToUnicode = NULL | |||
) |
Create a new PdfIdentityEncoding.
nFirstChar | the first supported unicode character code (at least 0) | |
nLastChar | the last supported unicode character code, must be larger than nFirstChar (max value is 0xffff) | |
bAutoDelete | if true the encoding is deleted by its owning font |
void PoDoFo::PdfIdentityEncoding::AddToDictionary | ( | PdfDictionary & | rDictionary | ) | const [virtual] |
Add this encoding object to a dictionary usually be adding an /Encoding key in font dictionaries.
rDictionary | add the encoding to this dictionary |
Implements PoDoFo::PdfEncoding.
PdfString PoDoFo::PdfIdentityEncoding::ConvertToUnicode | ( | const PdfString & | rEncodedString, | |
const PdfFont * | pFont | |||
) | const [virtual] |
Convert a string that is encoded with this encoding to an 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 |
Implements PoDoFo::PdfEncoding.
PdfRefCountedBuffer PoDoFo::PdfIdentityEncoding::ConvertToEncoding | ( | const PdfString & | rString, | |
const PdfFont * | pFont | |||
) | const [virtual] |
Convert a unicode PdfString to a string encoded with this encoding.
rString | an unicode PdfString. | |
pFont | the font for which this string is converted |
Implements PoDoFo::PdfEncoding.
bool PoDoFo::PdfIdentityEncoding::IsAutoDelete | ( | ) | const [inline, virtual] |
PdfIdentityEncoding is usually delete along with the font.
Implements PoDoFo::PdfEncoding.
bool PoDoFo::PdfIdentityEncoding::IsSingleByteEncoding | ( | ) | const [inline, virtual] |
Implements PoDoFo::PdfEncoding.
pdf_utf16be PoDoFo::PdfIdentityEncoding::GetCharCode | ( | int | nIndex | ) | const [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 |
Implements PoDoFo::PdfEncoding.
const PdfName & PoDoFo::PdfIdentityEncoding::GetID | ( | ) | const [inline, protected, virtual] |
Get a unique ID for this encoding which can used for comparisons!
Implements PoDoFo::PdfEncoding.