/ Published in: Perl

Used for converting, compiling, and reversing tiff files from the Book Center's digital library.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/env perl use warnings; use strict; use Getopt::Std; use PDF::FromImage; our %opts; getopt('d:f:o:', \%opts); if (!%opts) { Usage: [-d directory][-f image file] -o output.pdf EOF exit; } elsif ($opts{d}) { my $pdf = PDF::FromImage->new; my @files = <$opts{d}/*.tif>; $pdf->load_images(@rfiles); $pdf->write_file("$opts{o}"); } if ($opts{f}) { my $pdf = PDF::FromImage->new; $pdf->load_images("$opts{f}"); $pdf->write_file("$opts{o}"); }
Comments
