Dne 19.8.2014 19:41, Domonic Tom napsal(a): > Can you see what I mean. The Decode function requires a pointer > argument. I have to provide it with a PdfDictionary so getting the > Decode Parms directly is of no use in this case. > > dict->HasKey("Columns") and dict->HasKey("Predictor") both indicate > true, so when I load the dictionary it is definitely seeing those parms. > > I can't seem to decode a stream with parms using this function so I'm > not sure what is going wrong. If I use this very same code (without > parms) on other streams, it decompresses them fine. When I need to use > Parms it doesn't decompress the stream. Just outputs jumble. > > That's all I am trying to do, just using the *Decode Function* from > *PdfFilter*.
Hi, I never used the function directly myself, neither I have any PDF where I would be able to test this, but searching PoDoFo sources, the only mention of 'DecodeParams' is at base/PdfFiltersPrivate.cpp, which reads values directly from that dictionary with PdfPredictorDecoder. It means the PdfPredictorDecoder expects a dictionary, which is the content of /DecodeParams. Searching on the usage of PdfPredictorDecoder, only two filters are instantiating it, they are PdfFlateFilter and PdfLZWFilter, if it's passed to it. If I read the PdfPredictorDecoder properly, then it supports only TIFF and PNG predictors. The number 12 means, according to the implementation, that the actual predictor to use is stored as the first (the next) byte of the stream. The PdfPredictorDecoder doesn't implement all predictors, thus it's possible that your stream is encoded in a way which PoDoFo cannot decode. Bye, zyx -- http://www.litePDF.cz i...@litepdf.cz ------------------------------------------------------------------------------ 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