8#include "PdfReference.h"
18class PdfDataContainer;
36 friend class PdfParser;
115 std::string_view GetDataTypeString()
const;
123 bool IsNumber()
const;
129 bool IsRealStrict()
const;
133 bool IsNumberOrReal()
const;
137 bool IsString()
const;
145 bool IsArray()
const;
149 bool IsDictionary()
const;
153 bool IsRawData()
const;
161 bool IsReference()
const;
173 bool GetBool()
const;
174 bool TryGetBool(
bool& value)
const;
181 int64_t GetNumberLenient()
const;
182 bool TryGetNumberLenient(
int64_t& value)
const;
190 bool TryGetNumber(
int64_t& value)
const;
197 double GetReal()
const;
198 bool TryGetReal(
double& value)
const;
205 double GetRealStrict()
const;
206 bool TryGetRealStrict(
double& value)
const;
216 const PdfName& GetName()
const;
248 void SetBool(
bool value);
264 void SetReal(
double value);
325 const PdfArray& GetArrayUnsafe()
const;
368 template <
typename T>
372 PrimitiveMember(T value)
377 if (std::is_same_v<T, int64_t>)
378 return PdfDataType::Number;
379 else if (std::is_same_v<T, double>)
380 return PdfDataType::Real;
381 else if (std::is_same_v<T, bool>)
382 return PdfDataType::Bool;
383 else if (std::is_same_v<T, PdfDictionary*>)
384 return PdfDataType::Dictionary;
385 else if (std::is_same_v<T, PdfArray*>)
386 return PdfDataType::Array;
387 else if (std::is_same_v<T, PdfData*>)
388 return PdfDataType::RawData;
390 return PdfDataType::Unknown;
An interface for writing blocks of data to a data source.
Definition OutputStream.h:16
This class represents a PdfArray Use it for all arrays that are written to a PDF file.
Definition PdfArray.h:79
A class to inherit for classes that are stored as union members in a PdfVariant.
Definition PdfBaseDataTypes.h:19
A datatype that allows to write arbitrary data to a PDF file.
Definition PdfData.h:21
The PDF dictionary data type of PoDoFo (inherits from PdfDataContainer, the base class for such repre...
Definition PdfDictionary.h:80
This class represents a PdfName.
Definition PdfName.h:22
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:33
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:22
A string that can be written to a PDF document.
Definition PdfString.h:22
A simple tokenizer for PDF files and PDF content streams.
Definition PdfTokenizer.h:34
A variant data type which supports all data types supported by the PDF standard.
Definition PdfVariant.h:31
PdfString m_String
Holds references, strings, names, dictionaries and arrays.
Definition PdfVariant.h:412
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:35
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:165
@ Null
The null datatype is always null.
PdfWriteFlags
Specify additional options for writing the PDF.
Definition PdfDeclarations.h:147