Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks!
I have a program that is generating a pdf file out of a fdf file, its driving me crazy here. It opens just fine and displays the PDF in Firefox but there is an issue if I try to open the same program in IE. May be some of you went by the same problem before where I ran out of options, is there a different header, am I calling the header wrong? Here is a code that you can try, look at it and please try to help on this:
#!/usr/bin/perl -w use strict; use CGI qw(:standard); my $q = new CGI; print $q->header("application/vnd.fdf"); #print "Content-type: application/vnd.fdf\n\n"; print <<RESPONSESTREAM; %FDF-1.2 1 0 obj << /FDF << /Fields [ << /T (name) /V (the name) >> << /T (address) /V (address) >> << /T (city) /V (city) >> << /T (email) /V (email) >> << /T (ph_number) /V (ph_number) >> << /T (date) /V (date) >> << /T (nick_name) /V (nick_name) >> << /T (sec_address) /V (sec_address) >> << /T (zip) /V (zip) >> ] /F (https://www.test.com/mytemplate.pdf) >> >> endobj trailer << /Root 1 0 R >> %%EOF RESPONSESTREAM exit;


Thanks for looking!

Replies are listed 'Best First'.
Re: Open FDF file with Perl Help!
by moritz (Cardinal) on Jul 13, 2011 at 13:41 UTC
    but there is an issue if I try to open the same program in IE.

    What's the issue? Tomato sauce comming out of your keyboard? Or something else?

      I am sorry, it does not display anything, the page is all gray, but the pdf displays just fine in firefox. It seems that IE cant read or does not understand the header been passed by the Perl code.
        It works if only two /T and /V is inside of the /Fields, the question is why it doesn't work with all of them.