|
PDFs and Internet Explorer. The combination of Internet
Explorer and Acrobat is not always trouble free - particularly
under https or using older versions of Explorer. It can be
difficult to know exactly where the problem lies because there
is an interaction of the Operating System, Explorer and Acrobat.
Any of these can be the cause.
Sometimes Explorer may get 'stuck' on a particular content
type and insist on displaying your PDF as HTML. In this case
you will see random text starting with %PDF. Sometimes this
can happen if you stream PDF data to a window which was previously
displaying HTML.
Sometimes server-side debugging results in extra data being
inserted into the content stream. While this may not matter
for HTML it will corrupt binary documents like PDF.
Sometimes your code may inadvertently insert extra data into
the content stream. Again this will corrupt the PDF. Error
messages are a common cause of this kind of corruption.
For testing purposes you may wish to change the content-disposition
from 'inline' to 'attachment'. This will allow you to download
the data rather than view it in your browser. You can then
check the downloaded document using Acrobat or a hex editor.
Alternatively if the problem is that PDFs seem to be cached
you may wish to check the 'Enable Content Expiration' checkbox
you will find under the Web Site Properties.
We would suggest two steps:
- Your first step should be to eliminate ABCpdf as the cause.
Why not save the PDF to disk at the same time as sending
it to the client? That way you can establish that the PDF
is fine. If you want to take it further you can then read
the PDF data from disk and stream it direct to the client.
- The example site streams PDF data direct to the client.
So install the example site into a new virtual directory
and establish if the same issue exists for the example site.
If it works then it's simply a matter of moving your current
code base and the example site code base towards each other
until you find the cause of the problem.
|