OSDN Git Service

add copyright description.
authorgn64_jp <gn64@rec10.org>
Fri, 12 Apr 2013 08:11:12 +0000 (17:11 +0900)
committergn64_jp <gn64@rec10.org>
Fri, 12 Apr 2013 08:11:12 +0000 (17:11 +0900)
pdfserver.pl [deleted file]

diff --git a/pdfserver.pl b/pdfserver.pl
deleted file mode 100755 (executable)
index 05ed5ac..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl
-use KCatch;
-use utf8;
-use Encode 'decode';
-use File::Basename;
-use warnings;
-use CGI;
-use CGI::Carp qw(fatalsToBrowser);
-
-$cgi = new CGI;
-$pdfpath = decode('utf-8',$cgi->param('pdfpath'));
-$pagenum = int($cgi->param('pagenum'));
-$pagediff = int($cgi->param('pagediff'));
-$dpi = int($cgi->param('dpi'));
-
-$outputpath = "/tmp/rec10pdf/" . basename($pdfpath);
-if (-e "/tmp/rec10pdf"){
-       #"";
-}else{
-       system "mkdir /tmp/rec10pdf";
-}
-if ((-e $pdfpath)&&(-r $pdfpath)){
-       $b = $pagenum-$pagediff;
-       $e = $pagenum+$pagediff;
-       if ($b<1){
-               $b = 1;
-       }
-       system "pdftk \"" . $pdfpath . "\" cat " . $b . "-" . $e . " output \"" . $outputpath . "\""
-}
-if (-e $outputpath){
-       $size = -s $outputpath;
-       print "Content-type: application/pdf\n";
-       print "Content-length:",$size,"\n";
-       print "\n";
-       open(IN,$outputpath);
-       binmode(IN);
-       binmode(STDOUT);
-       #read(IN,$buf,$size);
-       while(read(IN,$buf,1048576)){
-               print $buf;
-       }
-       close(IN);
-       system "rm " . $outputpath;
-       
-}else{
-print $cgi->header(-type=>"text/html",-charset=>"utf-8");
-print $cgi->start_html(-title=>"rec10 pdf search",-lang=>"ja-JP");
-print "error<br>";
-print "pdftk \"" . $pdfpath . "\" cat " . $b . "-" . $e . " output \"/tmp/rec10pdf/" . basename($pdfpath) . "\"";
-}