TPrintPreview Zlib

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

TPrintPreview Zlib

Postby BrianO » October 10th, 2004, 12:04 pm


I am using D6 Pro, and WinXpPro.

Just testing compression, and as far as I can determine, it
is not working with the configuration that I have.

The Zlib DLL that I had was an old one from 1998, so I upgraded
to the latest, 1.2.2, but no difference.

Using the test program supplied, General.dpr, whether I use
compression or not, I get a ppv file size of 768,388.

Just to be sure, I hard-coded the compression in Preview.pas
and tried it with and without compression.


procedure TPrintPreview.SaveToStream(Stream: TStream);
Data: Integer;
EncoderStream: TStream;
//// {$IFDEF ZLIB}
EncoderStream := TCompressionStream.Create(clDefault, Stream);
//// {$ELSE}
//// EncoderStream := Stream;
//// {$ENDIF}

There is a later version of Zlib.pas in the new DLL components
download, however it appears to require that the ZLIB DLL be
compiled using the Windows MakeFile. I'm afraid I am not familiar
with C and Windows to acomplish that.

IE. it requires Eg..obj versions of Adler.c etc.

I downloaded from :

I also tried zlibex.pas from, but had no luck
with that either. It is very version specific for zlib. I tried
changing that for different versions, but no luck.

All in all, not a very productive day.

As I see this as a fairly important area of TPrintPreview,
I would like to resolve it. Any suggestions would be appreciated.

Posts: 2
Joined: October 9th, 2004, 7:42 am

Postby Johnny_Bit » October 10th, 2004, 3:00 pm

it works.

ps. current stable release is 1.2.1

of course you can simply change specific parts to newest version...
VIP Member
VIP Member
Posts: 455
Joined: June 15th, 2003, 9:56 am

Return to DELPHI AREA Products

Who is online

Users browsing this forum: Google [Bot] and 2 guests