Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

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.

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.
a new PdfOutputStream that has to be deleted by the caller.
See also:

Definition at line 320 of file PdfFilter.cpp.

References PoDoFo::PdfVariant::GetDictionary(), PoDoFo::PdfDictionary::GetKey(), PoDoFo::PdfDictionary::HasKey(), and PoDoFo::PdfVariant::IsDictionary().

Referenced by PoDoFo::PdfStream::GetFilteredCopy().

    TVecFilters::const_reverse_iterator it = filters.rbegin();

    PODOFO_RAISE_LOGIC_IF( !filters.size(), "Cannot create an DecodeStream from an empty list of filters" );

    // TODO: support arrays and indirect objects here and the short name /DP
    if( pDictionary && pDictionary->HasKey( "DecodeParms" ) && pDictionary->GetKey( "DecodeParms" )->IsDictionary() )
        pDictionary = &(pDictionary->GetKey( "DecodeParms" )->GetDictionary());

    PdfFilteredDecodeStream* pFilter = new PdfFilteredDecodeStream( pStream, *it, false, pDictionary );

    while( it != filters.rend() ) 
        pFilter = new PdfFilteredDecodeStream( pFilter, *it, true, pDictionary );

    return pFilter;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index