On Tue, 2014-08-19 at 13:17 +0930, Domonic Tom wrote:
> ...
> 
> <</DecodeParms<</Columns 4/Predictor 
> 12>>/Filter/FlateDecode/ID[<6647557224A6C102A60F6D82BB22C18D><AA383B5CF85B7F4BACB9D502B93343E9>]/Index[10
>  
> 20]/Info 9 0 R/Length 64/Prev 23381/Root 11 0 R/Size 
> 30/Type/XRef/W[1 2 1]>>
> 
> If I know which object this is and extract the dictionary then I 
> can't see why it won't work.

        Hi,
I do not think I can help you much here, also because I'm unsure what 
you are trying to do, but maybe this will help a little bit:

Once you have a PdfDictionary, you can get its keys (and values) by:
   if (dict->HasKey("Columns"))
        columns = dict->GetKey("Columns");

See the base/PdfDictionary.h for more GetKey...() variants. 

If yours 'dict' points to:
   <</DecodeParms<</Columns 4/Predictor 12>>...>>
then the way to get into the inner/sub-dictionary might be:
   columns = dict->GetKey("DecodeParams")->GetDictionary().GetKey("Columns");
Some safety checks like HasKey() and IsDictionary() will make your 
code more error proof.

> PdfDictionary *dict = new PdfDictionary;
> *dict = obj->GetDictionary();
> 

The above construction is incorrect by many means. It might be done 
either directly, like in the snippets I wrote above (not assigning to a
 variable) or by:
   const PdfDictionary &dict = obj->GetDictionary();
   if (dict.HasKey(...)) ...

        Hope it helps,
        zyx


-- 
http://www.litePDF.cz                                 i...@litepdf.cz


------------------------------------------------------------------------------
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to