#include <PdfName.h>
This class represents a PdfName. Whenever a key is required you have to use a PdfName object.
PdfName are required as keys in PdfObject and PdfVariant objects.
PdfName may have a maximum length of 127 characters.
- See also
- PdfObject
-
PdfVariant
◆ PdfName() [1/5]
PoDoFo::PdfName::PdfName |
( |
| ) |
|
|
inline |
Constructor to create NULL strings. use PdfName::KeyNull instead of this constructor
◆ PdfName() [2/5]
PoDoFo::PdfName::PdfName |
( |
const std::string & |
sName | ) |
|
|
inline |
Create a new PdfName object.
- Parameters
-
sName | the unescaped value of this name. Please specify the name without the leading '/'. |
◆ PdfName() [3/5]
PoDoFo::PdfName::PdfName |
( |
const char * |
pszName | ) |
|
|
inline |
Create a new PdfName object.
- Parameters
-
pszName | the unescaped value of this name. Please specify the name without the leading '/'. Has to be a zero terminated string. |
◆ PdfName() [4/5]
PoDoFo::PdfName::PdfName |
( |
const char * |
pszName, |
|
|
long |
lLen |
|
) |
| |
|
inline |
Create a new PdfName object.
- Parameters
-
pszName | the unescaped value of this name. Please specify the name without the leading '/'. |
lLen | length of the name |
◆ PdfName() [5/5]
PoDoFo::PdfName::PdfName |
( |
const PdfName & |
rhs | ) |
|
|
inline |
Create a copy of an existing PdfName object.
- Parameters
-
◆ FromEscaped() [1/2]
PdfName PoDoFo::PdfName::FromEscaped |
( |
const char * |
pszName, |
|
|
pdf_long |
ilength = 0 |
|
) |
| |
|
static |
Create a new PdfName object from a string containing an escaped name string without the leading / .
- Parameters
-
pszName | A string containing the escaped name |
ilength | length of the escaped string data. If a length of 0 is passed, the string data is expected to be a zero terminated string. |
- Returns
- A new PdfName
◆ FromEscaped() [2/2]
PdfName PoDoFo::PdfName::FromEscaped |
( |
const std::string & |
sName | ) |
|
|
static |
Create a new PdfName object from a string containing an escaped name string without the leading / .
- Parameters
-
sName | A string containing the escaped name |
- Returns
- A new PdfName
◆ GetEscapedName()
std::string PoDoFo::PdfName::GetEscapedName |
( |
| ) |
const |
- Returns
- an escaped representation of this name without the leading / .
There is no corresponding GetEscapedLength(), since generating the return value is somewhat expensive.
◆ GetLength()
size_t PoDoFo::PdfName::GetLength |
( |
| ) |
const |
|
inline |
- Returns
- the unescaped length of this name object
◆ GetName()
const std::string & PoDoFo::PdfName::GetName |
( |
| ) |
const |
|
inline |
- Returns
- the unescaped value of this name object without the leading slash
◆ operator!=() [1/2]
bool PoDoFo::PdfName::operator!= |
( |
const char * |
rhs | ) |
const |
|
inline |
overloaded operator for convenience
The string argument is treated as an unescaped name.
- Parameters
-
- Returns
- true if this objects name is not equal to pszName
◆ operator!=() [2/2]
bool PoDoFo::PdfName::operator!= |
( |
const PdfName & |
rhs | ) |
const |
|
inline |
compare two PdfName objects.
- Returns
- true if both PdfNames have different values.
◆ operator<()
bool PoDoFo::PdfName::operator< |
( |
const PdfName & |
rhs | ) |
const |
|
inline |
compare two PdfName objects. Used for sorting in lists
- Returns
- true if this object is smaller than rhs
◆ operator=()
Assign another name to this object
- Parameters
-
◆ operator==() [1/3]
bool PoDoFo::PdfName::operator== |
( |
const char * |
rhs | ) |
const |
overloaded operator for convenience
The string argument is treated as an unescaped name.
- Parameters
-
- Returns
- true if this objects name is equal to pszName
◆ operator==() [2/3]
bool PoDoFo::PdfName::operator== |
( |
const PdfName & |
rhs | ) |
const |
|
inline |
compare to PdfName objects.
- Returns
- true if both PdfNames have the same value.
◆ operator==() [3/3]
bool PoDoFo::PdfName::operator== |
( |
const std::string & |
rhs | ) |
const |
|
inline |
overloaded operator for convenience
The string argument is treated as an unescaped name.
- Parameters
-
- Returns
- true if this objects name is equal to pszName
◆ Write()
Write the name to an output device in PDF format. This is an overloaded member function.
- Parameters
-
pDevice | write the object to this device |
eWriteMode | additional options for writing this object |
pEncrypt | an encryption object which is used to encrypt this object or NULL to not encrypt this object
|
Implements PoDoFo::PdfDataType.