<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><SPAN class=646291511-19062006><FONT face=Arial color=#0000ff size=2><FONT
face="Times New Roman" color=#000000 size=3>>Sounds like your file
associations are bad on that PC if that's the case.</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=646291511-19062006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=646291511-19062006><FONT face=Arial color=#0000ff size=2>Oddly,
after killing off AcroRead32, it started behaving much better, so I suspect that
may have been the problem in the first place. Just strange that Mozilla didn't
have any issues.</FONT></SPAN></DIV>
<DIV><SPAN class=646291511-19062006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=646291511-19062006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Guy Morton
[mailto:guy@alchemy.com.au]<BR><B>Sent:</B> Monday, 19 June 2006 7:13
PM<BR><B>To:</B> Leigh Sharpe<BR><B>Cc:</B> melbourne-pm<BR><B>Subject:</B>
Re: [Melbourne-pm] Delivering PDFs via CGI<BR><BR></FONT></DIV>
<P>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">
<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 lang=en-us dir=ltr align=left>
<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 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></BLOCKQUOTE>
<P></P></BLOCKQUOTE></BODY></HTML>