<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Sounds like your file associations are bad on that PC if that's the
case. At any rate, the workaround *does* work for me so perhaps you
have an error in your code somewhere? Perhaps you could post your code,
and details of browser, OS etc you are testing with?<br>
<br>
Are you being careful to only put two new line characters on the end of
your *last* header?<br>
<br>
Guy<br>
<br>
<br>
Leigh Sharpe wrote:
<blockquote
cite="midH00000690006d558.1150700376.mail.pacificwireless.net.au@MHS"
type="cite">
<title></title>
<meta content="MSHTML 6.00.2800.1491" name="GENERATOR">
<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" dir="ltr" align="left" lang="en-us">
<hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b> Guy
Morton [<a class="moz-txt-link-freetext" href="mailto:guy@alchemy.com.au">mailto:guy@alchemy.com.au</a>] <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>
<p>try adding a content-disposition line and put a filename in it, eg<br>
<br>
</p>
<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 size="4" width="90%">
_______________________________________________
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>
</blockquote>
</body>
</html>