How to serve a pdf file and view it inside the explorer

Giganews Newsgroups
Subject: How to serve a pdf file and view it inside the explorer
Posted by:  Chus GZarco (jagarcia_cointec_nospam@nospam.hotmail.com)
Date: Wed, 20 Feb 2008

I have a little httpserver that serves reports in pdf format.

When i serve the file, the explorer always ask to open the file and
opens the file in another window.

Is there any option to serve the pdf file to force the explorer to open
it inside the explorer.

Thanks.

The request is http://localhost:8000/informe?idpeticion=6427

the server create an pdf document and send it to the client.

AResponseInfo.ResponseNo  := 200;
AResponseInfo.ContentText := ExtractFileName( ArchivoInforme );
AResponseInfo.ContentType := MIMEMap.GetFileMIMEType( ArchivoInforme );
ByteEnviados              := AResponseInfo.ServeFile( AContext,
ArchivoInforme );
--

Replies