[reportlab-users] Wrong order of Filters in page streams

Bernhard Herzog reportlab-users@reportlab.com
22 Jul 2002 21:41:08 +0200


"Andy Robinson" <andy@reportlab.com> writes:

> > Bernhard Herzog <bh@intevation.de> writes:
> >
> > [...]
> > > the order of the filters is a bit strange:
> > >
> > > % page stream
> > > << /Filter [ /FlateDecode
> > >   /ASCII85Decode ]
> > >  /Length 16339 >>
> > > stream
> > >
> > > followed by lots of binary bytes.
> > >
> > > The above filter specification means that the stream will be first flate
> > > decoded and then ASCII85 decoded (i.e. it was created by first ASCII85
> > > encoding it and then compressing it).
> 
> I just fixed this.  Thanks, and sorry we failed to respond the
> first posting - blame lack of sleep.

No problem.
 
> I can only presume that Acrobat either auto-detects or
> totally ignores these parameters.

The PDF that reportlab generated before the patch was valid PDF and did
contain what it said, a stream that has to be flate-decoded and then
ASCII85 decoded. It's just that if it's done in this order the ASCII85
is completely unnecessary and just increases the file size.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
MapIt!                                           http://www.mapit.de/