[opencms-dev] generating pdf files

Dan Moore Dan.Moore at xor.com
Thu Apr 25 17:10:32 CEST 2002


On Thu, 25 Apr 2002 11:58, Marian Kasala wrote:

> 
> Hi,
> 
> my problem is different one. I don't intend to generate PDFs from
> html pages,
> I just have PDFs stored in /download/ directory for downloading from site.
> But when I access this file it is not opened correctly  in browser. I expect
> to be launched Acrobat Reader but instead PDF is presented like html page.
> 
> I think it's problem of setting correct content-type (application/pdf).
> Isn't it?
> And I expected PdfLauncher does this.
> What is correct solution for this?

Hi,

To narrow down the problem, I'd check the output of telnetting to your site
and requesting a pdf file.  That should tell you if the content-type is
incorrect.

    [moore at imapala moore]$ telnet imapala 8080
    Trying 127.0.0.1...
    Connected to imapala
    Escape character is '^]'.
    HEAD / HTTP/1.0
    
    HTTP/1.1 302 Moved Temporarily
    Content-Type: text/html
    Date: Thu, 25 Apr 2002 15:08:48 GMT
    Location: http://localhost:8080/index.html
    Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector)
    Connection: close

    Connection closed by foreign host.
    [moore at imapala moore]$ 

Some browsers also look at the file extension as well as the content type.

Dan




More information about the opencms-dev mailing list