#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/3]
Constructor to create nullptr strings. use PdfName::KeyNull instead of this constructor
◆ PdfName() [2/3]
| 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() [3/3]
| PdfName::PdfName |
( |
const PdfName & | rhs | ) |
|
Create a copy of an existing PdfName object.
- Parameters
-
◆ FromEscaped()
| 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
◆ GetEscapedName()
| 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.
◆ GetRawData()
| const string & PdfName::GetRawData |
( |
| ) |
const |
- Returns
- the raw data of this name object
◆ GetString()
| const string & PdfName::GetString |
( |
| ) |
const |
- Returns
- the unescaped value of this name object without the leading slash
◆ IsNull()
| bool PdfName::IsNull |
( |
| ) |
const |
- Returns
- true if the name is empty
◆ operator std::string_view()
| PoDoFo::PdfName::operator std::string_view |
( |
| ) |
const |
Default cast to raw data string view
It's used in PdfDictionary lookup
◆ operator!=()
| bool PdfName::operator!= |
( |
const PdfName & | rhs | ) |
const |
compare two PdfName objects.
- Returns
- true if both PdfNames have different values.
◆ operator<()
| 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
◆ operator=()
Assign another name to this object
- Parameters
-
◆ operator==()
| bool PdfName::operator== |
( |
const PdfName & | rhs | ) |
const |
compare to PdfName objects.
- Returns
- true if both PdfNames have the same value.
◆ Write()
| void PdfName::Write |
( |
OutputStream & | stream, |
|
|
PdfWriteFlags | writeMode, |
|
|
const PdfStatefulEncrypt & | encrypt, |
|
|
charbuff & | buffer ) const |
|
overridevirtual |
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.