PoDoFo  1.0.0-dev
Public Member Functions | List of all members
PoDoFo::PdfData Class Referencefinal

A datatype that allows to write arbitrary data to a PDF file. More...

#include <PdfData.h>

Inheritance diagram for PoDoFo::PdfData:
PoDoFo::PdfDataProvider< PdfData >

Public Member Functions

 PdfData (const PdfData &)=default
 
 PdfData (PdfData &&) noexcept=default
 
 PdfData (charbuff &&data, const std::shared_ptr< size_t > &writeBeacon={ })
 Create a new PdfData object with valid PdfData. More...
 
 PdfData (const bufferview &data, const std::shared_ptr< size_t > &writeBeacon={ })
 Create a new PdfData object with valid PdfData. More...
 
void Write (OutputStream &stream, PdfWriteFlags writeMode, const PdfStatefulEncrypt *encrypt, charbuff &buffer) const
 
PdfDataoperator= (const PdfData &rhs)=default
 
PdfDataoperator= (PdfData &&rhs)=default
 
PdfDataoperator= (const bufferview &data)
 
const charbuffGetBuffer () const
 Access the data as a std::string. More...
 
- Public Member Functions inherited from PoDoFo::PdfDataProvider< PdfData >
std::string ToString (PdfWriteFlags flags=PdfWriteFlags::None) const
 Converts the current object into a string representation which can be written directly to a PDF file on disc. More...
 
void ToString (std::string &str, PdfWriteFlags flags=PdfWriteFlags::None) 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!

Constructor & Destructor Documentation

◆ PdfData() [1/2]

PoDoFo::PdfData::PdfData ( charbuff &&  data,
const std::shared_ptr< size_t > &  writeBeacon = { } 
)

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
writeBeaconShared sentinel that will updated during writing of the document with the current position in the stream

◆ PdfData() [2/2]

PoDoFo::PdfData::PdfData ( const bufferview data,
const std::shared_ptr< size_t > &  writeBeacon = { } 
)
explicit

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
writeBeaconShared sentinel that will updated during writing of the document with the current position in the stream

Member Function Documentation

◆ GetBuffer()

const charbuff& PoDoFo::PdfData::GetBuffer ( ) const
inline

Access the data as a std::string.

Returns
a const reference to the contained data

The documentation for this class was generated from the following files: