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

PdfObject * PoDoFo::PdfPage::GetFromResources ( const PdfName rType,
const PdfName rKey 

Get an element from the pages resources dictionary, using a type (category) and a key.

rTypethe type of resource to fetch (e.g. /Font, or /XObject)
rKeythe key of the resource
the object of the resource or NULL if it was not found

Definition at line 564 of file PdfPage.cpp.

References PoDoFo::PdfVariant::GetDictionary(), PoDoFo::PdfObject::GetIndirectKey(), PoDoFo::PdfDictionary::GetKey(), PoDoFo::PdfVecObjects::GetObject(), PoDoFo::PdfElement::GetObject(), PoDoFo::PdfObject::GetOwner(), PoDoFo::PdfVariant::GetReference(), PoDoFo::PdfDictionary::HasKey(), and PoDoFo::PdfVariant::IsDictionary().

Referenced by TextExtractor::ExtractText().

    if( m_pResources->GetDictionary().HasKey( rType ) ) 
        // OC 15.08.2010 BugFix: Ghostscript creates here sometimes an indirect reference to a directory
     // PdfObject* pType = m_pResources->GetDictionary().GetKey( rType );
        PdfObject* pType = m_pResources->GetIndirectKey( rType );
        if( pType->IsDictionary() && pType->GetDictionary().HasKey( rKey ) )
            const PdfReference & ref = pType->GetDictionary().GetKey( rKey )->GetReference();
            return this->GetObject()->GetOwner()->GetObject( ref );
    return NULL;

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