#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
Constructor to create nullptr strings. use PdfName::KeyNull instead of this constructor
PoDoFo::PdfName::PdfName |
( |
const std::string_view & |
str | ) |
|
Create a new PdfName object.
- Parameters
-
str | the unescaped value of this name. Please specify the name without the leading '/'. Has to be a zero terminated string. |
PdfName::PdfName |
( |
const PdfName & |
rhs | ) |
|
Create a copy of an existing PdfName object.
- Parameters
-
PdfName PdfName::FromEscaped |
( |
const std::string_view & |
name | ) |
|
|
static |
Create a new PdfName object from a string containing an escaped name string without the leading / .
- Parameters
-
name | A string containing the escaped name |
- Returns
- A new PdfName
string 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.
const string & PdfName::GetRawData |
( |
| ) |
const |
- Returns
- the raw data of this name object
const string & PdfName::GetString |
( |
| ) |
const |
- Returns
- the unescaped value of this name object without the leading slash
bool PdfName::IsNull |
( |
| ) |
const |
- Returns
- true if the name is empty
PoDoFo::PdfName::operator std::string_view |
( |
| ) |
const |
Default cast to raw data string view
It's used in PdfDictionary lookup
bool PdfName::operator!= |
( |
const PdfName & |
rhs | ) |
const |
compare two PdfName objects.
- Returns
- true if both PdfNames have different values.
bool PdfName::operator< |
( |
const PdfName & |
rhs | ) |
const |
compare two PdfName objects. Used for sorting in lists
- Returns
- true if this object is smaller than rhs
Assign another name to this object
- Parameters
-
bool PdfName::operator== |
( |
const PdfName & |
rhs | ) |
const |
compare to PdfName objects.
- Returns
- true if both PdfNames have the same value.
Write the complete datatype to a file.
- Parameters
-
device | write the object to this device |
writeMode | additional options for writing this object |
encrypt | an encryption object which is used to encrypt this object or nullptr to not encrypt this object |
Implements PoDoFo::PdfDataProvider.