## TPrintPreview Zlib

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

### TPrintPreview Zlib

Hi,

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.

Eg.

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

There is a later version of Zlib.pas in the new DLL components
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.

http://www.zlib.net/

I also tried zlibex.pas from base2ti.com, 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.

TIA
Brian
BrianO
BrianO
Member

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

http://www.dellapasqua.com/delphizlib/

it works.

ps. current stable release is 1.2.1

of course you can simply change specific parts to newest version...
Johnny_Bit
VIP Member

Posts: 455
Joined: June 15th, 2003, 9:56 am