New Forum | Previous | Next | (P-PDF) Developers
Topic: Using CGI to display a PDF file in browser
Conf: (P-PDF) Developers, Msg: 59650
From: Ray Daugherty
Date: 5/29/2002 05:40 PM
I have a CGI application that allows a user to click on a drawing in a web browser and then respond in different ways (zoom, pan, display a different drawing, etc.). In this case, I am trying to print the drawing. The CGI application has created a PDF file that I want to display in the browser using either the Acrobat plug-in or helper application. However, I have not been able to determine the correct HTTP for doing so.
If I try the HTTP shown below, I get "An error occurred while trying to use this document." However, it works fine if I use a content-type of text/html and provide standard HTML.
HTTP/1.0 200 OK
I also tried using the Location (and URL) response headers to specify the URL of the pdf file (which works fine if I type it directly in the browser URL edit control). However, I get the message "The document contained no data." The plug-in loads, though, so I think I'm close.
Any advice on the correct HTTP?
Thanks in advance,
Aperture Technologies, Inc.