summaryrefslogtreecommitdiff
path: root/Master/bin/win32/pdf2dsc.bat
diff options
context:
space:
mode:
Diffstat (limited to 'Master/bin/win32/pdf2dsc.bat')
-rw-r--r--Master/bin/win32/pdf2dsc.bat29
1 files changed, 29 insertions, 0 deletions
diff --git a/Master/bin/win32/pdf2dsc.bat b/Master/bin/win32/pdf2dsc.bat
new file mode 100644
index 00000000000..c81cc48d68e
--- /dev/null
+++ b/Master/bin/win32/pdf2dsc.bat
@@ -0,0 +1,29 @@
+@rem = '--*-Perl-*--
+@echo off
+perl -x -S %0 %*
+goto endofperl
+@rem ';
+#!/usr/bin/env perl
+#line 8
+$^W=1;
+
+@GS_CMD=(-d "/usr/bin")? ("gs"):("gswin32");
+
+die "usage: $0 pdffile [dscfile]\n" unless (@ARGV);
+
+$pdffile=shift @ARGV;
+
+if (@ARGV) {
+ $dscfile=shift @ARGV;
+} else {
+ ($dscfile=$pdffile)=~s/\.pdf$/\.dsc/;
+}
+
+push @GS_CMD, qw(-q -dNODISPLAY -dSAFER -dDELAYSAFER);
+push @GS_CMD, ("-sPDFname=$pdffile", "-sDSCname=$dscfile");
+push @GS_CMD, qw(pdf2dsc.ps -c quit);
+
+exec @GS_CMD or die $!;
+
+__END__
+:endofperl