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

#include <PdfImmediateWriter.h>

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

Public Member Functions

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

Detailed Description

A kind of PdfWriter that writes objects with streams immediately to a PdfOutputDevice

Constructor & Destructor Documentation

◆ PdfImmediateWriter()

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

Create a new PdfWriter that writes objects with streams immediately to a PdfOutputDevice

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

◆ GetWriteMode()

PdfWriteMode PdfImmediateWriter::GetWriteMode ( ) const

Get the write mode used for writing the PDF

Returns
the write mode