Hi Michael,

Makes perfect sense! Thanks for the patch, I commited it!

Regards,
        Dom

Am Montag 14 Juni 2010 schrieben Sie:
> Hello again Dom!
> 
> I have found what I think is a bug in the way that PdfInfo returns its
> String entries.
> The function in question is PdfInfo::GetStringFromInfoDict() which
> ensures that the PdfObject its returning is in fact a string before
> calling GetString() on that object.  If the PdfObject is of any other
> type the function returns NULL.
> 
> return pObj && pObj->IsString() ? pObj->GetString() :
>  PdfString::StringNull;
> 
> However if pObj is a Hex String, the function incorrectly returns
> StringNull, even though (as I understand it) calling GetString() on a
> hex string is perfectly safe and allowable.
> 
> All that we need to do here is add a second test for the case where pObj
> is a Hex string:
> 
> return pObj && (pObj->IsString() || pObj->IsHexString()) ?
> pObj->GetString() : PdfString::StringNull;
> 
> I have attached a patch for this bug.
> Cheers!
> ~Michael Marsella
> 


-- 
**********************************************************************
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.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to