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

PdfObject * PoDoFo::PdfPage::GetAnnotationsArray ( bool  bCreate = false ) const [private]

Get the annotations array.

bCreateif true the annotations array is created if it does not exist.
the annotations array or NULL if none exists.

Definition at line 271 of file PdfPage.cpp.

References PoDoFo::PdfDictionary::AddKey(), PoDoFo::PdfVariant::GetDictionary(), PoDoFo::PdfObject::GetIndirectKey(), PoDoFo::PdfDictionary::GetKey(), PoDoFo::PdfElement::GetNonConstObject(), PoDoFo::PdfElement::GetObject(), and PoDoFo::PdfVariant::IsArray().

Referenced by CreateAnnotation(), DeleteAnnotation(), GetAnnotation(), and GetNumAnnots().

    PdfObject* pObj;

    // check for it in the object itself
    if ( this->GetObject()->GetDictionary().HasKey( "Annots" ) ) 
        pObj = this->GetObject()->GetIndirectKey( "Annots" );
        if( pObj && pObj->IsArray() )
            return pObj;
    else if( bCreate ) 
        PdfArray array;
        this->GetNonConstObject()->GetDictionary().AddKey( "Annots", array );
        return const_cast<PdfObject*>(this->GetObject()->GetDictionary().GetKey( "Annots" ));

    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