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

PoDoFo::PdfPage::PdfPage ( PdfObject pObject,
const std::deque< PdfObject * > &  listOfParents 
)

Create a PdfPage based on an existing PdfObject

Parameters:
pObjectan existing PdfObject
listOfParentsa list of PdfObjects that are parents of this page and can be queried for inherited attributes. The last object in the list is the most direct parent of this page.

Definition at line 44 of file PdfPage.cpp.

References PoDoFo::PdfObject::GetIndirectKey(), and PoDoFo::PdfElement::GetObject().

    : PdfElement( "Page", pObject ), PdfCanvas()
{
    m_pResources = this->GetObject()->GetIndirectKey( "Resources" );
    if( !m_pResources ) 
    {
        // Resources might be inherited
        std::deque<PdfObject*>::const_reverse_iterator it = rListOfParents.rbegin();

        while( it != rListOfParents.rend() && !m_pResources )
        {
            m_pResources = (*it)->GetIndirectKey( "Resources" );
            ++it;
        }
    }

    PdfObject* pContents = this->GetObject()->GetIndirectKey( "Contents" );
    if (pContents)
    {
        m_pContents = new PdfContents( pContents );
    }
    else
    {
        // Create object on demand
        m_pContents =  NULL;
    }
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index