PoDoFo::PdfContentsTokenizer Class Reference

#include <PdfContentsTokenizer.h>

Inheritance diagram for PoDoFo::PdfContentsTokenizer:

PoDoFo::PdfTokenizer

List of all members.

Public Member Functions

 PdfContentsTokenizer (const char *pBuffer, long lLen)
 PdfContentsTokenizer (PdfCanvas *pCanvas)
bool ReadNext (EPdfContentsType &reType, const char *&rpszKeyword, PoDoFo::PdfVariant &rVariant)


Detailed Description

This class is a parser for content streams in PDF documents.

The parsed content stream can be used and modified in various ways.

This class is currently work in progress and subject to change!


Constructor & Destructor Documentation

PoDoFo::PdfContentsTokenizer::PdfContentsTokenizer ( const char *  pBuffer,
long  lLen 
) [inline]

Construct a PdfContentsTokenizer from an existing buffer. Usually a stream from a PdfPage.

Parameters:
pBuffer pointer to a buffer
lLen length of the buffer

PoDoFo::PdfContentsTokenizer::PdfContentsTokenizer ( PdfCanvas pCanvas  ) 

Construct a PdfContentsTokenizer from a PdfCanvas (i.e. PdfPage or a PdfXObject).

This is more convinient as you do not have to care about buffers yourself.

Parameters:
pCanvas an object that hold a PDF contents stream


Member Function Documentation

bool PoDoFo::PdfContentsTokenizer::ReadNext ( EPdfContentsType reType,
const char *&  rpszKeyword,
PoDoFo::PdfVariant rVariant 
)

Read the next keyword or variant, returning true and setting reType if something was read. Either rpszKeyword or rVariant, but never both, have defined and usable values on true return, with which being controlled by the value of eType.

If EOF is encountered, returns false and leaves eType, pszKeyword and rVariant undefined.

Parameters:
[out] reType will be set to either keyword or variant if true is returned. Undefined if false is returned.
[out] rpszKeyword if pType is set to ePdfContentsType_Keyword this will point to the keyword, otherwise the value is undefined. If set, the value points to memory owned by the PdfContentsTokenizer and must not be freed. The value is invalidated when ReadNext is next called or when the PdfContentsTokenizer is destroyed.
[out] rVariant if pType is set to ePdfContentsType_Variant this will be set to the read variant, otherwise the value is undefined.


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