New Forum | Previous | Next | (P-PDF) Developers
Topic: calling zlib from VB - what is correct prototype?
Conf: (P-PDF) Developers, Msg: 69177
Date: 7/24/2002 02:25 AM
I've scanned the forum and found no specific answers to these questions:
- will zlib inflate streams filtered as /FlateDecode? It appears these streams are NOT encoded as LZW specified in the Adobe ref man
- I'm using this prototype for calling the uncompress function from VB. Is it correct?
Public Declare Function ZlibUncompress _
Lib "zlib.dll" Alias "uncompress" _
(ByVal dest As String, _
ByRef destLen As Long, _
ByVal source As String, _
ByVal sourceLen As Long) _
With this prototype, I get Z_BUF_ERROR and a dest that contains what look like fragments of PostScript. I altered the type of destLen to As Any, no different result. Typical result (start of):
/TT2 1 Tf
12.9813 0 0 12.9813 58.2 750.36 Tm
/Cs6 cs 0 0
I am inflating strings of text about 2k long, and allocating 6x for the dest buffer, thinking that this should be enough.
My source string starts with 'H%', as has been observed on several of the topics. I have experimented with cutting the length to include or exclude the trailing CR LF CR before the endstream - no different result.
Any hints would be appreciated - but so would an explicit solution :)
Thanks in advance, all you Adobe lizards ^H^H^H^H^H^H^H wizards.