PoDoFo 0.9.20
Public Member Functions | List of all members
PoDoFo::PdfImmediateWriter Class Reference

#include <PdfImmediateWriter.h>

Inheritance diagram for PoDoFo::PdfImmediateWriter:
PoDoFo::PdfWriter PoDoFo::PdfIndirectObjectList::Observer PoDoFo::PdfIndirectObjectList::StreamFactory

Public Member Functions

 PdfImmediateWriter (PdfIndirectObjectList &objects, const PdfObject &trailer, OutputStreamDevice &device, PdfVersion version=PdfVersion::V1_5, PdfEncrypt *encrypt=nullptr, PdfSaveOptions opts=PdfSaveOptions::None)
 
PdfWriteFlags GetWriteFlags () const
 
PdfVersion GetPdfVersion () const
 

Detailed Description

A kind of PdfWriter that writes objects with streams immediately to an OutputStreamDevice

Constructor & Destructor Documentation

◆ PdfImmediateWriter()

PdfImmediateWriter::PdfImmediateWriter ( PdfIndirectObjectList objects,
const PdfObject trailer,
OutputStreamDevice &  device,
PdfVersion  version = PdfVersion::V1_5,
PdfEncrypt encrypt = nullptr,
PdfSaveOptions  opts = PdfSaveOptions::None 
)

Create a new PdfWriter that writes objects with streams immediately to an OutputStreamDevice

This has the advantage that large documents can be created without having to keep the whole document in memory.

Parameters
deviceall stream streams are immediately written to this output device while the document is created.
objectsa vector of objects containing the objects which are written to disk
trailerthe trailer object
versionthe PDF version of the document to write. The PDF version can only be set in the constructor as it is the first item written to the document on disk.
encryptpointer to an encryption object or nullptr. If not nullptr the PdfEncrypt object will be copied and used to encrypt the created document.
writeModeadditional options for writing the pdf

Member Function Documentation

◆ GetPdfVersion()

PdfVersion PdfImmediateWriter::GetPdfVersion ( ) const

Get the PDF version of the document The PDF version can only be set in the constructor as it is the first item written to the document on disk

Returns
PdfVersion version of the pdf document

◆ GetWriteFlags()

PdfWriteFlags PdfImmediateWriter::GetWriteFlags ( ) const

Get the write mode used for writing the PDF

Returns
the write mode