/ Published in: Perl
Retrieves gif page images from RIFIAS on-line archive and combines them into a single pdf file
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/perl -w # use strict; use LWP::Simple; use LWP::UserAgent; use Image::Magick; # # my $pagenb = 0; my $page = get("http://webapp1.dlib.indiana.edu:8080/metsnav/rifias/navigate.do?oid=r$code"); if ( $page =~ m/\s*<input type.*> of (\d*)/ ) { $pagenb = $1; } else { } # #$pagenb = 2; # my $directory = ''; my @filelist; # for (my $index=1; $index <= $pagenb ; $index++) { my $download = "http://purl.dlib.indiana.edu/iudl/rifias/page/r$code-" . sprintf("%08d", $index) . "-full.gif"; my $user_agent = LWP::UserAgent->new; my $request = HTTP::Request->new('GET', $download); my $response = $user_agent->request ($request, $directory . $file); } # # my $status; # #system("convert *.gif $code.pdf");