Hi all,

I've read these two sentences in the PDF reference:
        * "Any object in a PDF file may be labeled as an indirect object"
        * "The object can be referred to from elsewhere in the file by an 
indirect reference"

I undestand it means that these two contents would be equivalent:
        3 0 obj << /Type /Pages /Count 15 /Kids [5 0 R] >> endobj
and 
        3 0 obj << /Type /Pages /Count 4 0 R /Kids 5 0 R >> endobj
        4 0 obj 15 endobj

But when I look into PdfDictionary class, it contains GetKeyAsXXX methods, 
for instance GetKeyAsLong, that don't check if the key is a reference:
        long long PdfDictionary::GetKeyAsLong( const PdfName & key, long 
long lDefault ) const
        {
                const PdfObject* pObject = GetKey( key );
                if( pObject && pObject->GetDataType() == 
ePdfDataType_Number ) 
                {
                        return pObject->GetNumber();
                }
                return lDefault; 
        }

I think it should also check if pObject is a reference. 
If it is a reference it should get the reference, check if it is a number 
and read it.

Am I right or am I missing something ?

Thanks in advance.
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to