PoDoFo::PdfXRefStream Class Reference

#include <PdfXRefStream.h>

Inheritance diagram for PoDoFo::PdfXRefStream:

PoDoFo::PdfXRef

List of all members.

Public Member Functions

 PdfXRefStream (PdfVecObjects *pParent, PdfWriter *pWriter)
virtual ~PdfXRefStream ()
virtual size_t GetOffset () const

Protected Member Functions

virtual void BeginWrite (PdfOutputDevice *pDevice)
virtual void WriteSubSection (PdfOutputDevice *pDevice, unsigned int nFirst, unsigned int nCount)
virtual void WriteXRefEntry (PdfOutputDevice *pDevice, unsigned long lOffset, unsigned long lGeneration, char cMode, unsigned long lObjectNumber=0)
virtual void EndWrite (PdfOutputDevice *pDevice)


Detailed Description

Creates an XRef table that is a stream object. Requires at least PDF 1.5. XRef streams are more compact than normal XRef tables.

This is an internal class of PoDoFo used by PdfWriter.


Constructor & Destructor Documentation

PoDoFo::PdfXRefStream::PdfXRefStream ( PdfVecObjects pParent,
PdfWriter pWriter 
)

Create a new XRef table

Parameters:
pParent a vector of PdfObject is required to create a PdfObject for the XRef
pWriter is needed to fill the trailer directory correctly which is included into the XRef

PoDoFo::PdfXRefStream::~PdfXRefStream (  )  [virtual]

Destruct the XRef table


Member Function Documentation

void PoDoFo::PdfXRefStream::BeginWrite ( PdfOutputDevice pDevice  )  [protected, virtual]

Called at the start of writing the XRef table. This method can be overwritten in subclasses to write a general header for the XRef table.

Parameters:
pDevice the output device to which the XRef table should be written.

Reimplemented from PoDoFo::PdfXRef.

void PoDoFo::PdfXRefStream::EndWrite ( PdfOutputDevice pDevice  )  [protected, virtual]

Called at the end of writing the XRef table. Sub classes can overload this method to finish a XRef table.

Parameters:
pDevice the output device to which the XRef table should be written.

Reimplemented from PoDoFo::PdfXRef.

size_t PoDoFo::PdfXRefStream::GetOffset (  )  const [inline, virtual]

Returns:
the offset in the file at which the XRef table starts after it was written

Reimplemented from PoDoFo::PdfXRef.

void PoDoFo::PdfXRefStream::WriteSubSection ( PdfOutputDevice pDevice,
unsigned int  nFirst,
unsigned int  nCount 
) [protected, virtual]

Begin an XRef subsection. All following calls of WriteXRefEntry belong to this XRef subsection.

Parameters:
pDevice the output device to which the XRef table should be written.
nFirst the object number of the first object in this subsection
nCount the number of entries in this subsection

Reimplemented from PoDoFo::PdfXRef.

void PoDoFo::PdfXRefStream::WriteXRefEntry ( PdfOutputDevice pDevice,
unsigned long  lOffset,
unsigned long  lGeneration,
char  cMode,
unsigned long  lObjectNumber = 0 
) [protected, virtual]

Write a single entry to the XRef table

Parameters:
pDevice the output device to which the XRef table should be written.
lOffset the offset of the object
lGeneration the generation number
cMode the mode 'n' for object and 'f' for free objects
lObjectNumber the object number of the currently written object if cMode = 'n' otherwise undefined

Reimplemented from PoDoFo::PdfXRef.


Generated on Sat May 2 02:53:20 2009 for PoDoFo by  doxygen 1.5.7.1