I've encountered PDFs which use a reference for the Resources object of a page. However, PoDoFo assumes that it is an inline object. Attached is a patch that causes PoDoFo to use GetIndirectKey to get the Resources PdfObject.
Index: src/PdfPage.cpp
===================================================================
--- src/PdfPage.cpp	(revision 1135)
+++ src/PdfPage.cpp	(working copy)
@@ -447,7 +447,8 @@
 {
     if( m_pResources->GetDictionary().HasKey( rType ) ) 
     {
-        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();
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to