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

Re: Download PDF's

by moritz (Cardinal)
on Jun 19, 2008 at 14:35 UTC ( [id://692930]=note: print w/replies, xml ) Need Help??


in reply to Download PDF's

It works the same as with any other web page, for example with LWP::Simple or LWP::UserAgent.

Replies are listed 'Best First'.
Re^2: Download PDF's
by Godsrock37 (Sexton) on Jun 19, 2008 at 14:58 UTC

    Really?! That's hot. So I could do:

    my $response = $robot->get($url, $url); if ($response->is_success and $response->content_type eq 'application/ +pdf'){ print PDF $contents; }

    how would i get $contents? Some type of parsing?

    I guess that means i can do the same thing with pictures too?

      Even easier:

      use strict; use LWP::Simple qw/getstore/; my $url = "http://blahblah/file.pdf"; my $file = "/home/user/file.pdf"; getstore($url, $file);
      --
      b10m

        haha, thanks b10m that looks awesome. i think i'm set then

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2024-04-23 13:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found