Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Opening PDF through CGI

by nobull (Friar)
on May 26, 2006 at 16:58 UTC ( [id://551908]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print header('application/pdf'), do {
        open my $fh, '<:raw', 'minimal.pdf' or die "D'Oh! $!\n";
        local $\;
        <$fh>;
    };
    
  2. or download this
    print header('application/pdf');
    {
    ...
        local $\;
        print <$fh>;
    };
    
  3. or download this
    use File::Copy 'copy';
    print header('application/pdf');
    copy 'minimal.pdf', \*STDOUT or die "D'Oh! $!\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://551908]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2024-04-24 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found