in reply to Premature end of script headers

Hi Candyman,

I am not sure why you are doing this ...
print "Content-type: application/vnd.fdf\n\n";
Are you trying to force the client to download or execute a fdf file?

Also you might want to do this to ...
use strict; use CGI; use CGI::Carp qw /fatalsToBrowser/;
... although it might not be a issure here "use strict" and Carp will make your life easier in the long run. Also once you get your issues worked out you might want to do this ...
#!/usr/bin/perl -wT
If you want make your cgi more secure.

Plankton: 1% Evil, 99% Hot Gas.

Replies are listed 'Best First'.
Re: Re: Premature end of script headers
by CandymanCID (Initiate) on Mar 29, 2004 at 20:14 UTC
    Plankton

    print "Content-type: application/vnd.fdf\n\n";

    This line (in theory) tells the browser that what is about to come is a fdf file for a application. On a computer that has Acrobat reader installed it should reconize it as such and fire up the reader in the web browser.
      Well assuming there isn't some other problem couldn't you simply redirect to the URL ...

      http://www.mywebplace.com/fdf_pdfs/App.pdf

      ... after you created it?

      Plankton: 1% Evil, 99% Hot Gas.
        No, the PDF is already created, this script should make a FDF file that points to the PDF file. Acrobat would open the PDF and import the information from the FDF file to 'populate' the from with the information from the SQL db.