Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Redirect to PDF file

by Anonymous Monk
on May 02, 2001 at 04:12 UTC ( #77191=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:


I wanted to use Location function to redirect to a PDF file. But it didn't show up although the address was right. Could anyone tell me how to get it done?
Thanks.

Comment on Redirect to PDF file
Re: Redirect to PDF file
by Ovid (Cardinal) on May 02, 2001 at 04:18 UTC

    He Who Must Not Be Named wrote:

    Could anyone tell me how to get it done?

    Could you show us your code? It's very easy, but if we see your code, we may be able to show you what you missed.

    From the CGI docs:

    use CGI qw/:standard/; print redirect('http://somewhere.else/in/movie/land');

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Re: Redirect to PDF file
by KM (Priest) on May 02, 2001 at 04:20 UTC
    It would help if you could show us what didn't work for you. This would help us correct your code form what you did, and show others what to do, and not to do.

    PS. Did you look at CGI.pm's redirect() method?

    print redirect('http://somewhere.else/blah/blah');

    Cheers,
    KM

Re: Redirect to PDF file
by jreades (Friar) on May 02, 2001 at 18:59 UTC

    Did anything show up in its place? (e.g. usual MIME-type gobbledygook)

    One possibility is that you need to reset the header to application/x-pdf (you're not sending text/plain headers first are you?).

    Again, code would help.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://77191]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2014-07-10 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (199 votes), past polls