8#include "PdfReference.h"
18class PdfDataContainer;
34 friend class PdfParser;
101 std::string_view GetDataTypeString()
const;
107 bool IsNumber()
const;
112 bool IsRealStrict()
const;
115 bool IsNumberOrReal()
const;
118 bool IsString()
const;
124 bool IsArray()
const;
127 bool IsDictionary()
const;
130 bool IsRawData()
const;
136 bool IsReference()
const;
146 bool GetBool()
const;
147 bool TryGetBool(
bool& value)
const;
153 int64_t GetNumberLenient()
const;
154 bool TryGetNumberLenient(
int64_t& value)
const;
161 bool TryGetNumber(
int64_t& value)
const;
167 double GetReal()
const;
168 bool TryGetReal(
double& value)
const;
174 double GetRealStrict()
const;
175 bool TryGetRealStrict(
double& value)
const;
183 const PdfName& GetName()
const;
211 void SetBool(
bool value);
225 void SetReal(
double value);
278 const PdfArray& GetArrayUnsafe()
const;
319 template <
typename T>
323 PrimitiveMember(T value)
328 if (std::is_same_v<T, int64_t>)
329 return PdfDataType::Number;
330 else if (std::is_same_v<T, double>)
331 return PdfDataType::Real;
332 else if (std::is_same_v<T, bool>)
333 return PdfDataType::Bool;
334 else if (std::is_same_v<T, PdfDictionary*>)
335 return PdfDataType::Dictionary;
336 else if (std::is_same_v<T, PdfArray*>)
337 return PdfDataType::Array;
338 else if (std::is_same_v<T, PdfData*>)
339 return PdfDataType::RawData;
341 return PdfDataType::Unknown;
An interface for writing blocks of data to a data source.
Definition OutputStream.h:15
This class represents a PdfArray Use it for all arrays that are written to a PDF file.
Definition PdfArray.h:76
A class to inherit for classes that are stored as union members in a PdfVariant.
Definition PdfBaseDataTypes.h:18
A datatype that allows to write arbitrary data to a PDF file.
Definition PdfData.h:20
The PDF dictionary data type of PoDoFo (inherits from PdfDataContainer, the base class for such repre...
Definition PdfDictionary.h:77
This class represents a PdfName.
Definition PdfName.h:21
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:31
A reference is a pointer to a object in the PDF file of the form "4 0 R", where 4 is the object numbe...
Definition PdfReference.h:20
A string that can be written to a PDF document.
Definition PdfString.h:21
A simple tokenizer for PDF files and PDF content streams.
Definition PdfTokenizer.h:32
A variant data type which supports all data types supported by the PDF standard.
Definition PdfVariant.h:29
PdfString m_String
Holds references, strings, names, dictionaries and arrays.
Definition PdfVariant.h:361
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:30
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13
PdfDataType
Every PDF datatype that can occur in a PDF file is referenced by an own enum (e.g.
Definition PdfDeclarations.h:152
@ Null
The null datatype is always null.
PdfWriteFlags
Specify additional options for writing the PDF.
Definition PdfDeclarations.h:136