<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META content="MSHTML 6.00.2800.1491" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=571425806-19062006><FONT face=Arial
size=2>Tried that, too. IE then attempted to open the PDF with Word. And failed
miserably to do so.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=571425806-19062006></SPAN><SPAN
class=571425806-19062006></SPAN> </DIV>
<DIV align=left>
<DIV><FONT face=Arial
size=2>Regards,<BR>
Leigh</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Leigh Sharpe<BR>Network Systems Engineer<BR>Pacific
Wireless<BR>Ph 9584 8966<BR>Mob 0408 009 502<BR>email <A
title=mailto:lsharpe@pacificwireless.com.au
href="blocked::mailto:lsharpe@pacificwireless.com.au">lsharpe@pacificwireless.com.au</A><BR>web
<A title=http://www.pacificwireless.com.au/
href="blocked::http://www.pacificwireless.com.au/">www.pacificwireless.com.au</A></FONT></DIV></DIV>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Guy Morton [mailto:guy@alchemy.com.au]
<BR><B>Sent:</B> Monday, June 19, 2006 4:55 PM<BR><B>To:</B> Leigh
Sharpe<BR><B>Subject:</B> Re: [Melbourne-pm] Delivering PDFs via
CGI<BR></FONT><BR></DIV>
<DIV></DIV>
<P>try adding a content-disposition line and put a filename in it, eg<BR><BR>
<BLOCKQUOTE type="cite"> print
"Content-Type: application/pdf\n";<BR>
print "Content-Disposition: attachment;
filename=youradhere.pdf\n";<BR> print
"Content-Transfer-Encoding:
binary\n\n";<BR></BLOCKQUOTE>hth<BR><BR>Guy<BR><BR>Leigh Sharpe wrote:
<BLOCKQUOTE cite=midH00000690006d554.1150699772.mail.pacificwireless.net.au@MHS
type="cite">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<DIV><SPAN class=858284006-19062006><FONT face=Arial size=2>Hi
All,</FONT></SPAN></DIV>
<DIV><SPAN class=858284006-19062006><FONT face=Arial size=2> Is it just
me or has this list been really quiet recently?</FONT></SPAN></DIV>
<DIV><SPAN class=858284006-19062006></SPAN> </DIV>
<DIV><SPAN class=858284006-19062006><FONT face=Arial size=2>Can anybody tell
me how to output PDF files to a browser properly? Specifically, I'm having
trouble getting Internet Explorer to recognise them as
PDFs.</FONT></SPAN></DIV>
<DIV><SPAN class=858284006-19062006><FONT face=Arial size=2>This, for
example:</FONT></SPAN></DIV>
<DIV><SPAN class=858284006-19062006></SPAN> </DIV>
<DIV><FONT face=Arial size=2> #!c:\perl\bin\perl.exe<BR> use
warnings;<BR> use strict;<BR> my
$filename="c:\\temp\\mypdf.pdf";<BR> my $data;<BR> print
"content-type:application/pdf\n\n";<BR> open (PDFFILE,"<$filename") or
die "$!\n";<BR> binmode PDFFILE;<BR> binmode STDOUT;<BR> my
$size = -s "$filename";<BR> read PDFFILE,$data,$size ||
die"$!\n";<BR> close PDFFILE;<BR> print $data;</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=858284006-19062006>Works perfectly
when accessed using Mozilla. Using IE, I just get a screen full of garbage.
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=858284006-19062006></SPAN></FONT><FONT face=Arial size=2><SPAN
class=858284006-19062006></SPAN></FONT><FONT face=Arial size=2><SPAN
class=858284006-19062006>If I use a URL that ends in ".pdf", it works. eg,
instead of <A
href="http://localhost/cgi-bin/mime.cgi">http://localhost/cgi-bin/mime.cgi</A>,
use <A
href="http://localhost/cgi-bin/mime.cgi?fred.pdf">http://localhost/cgi-bin/mime.cgi?fred.pdf</A>.
All works fine.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=858284006-19062006>Is this a bug
in my browser, or am I overlooking something here?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=858284006-19062006>I find the same
problem with MS-Word documents. I need to have a paramater which
ends in ".doc" in order to have IE open a word doc
automatically.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=858284006-19062006></SPAN></FONT> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV align=left>
<DIV><FONT face=Arial
size=2>Regards,<BR>
Leigh</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Leigh Sharpe<BR>Network Systems
Engineer<BR>Pacific Wireless<BR>Ph 9584 8966<BR>Mob 0408 009 502<BR>email <A
title=mailto:lsharpe@pacificwireless.com.au
href="blocked::mailto:lsharpe@pacificwireless.com.au">lsharpe@pacificwireless.com.au</A><BR>web
<A title=http://www.pacificwireless.com.au/
href="blocked::http://www.pacificwireless.com.au/">www.pacificwireless.com.au</A></FONT></DIV></DIV>
<DIV> </DIV><PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
Melbourne-pm mailing list
<A class=moz-txt-link-abbreviated href="mailto:Melbourne-pm@pm.org">Melbourne-pm@pm.org</A>
<A class=moz-txt-link-freetext href="http://mail.pm.org/mailman/listinfo/melbourne-pm">http://mail.pm.org/mailman/listinfo/melbourne-pm</A></PRE></BLOCKQUOTE>
<P></P></BODY></HTML>