New Forum | Previous | Next | (P-PDF) Developers
Topic: Uncompressing the stream with zLib
Conf: (P-PDF) Developers, Msg: 103378
Date: 1/8/2004 04:56 AM
I am trying to use zLib to uncompress the stream from the pdf
strDest = ' The memory allocated to put the uncompressed steam into.
lngDestLen = is the length of the strDest which i am setting like so;
strDest = String$(OrigSize + 1, 0)
origsize is basically the Len(stream)
Stream is the compressed stream..
' Decompress the string...
intResult = uncompress(ByVal strDest, lngDestLen, ByVal Stream, Len(Stream) + 1)
I keep getting a -2 "There was not enough room in the output buffer!" or a -5 "Input data was corrupted!" error, depending on who i tweek it here or there??
Can anyone tell me what the best way to set the Originsize of the uncompressed stream, i believe that this is my issuse. Is it stored in the file? is so where i look for it?