Thanks for the tips, but are you even able to provide an example of what goes 
into this Parameter (PdfDecodeParms) in the PdfFilter->Decode function ?   I 
just cannot get it to work.
It's supposed to be a Dictionary pointer of which I pass the address. I'm not 
sure I'm even supposed to extract the sub Dictionary from an Xref stream?   
What I am trying to do is this:   I want to use the PdfFilter->Decode function 
to decode a stream using PdfDecodeParms.   That's it. 
Any help would be sincerely appreciated.

> From: z...@litepdf.cz
> To: podofo-users@lists.sourceforge.net
> Date: Tue, 19 Aug 2014 09:02:51 +0200
> Subject: Re: [Podofo-users] DecodeParms, how to use?
> 
> 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
                                          
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to