PoDoFo 0.9.6
PoDoFo::PdfData Class Reference

#include <PdfData.h>

Inheritance diagram for PoDoFo::PdfData:
PoDoFo::PdfDataType

Public Member Functions

 PdfData (const char *pszData)
 PdfData (const char *pszData, size_t dataSize)
 PdfData (const PdfData &rhs)
void Write (PdfOutputDevice *pDevice, EPdfWriteMode eWriteMode, const PdfEncrypt *pEncrypt=NULL) const
const PdfDataoperator= (const PdfData &rhs)
const std::string & data () const
Public Member Functions inherited from PoDoFo::PdfDataType
virtual bool IsDirty () const
virtual void SetDirty (bool bDirty)
void SetImmutable (bool bImmutable)
bool GetImmutable () const

Additional Inherited Members

Protected Member Functions inherited from PoDoFo::PdfDataType
 PdfDataType ()
void AssertMutable () const

Detailed Description

A datatype that allows to write arbitrary data to a PDF file. The user of this class has to ensure that the data written to the PDF file using this class is valid data for a PDF file!

This class is used in PoDoFo to pad PdfVariants.

Constructor & Destructor Documentation

◆ PdfData() [1/3]

PoDoFo::PdfData::PdfData ( const char * pszData)
inline

Create a new PdfData object with valid PdfData

The contained data has to be a valid value in a PDF file. It will be written directly to the PDF file.

Parameters
pszDataa null-terminated string to be copied.

◆ PdfData() [2/3]

PoDoFo::PdfData::PdfData ( const char * pszData,
size_t dataSize )
inline

Create a new PdfData object with valid PdfData.

Parameters
pszDataa char * buffer to be copied.
dataSizesize of buffer

◆ PdfData() [3/3]

PoDoFo::PdfData::PdfData ( const PdfData & rhs)
inline

Copy an existing PdfData

Parameters
rhsanother PdfData to copy

Member Function Documentation

◆ data()

const std::string & PoDoFo::PdfData::data ( ) const
inline

Access the data as a std::string

Returns
a const reference to the contained data

◆ operator=()

const PdfData & PoDoFo::PdfData::operator= ( const PdfData & rhs)
inline

Copy an existing PdfData

Parameters
rhsanother PdfData to copy
Returns
this object

◆ Write()

void PoDoFo::PdfData::Write ( PdfOutputDevice * pDevice,
EPdfWriteMode eWriteMode,
const PdfEncrypt * pEncrypt = NULL ) const
virtual

Write the complete datatype to a file.

Parameters
pDevicewrite the object to this device
eWriteModeadditional options for writing this object
pEncryptan encryption object which is used to encrypt this object or NULL to not encrypt this object

PdfData cannot do any encryption for you. So the encryption object will be ignored as it is also the case for the write mode!

Implements PoDoFo::PdfDataType.