PoDoFo  0.9.1
Static Public Member Functions
PoDoFo::PdfFilterFactory Class Reference

#include <PdfFilter.h>

List of all members.

Static Public Member Functions

static std::auto_ptr< PdfFilterCreate (const EPdfFilter eFilter)
static PdfOutputStreamCreateEncodeStream (const TVecFilters &filters, PdfOutputStream *pStream)
static PdfOutputStreamCreateDecodeStream (const TVecFilters &filters, PdfOutputStream *pStream, const PdfDictionary *pDictionary=NULL)
static EPdfFilter FilterNameToType (const PdfName &name, bool bSupportShortNames=true)
static const char * FilterTypeToName (EPdfFilter eFilter)
static TVecFilters CreateFilterList (const PdfObject *pObject)

Detailed Description

A factory to create a filter object for a filter GetType from the EPdfFilter enum.

All filters should be created using this factory.


Member Function Documentation

std::auto_ptr< PdfFilter > PoDoFo::PdfFilterFactory::Create ( const EPdfFilter  eFilter) [static]

Create a filter from an enum.

Ownership is transferred to the caller, who should let the auto_ptr the filter is returned in take care of freeing it when they're done with it.

Parameters:
eFilterthe GetType of filter that should be created.
Returns:
a new PdfFilter allocated using new or NULL if no filter is available for this type.
PdfOutputStream * PoDoFo::PdfFilterFactory::CreateDecodeStream ( const TVecFilters &  filters,
PdfOutputStream pStream,
const PdfDictionary *  pDictionary = NULL 
) [static]

Create a PdfOutputStream that applies a list of filters on all data written to it.

Parameters:
filtersa list of filters
pStreamwrite all data to this PdfOutputStream after it has been decoded.
pDictionarypointer to a dictionary that might contain additional parameters for decoding the stream. CreateDecodeStream will look for a key named DecodeParms in this dictionary and pass the information found in this dictionary to the filters.
Returns:
a new PdfOutputStream that has to be deleted by the caller.
See also:
PdfFilterFactory::CreateFilterList
PdfOutputStream * PoDoFo::PdfFilterFactory::CreateEncodeStream ( const TVecFilters &  filters,
PdfOutputStream pStream 
) [static]

Create a PdfOutputStream that applies a list of filters on all data written to it.

Parameters:
filtersa list of filters
pStreamwrite all data to this PdfOutputStream after it has been encoded.
Returns:
a new PdfOutputStream that has to be deleted by the caller.
See also:
PdfFilterFactory::CreateFilterList
TVecFilters PoDoFo::PdfFilterFactory::CreateFilterList ( const PdfObject pObject) [static]

The passed PdfObject has to be a dictionary with a Filters key, an array of filter names or a filter name.

Parameters:
pObjectmust define a list of filters.
Returns:
a list of filters
EPdfFilter PoDoFo::PdfFilterFactory::FilterNameToType ( const PdfName name,
bool  bSupportShortNames = true 
) [static]

Converts a filter name to the corresponding enum

Parameters:
nameof the filter without leading
bSupportShortNamesthe PDF Reference supports several short names for filters (e.g. AHx for AsciiHexDecode), if true support for these short names will be enabled. This is often used in inline images.
Returns:
the filter as enum
const char * PoDoFo::PdfFilterFactory::FilterTypeToName ( EPdfFilter  eFilter) [static]

Converts a filter type enum to the corresponding PdfName

Parameters:
eFiltera filter type
Returns:
the filter as name