Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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?

Comment on Redirect to PDF file
Replies are listed 'Best First'.
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');


    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's redirect() method?

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


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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (14)
As of 2015-11-24 23:00 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (665 votes), past polls