A more general comment: if you are going to
use CGI, you should take advantage of the functionality that it offers you. First, you should create a CGI object by saying
my $q = CGI->new.
Then your input parsing line would look like
my $PDFFile = $q->param("file"); and you don't need any variables like $INPUT or %INPUT. You also don't need DecodeInURL - just get rid of it. Furthermore, instead of
print "Content-type: text/html\r\n\r\n";
you could simply use
print $q->header("text/html");.
Finally, though you may know this already, I should point out that the call to
system does not return the output of the "pdf2jpeg" command, but rather its exit code, which is just a number. So this number is what will be displayed on the line that says "Output:" I'm not sure how exit codes work in Windows, but in Unix, and exit code of zero means success.