Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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?

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-04-27 03:36 GMT
Find Nodes?
    Voting Booth?