xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Art Welch <ar...@EASTPOINT.COM>
Subject RE: PDF Compression and IE5
Date Wed, 27 Dec 2000 15:22:12 GMT
Actually I was using just the ascii-85 filter (I think - will need to look
into this). At the moment it is not working at all (you may have seen my
message about an exception regarding FontSizeMaker). Once I figure this out
I will look into the compression again.

I am setting the content type to application/pdf. The weird thing is that
turning compression on with no other changes causes IE to display a blank
page, otherwise it works. Also if I generate a PDF file and then load that
it works. Very odd...

Your suggestion to check that binary transfer was set sounds like a good
idea, but I have not checked this yet (because I do not know how yet - I was
unaware that this was even an option on an Http post).

Anyhow the servlet environment is:

IBM RS/6000 running AIX 4.3
IBM JDK 1.1.8
Allaire JRun 3.0
Apache Http Server (do not know the version off hand - probably the latest -
or close to it)


-----Original Message-----
From: Kelly Campbell [mailto:camk@merlot.channelpoint.com]
Sent: Tuesday, December 26, 2000 7:34 PM
To: fop-dev@xml.apache.org
Subject: Re: PDF Compression and IE5

Note that using flate and ascii-85 together provides some
compression. The ascii-85 filter just expands the flate binary data by a
factor of 4 to 5 (4 binary bytes expands into 5 ascii bytes). So you still
get a much smaller file using those two together, but it uses only ascii
printable characters under 128 in value.

In your servlet, are you setting the content type on the HttpServletResult
to the proper one for PDF? Also, what servlet engine/web server
combination are you using? I'd like to try to reproduce this problem. 

Arved, can you uncomment the ascii-85 filter in the config.xml before
building the 0.16 release? That will hopefully reduce this kind of problem
until we can figure out exactly what to do about it. I'm not going to be
able to check in any changes with my vacation net access.


On Tue, Dec 26, 2000 at 12:55:06PM -0500, Art Welch wrote:
> I will look into the binary stuff. That seems plausible. I am actually
> dynamically generating the PDFs on-the-fly in a servlet. I do a Http post
> providing the necessary information to locate the source XML and
> etc and it gives me back a PDF that displays in the browser. I am using a
> subclass of Driver that I can toggle the compression on or off as desired.
> When compression is off (using the ascii-85 filter) the PDF displays
> properly. When on, the browser displays a blank page. I had similar
> previously displaying PDFs, but since upgrading everything (AcrobatReader,
> IE, Windows2000, etc) have not had a problem until this. I will look into
> this - some of our files are quite huge, so compression would be much
> appreciated.
> Art
> P.S. Do not break a leg.
> -----Original Message-----
> From: Kelly Campbell [mailto:camk@merlot.channelpoint.com]
> Sent: Friday, December 22, 2000 11:07 PM
> To: fop-dev@xml.apache.org
> Subject: Re: PDF Compression and IE5
> The problem I had originally was more of a binary formatting problem
> between linux where the PDF was generated and windows where it was being
> read. I also found out later that I had mistakenly added the pdf to the
> particular web site's revision control system in ascii, not binary
> mode. So if you use CVS to maintain your web site make sure the pdf was
> added with -kb 
> So, check the following:
> 1. The file is being sent from the web server in  binary format (I'm not
> exactly sure how most web servers handle this. I added a binary comment at
> the beginning of fop pdf files, so if it looks for binary characters in
> the first 512 bytes or something, that should work)
> 2. That it was copied to the web server in binary to start with
> If that doesn't solve it, you can add in one of the ascii filters in
> config.xml, then rebuild and rerun fop to build the pdf file. (you can
> skip the rebuild of fop if you use the userconfig mechanism of the
> configuration system (I don't recall what the commandline switch is, but I
> know it's documented in the example userconfig.xml)
> I would recommend flate + ascii-85. If that doesn't work, you can comment
> out the flate filter in the config so no compression is applied.
> Let us know what the problem/solution was in your case so if a fix needs
> applied, I can look into it.
> Happy holidays
> -Kelly (on xmas/new years/skiing vacation the next two weeks, checking
> mail intermittently)
> Art Welch wrote:
> If I recall correctly someone (Kelly?) had mentioned a short while back
> that PDF compression did not work with IE5. I downloaded a new FOP from
> CVS a couple of days ago and it appears to still not be working. When I
> use FOP in a servlet if compression is on then IE yields a blank screen.
> If I turn compression off then I get the correct results. Interestingly if
> I create a PDF file (compressed or not) then I can open it successfully in
> Acrobat. I have not tried accessing the PDF file in IE.
> I was just wondering if any progress has been made on this or if there are
> any more insights into this problem.

Kelly A. Campbell              Software Engineer
<camk@merlotxml.org>           ChannelPoint, Inc.
<camk@channelpoint.com>        Colorado Springs, Co.

View raw message