|
Hello! I stumbled upon an exception that ist thrown by "PdfElement::PdfElement( const char* pszType, PdfObject* pObject )". It makes a check if the passed object is not of the correct type. But defining "type" is not mandatory in the PDF standard. Only when it's given, it has to be correct. Even Adobe example documents do not always define the type when its value is obviously clear (like in appearance streams, that are XObjects). So I modified the code to test if the attribute exists: old (PdfElement.cpp, Line 57): if( pszType && m_pObject->GetDictionary().GetKeyAsName( PdfName::KeyType ) != pszType ) new: if( pszType && m_pObject->GetDictionary().HasKey( PdfName::KeyType ) && m_pObject->GetDictionary().GetKeyAsName( PdfName::KeyType ) != pszType) Dominik, maybe you like to commit it!? Ulrich PS: Can you provide an up to date version of the PoDoFo browser for download? --
Ulrich Simon |
------------------------------------------------------------------------------
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users

