Hi Ulrich,

You are right of course! I commited the change as you suggested it.

Regards,
        Dom

Am Montag 17 Mai 2010 schrieb Ulrich Simon:
> 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?
> 


-- 
**********************************************************************
Dominik Seichter - [email protected]
KRename  - http://www.krename.net  - Powerful batch renamer for KDE
KBarcode - http://www.kbarcode.net - Barcode and label printing
PoDoFo - http://podofo.sf.net - PDF generation and parsing library
SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game,  for KDE
Alan - http://alan.sf.net - A Turing Machine in Java
**********************************************************************

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------

_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to