[Zope] PDF's behave different with MS 5.0 Browsers

Troy Farrell troy@entheossoft.com
Sun, 20 Jan 2002 22:47:38 -0600


Unfortunately, I have no help for you.  My response to a similar problem=20
has been to set the Content-Type to application/octet-stream and make=20
the users save it to their Windows desktop.

My problem occurs in the CMF, when users add PDF's as PortalFiles.  I've=20
not yet figured out where to the problem is, though something makes me=20
think that IE is trying to do pieces of the document with HTTP/1.1 and=20
Zope, even behind apache/mod rewrite, has trouble with this and the=20
trouble is propaged to IE.  In my case, when a user clicks a link to a=20
pdf, the adobe viewer launches, the browser downloads the whole pdf=20
file, and IE goes blank where you expect to see the adobe viewer plugin.=20
  The browser still responds, but will not show the document.  If ZC is=20
interested, I'll try to develop a test case.

Troy

--=20
Troy Farrell
Developer
Entheos Software
mailto:troy@entheossoft.com
http://www.entheossoft.com


Tanalahy wrote:

> Hi!
>=20
> As a beginner in Zope I created an intranet solution for 1800 employees=
=20
> in a big factory. People should be able to publish documents, but there=
=20
> occurs a problem with PDF files.
>=20
> PDF's imported by the manager's add-file-dialog can be seen by users=20
> with MS Internet Explorer 5.0 and Adobe Acrobat Reader 3.0 - 4.0.
>=20
> But I wrote another more special upload dialog, which uses the add-file=
=20
> method too. But by this way, PDF's cannot be displayed by the above=20
> constellation, even all the properties look the same. The file type is=20
> "application/pdf", but MS 5.0 browsers complain, that no appropriate=20
> viewer can be found.
>=20
> Only upgrading to IE 5.5 with Acrobat 5.0 makes no difference.
>=20
> Does anyone have some idea what makes the difference or can provide a=20
> solution. We soon should publish the intranet solution, but we cannot=20
> upgrade all the workstations. So we are in unexpected trouble. Need hel=
p=20
> soon.
>=20
> Thank very much
> J=FCrgen
>=20
> Mail: treutler@vaovaoweb.de
>=20
> *******************************************
>=20
> Listing:
> """
> Create a file entry.
> """
> # create a unique document id
> id=3D'file_%s' % stamp
> valid_from =3D y1 + "/" + m1 + "/" + d1
> expires =3D y2 + "/" + m2 + "/" + d2
>=20
> # create the document
> context.manage_addProduct['OFSP'].manage_addFile(id, title=3Dfile_title=
,=20
> file=3Dfile_name)
>=20
> # add some properties
> doc=3Dgetattr(context, id)
> doc.manage_addProperty('autor', autor, 'string')
> doc.manage_addProperty('abteilung', abteilung, 'string')
> doc.manage_addProperty('valid_from', valid_from, 'date')
> doc.manage_addProperty('expires', expires, 'date')
> doc.manage_addProperty('order', order, 'int')
> doc.manage_addProperty('siteMap', siteMap, 'boolean')