[Zope] Displaying pdf
Rick Smith
rick_t_smith at yahoo.co.uk
Wed Nov 30 19:47:56 EST 2005
Perhaps someone can point me in the right direction.
I am trying to display a pdf file (actually stored in LocalFS) from a
python script. To do this my approach (probably there's a better way) is :-
RESPONSE.setHeader('Content-Type','application/pdf')
RESPONSE.redirect(path)
My main problem is that on some occasions the file is properly opened
in acrobat (I'm using firefox on linux, but similar effects are obtained
using ie6/windows), while on other occasions raw pdf is displayed in the
browser field with a content-type of text/html. I'm unable to see any
difference to explain this difference - the documents are all scanned in
the same way and imported into acrobat in the same way, yet Zope (I
presume) interprets them as have differing content-type.
I presume that this problem would go away if I didn't use the redirect.
I'm sure it's blindingly obvious but I can't see how to do it another
way. I'd also be happy to display the pdf within an html document/frame
but my knowledge of html is missing something at this point.......
Please help me in my weakness.......
Rick
.
___________________________________________________________
WIN ONE OF THREE YAHOO! VESPAS - Enter now! - http://uk.cars.yahoo.com/features/competitions/vespa.html
More information about the Zope
mailing list