Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: calling zlib from VB - what is correct prototype?
Conf: (P-PDF) Developers, Msg: 69177
From: tballou
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) _
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.

Troxel Ballou

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.